OSDN Git Service

* config.gcc (xtensa-*-elf*): Removed assignments to with_newlib,
authorbwilson <bwilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Jan 2003 21:51:03 +0000 (21:51 +0000)
committerbwilson <bwilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Jan 2003 21:51:03 +0000 (21:51 +0000)
        extra_parts, and fixincludes.  Add xtensa/t-elf tmake_file.
        (xtensa-*-linux*): Add xtensa/t-linux tmake_file.
        * config/xtensa/crti.asm: New file.
        * config/xtensa/crtn.asm: New file.
        * config/xtensa/t-elf: New file.
        * config/xtensa/t-linux: New file.
        * config/xtensa/t-xtensa: Add rules for crti.o and crtn.o.
        Move various CFLAGS settings to new t-elf file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61735 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config.gcc
gcc/config/xtensa/crti.asm [new file with mode: 0644]
gcc/config/xtensa/crtn.asm [new file with mode: 0644]
gcc/config/xtensa/t-elf [new file with mode: 0644]
gcc/config/xtensa/t-linux [new file with mode: 0644]
gcc/config/xtensa/t-xtensa

index 1217bce..b0c808d 100644 (file)
@@ -1,3 +1,15 @@
+2003-01-24  Bob Wilson  <bob.wilson@acm.org>
+
+       * config.gcc (xtensa-*-elf*): Removed assignments to with_newlib,
+       extra_parts, and fixincludes.  Add xtensa/t-elf tmake_file.
+       (xtensa-*-linux*): Add xtensa/t-linux tmake_file.
+       * config/xtensa/crti.asm: New file.
+       * config/xtensa/crtn.asm: New file.
+       * config/xtensa/t-elf: New file.
+       * config/xtensa/t-linux: New file.
+       * config/xtensa/t-xtensa: Add rules for crti.o and crtn.o.
+       Move various CFLAGS settings to new t-elf file.
+
 2003-01-24  Richard Henderson  <rth@redhat.com>
 
        PR optimization/4382
index dd06d69..b287bd3 100644 (file)
@@ -2666,14 +2666,11 @@ xstormy16-*-elf)
        ;;
 xtensa-*-elf*)
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h xtensa/elf.h"
-       with_newlib=yes
-       tmake_file=xtensa/t-xtensa
-       extra_parts="crtbegin.o crtend.o"
-       fixincludes=Makefile.in # newlib headers should be OK
+       tmake_file="xtensa/t-xtensa xtensa/t-elf"
        ;;
 xtensa-*-linux*)
        tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h xtensa/linux.h"
-       tmake_file="t-linux xtensa/t-xtensa"
+       tmake_file="t-linux xtensa/t-xtensa xtensa/t-linux"
        ;;
 *)
        echo "*** Configuration $machine not supported" 1>&2
diff --git a/gcc/config/xtensa/crti.asm b/gcc/config/xtensa/crti.asm
new file mode 100644 (file)
index 0000000..8019ed1
--- /dev/null
@@ -0,0 +1,44 @@
+# Start .init and .fini sections.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# 
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# In addition to the permissions in the GNU General Public License, the
+# Free Software Foundation gives you unlimited permission to link the
+# compiled version of this file into combinations with other programs,
+# and to distribute those combinations without any restriction coming
+# from the use of this file.  (The General Public License restrictions
+# do apply in other respects; for example, they cover modification of
+# the file, and distribution when not linked into a combine
+# executable.)
+# 
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING.  If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# This file just makes a stack frame for the contents of the .fini and
+# .init sections.  Users may put any desired instructions in those
+# sections.
+
+       .section .init
+       .globl _init
+       .type _init,@function
+       .align  4
+_init:
+       entry   sp, 40
+
+       .section .fini
+       .globl _fini
+       .type _fini,@function
+       .align  4
+_fini:
+       entry   sp, 40
diff --git a/gcc/config/xtensa/crtn.asm b/gcc/config/xtensa/crtn.asm
new file mode 100644 (file)
index 0000000..b4bdad9
--- /dev/null
@@ -0,0 +1,36 @@
+# End of .init and .fini sections.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# 
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# 
+# In addition to the permissions in the GNU General Public License, the
+# Free Software Foundation gives you unlimited permission to link the
+# compiled version of this file into combinations with other programs,
+# and to distribute those combinations without any restriction coming
+# from the use of this file.  (The General Public License restrictions
+# do apply in other respects; for example, they cover modification of
+# the file, and distribution when not linked into a combine
+# executable.)
+# 
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING.  If not, write to the Free
+# Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# This file just makes sure that the .fini and .init sections do in
+# fact return.  Users may put any desired instructions in those sections.
+# This file is the last thing linked into any executable.
+
+       .section .init
+       retw
+
+       .section .fini
+       retw
diff --git a/gcc/config/xtensa/t-elf b/gcc/config/xtensa/t-elf
new file mode 100644 (file)
index 0000000..7d6cd1a
--- /dev/null
@@ -0,0 +1,6 @@
+# Build CRT files and libgcc with the "longcalls" option
+CRTSTUFF_T_CFLAGS += -mlongcalls
+CRTSTUFF_T_CFLAGS_S += -mlongcalls
+TARGET_LIBGCC2_CFLAGS += -mlongcalls
+
+EXTRA_MULTILIB_PARTS = crti.o crtn.o crtbegin.o crtend.o
diff --git a/gcc/config/xtensa/t-linux b/gcc/config/xtensa/t-linux
new file mode 100644 (file)
index 0000000..7d39351
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
index e93a153..5597650 100644 (file)
@@ -8,21 +8,20 @@ fp-bit.c: $(srcdir)/config/fp-bit.c
        echo '#define FLOAT' > fp-bit.c
        cat $(srcdir)/config/fp-bit.c >> fp-bit.c
 
-########################################################################
-
 # Don't run fixproto
 STMP_FIXPROTO =
 
-# Build crtbegin and crtend with the "longcalls" option
-CRTSTUFF_T_CFLAGS += -mlongcalls
-CRTSTUFF_T_CFLAGS_S += -mlongcalls
-
 LIB1ASMSRC = xtensa/lib1funcs.asm
 LIB1ASMFUNCS = _mulsi3 _nsau _divsi3 _modsi3 _udivsi3 _umodsi3
 
-TARGET_LIBGCC2_CFLAGS += -mlongcalls
-
 LIB2FUNCS_EXTRA += $(srcdir)/config/xtensa/lib2funcs.S
 
+$(T)crti.o: $(srcdir)/config/xtensa/crti.asm $(GCC_PASSES)
+       $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o \
+         -x assembler-with-cpp $(srcdir)/config/xtensa/crti.asm
+$(T)crtn.o: $(srcdir)/config/xtensa/crtn.asm $(GCC_PASSES)
+       $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o \
+         -x assembler-with-cpp $(srcdir)/config/xtensa/crtn.asm
+
 $(out_object_file): gt-xtensa.h
 gt-xtensa.h : s-gtype ; @true