diff mbox

[build] Restore arm-eabi bootstrap (PR target/50978)

Message ID yddty6fx3w9.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Nov. 7, 2011, 5:01 p.m. UTC
Hi Paolo,

>>> ./config/t-rtems:HOST_LIBGCC2_CFLAGS = -I$(srcdir)/../newlib/libc/sys/rtems/include
>
> This was LIBGCC2_INCLUDES before your patches.
>
> You're also missing it in many cases: arm, avr, bfin, moxie, h8300, lm32,
> m32r, m68k, mips, powerpc, sh, m32c.

As mentioned, I've added a common *-*-rtems* case and made sure to add
to tmake_file for all individual RTEMS ports.

>>> ./config/bfin/t-elf:HOST_LIBGCC2_CFLAGS = $(PICFLAG)
>
> Safe to change.  Can be removed altogether and replaced with t-libgcc-pic.

Indeed, done.

>>> ./config/stormy16/t-stormy16:HOST_LIBGCC2_CFLAGS = -O2
>
> Seems unused to me, because this is not true anymore:
>
>  tmake_file
>        A list of machine-description-specific makefile-fragments,
>        if different from "$cpu_type/t-$cpu_type".
>        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I've explicitly added the file and removed the misleading part of the comment.

> Overall I suggest:
>
> * change t-rtems back to LIBGCC2_INCLUDES and add it for the missing
> targets;
>
> * change all to += except when a better course of action is suggested above.
>
> Of course unless you disagree with the analysis or had a reason for the
> t-rtems changes. :)  Let's commit the two as separate patches.

Here are the two patches I came up with.  The were included in an
i386-pc-solaris2.11 bootstrap to check for syntactic correctness, but
otherwise only checked by visual inspection.

Ok for mainline?

	Rainer


2011-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config.host (*-*-rtems*): Add t-rtems to tmake_file.
	(i[34567]86-*-rtems*): Remove t-rtems from tmake_file.
	(lm32-*-elf*, lm32-*-rtems*): Split into ...
	(lm32-*-elf*): ... this.
	(lm32-*-rtems*): ... and this.
	Add to tmake_file.
	(m32r-*-rtems*): Add to tmake_file.
	(moxie-*-rtems*): Likewise.
	(sparc-*-rtems*): Likewise.
	Remove t-rtems from tmake_file.
	(sparc64-*-rtems*): Likewise.
	* config/t-rtems (HOST_LIBGCC2_CFLAGS): Use LIBGCC2_INCLUDES
	instead.
2011-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	libgcc:
	* config.host (tmake_file): Correct comment.
	(bfin*-elf*): Remove bfin/t-elf from tmake_file, add
	t-libgcc-pic.
	(bfin*-uclinux*): Likewise.
	(bfin*-linux-uclibc*): Likewise.
	(xstormy16-*-elf): Add stormy16/t-stormy16 to tmake_file.

	* config/arm/t-elf (HOST_LIBGCC2_CFLAGS): Append instead of
	assigning.
	* config/arm/t-strongarm-elf (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/avr/t-avr (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/c6x/t-elf (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/h8300/t-h8300 (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/lm32/t-elf (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/m32r/t-m32r (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/mcore/t-mcore (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/mips/t-elf (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/mmix/t-mmix (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/pdp11/t-pdp11 (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/picochip/t-picochip (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/stormy16/t-stormy16 (HOST_LIBGCC2_CFLAGS): Likewise.
	* config/t-openbsd-thread (HOST_LIBGCC2_CFLAGS): Likewise.

	* config/bfin/t-elf: Remove.
	* config/t-vxworks (HOST_LIBGCC2_CFLAGS): Remove.

Comments

Paolo Bonzini Nov. 7, 2011, 5:05 p.m. UTC | #1
On 11/07/2011 06:01 PM, Rainer Orth wrote:
> Ok for mainline?

Ok, thanks.

Paolo
diff mbox

Patch

# HG changeset patch
# Parent 191ff9ddc1b0e6cab1dce11e2bc047114a46c907
Append to HOST_LIBGCC2_CFLAGS in libgcc

diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -58,8 +58,7 @@ 
 #  			Defaults to "$cpu_type/sfp-machine.h" if it exists,
 #			no-sfp-machine.h otherwise.
 #  tmake_file		A list of machine-description-specific
-#			makefile-fragments, if different from
-#			"$cpu_type/t-$cpu_type".
+#			makefile fragments.
 #  tm_defines		List of target macros to define for all compilations.
 #  tm_file		A list of target macro files used only for code
 #			built for the target, not the host.  These files
@@ -402,16 +401,16 @@  avr-*-*)
 	tm_file="$tm_file avr/avr-lib.h"
 	;;
 bfin*-elf*)
-	tmake_file="bfin/t-bfin bfin/t-elf bfin/t-crtlibid bfin/t-crtstuff t-fdpbit"
+	tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
 	extra_parts="$extra_parts crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o"
         ;;
 bfin*-uclinux*)
-	tmake_file="bfin/t-bfin bfin/t-elf bfin/t-crtlibid bfin/t-crtstuff t-fdpbit"
+	tmake_file="bfin/t-bfin bfin/t-crtlibid bfin/t-crtstuff t-libgcc-pic t-fdpbit"
 	extra_parts="$extra_parts crtbeginS.o crtendS.o crtlibid.o"
 	md_unwind_header=bfin/linux-unwind.h
         ;;
 bfin*-linux-uclibc*)
-	tmake_file="$tmake_file bfin/t-bfin bfin/t-elf bfin/t-crtstuff t-fdpbit bfin/t-linux"
+	tmake_file="$tmake_file bfin/t-bfin bfin/t-crtstuff t-libgcc-pic t-fdpbit bfin/t-linux"
 	# No need to build crtbeginT.o on uClibc systems.  Should probably
 	# be moved to the OS specific section above.
 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
@@ -1095,7 +1094,7 @@  vax-*-netbsdelf*)
 vax-*-openbsd*)
 	;;
 xstormy16-*-elf)
-	tmake_file=t-fdpbit
+	tmake_file="stormy16/t-stormy16 t-fdpbit"
 	;;
 xtensa*-*-elf*)
 	tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-elf"
diff --git a/libgcc/config/arm/t-elf b/libgcc/config/arm/t-elf
--- a/libgcc/config/arm/t-elf
+++ b/libgcc/config/arm/t-elf
@@ -15,4 +15,4 @@  LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-HOST_LIBGCC2_CFLAGS = -fno-inline
+HOST_LIBGCC2_CFLAGS += -fno-inline
diff --git a/libgcc/config/arm/t-strongarm-elf b/libgcc/config/arm/t-strongarm-elf
--- a/libgcc/config/arm/t-strongarm-elf
+++ b/libgcc/config/arm/t-strongarm-elf
@@ -3,4 +3,4 @@  LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi
 # Currently there is a bug somewhere in GCC's alias analysis
 # or scheduling code that is breaking _fpmul_parts in fp-bit.c.
 # Disabling function inlining is a workaround for this problem.
-HOST_LIBGCC2_CFLAGS = -fno-inline
+HOST_LIBGCC2_CFLAGS += -fno-inline
diff --git a/libgcc/config/avr/t-avr b/libgcc/config/avr/t-avr
--- a/libgcc/config/avr/t-avr
+++ b/libgcc/config/avr/t-avr
@@ -53,7 +53,7 @@  LIB2FUNCS_EXCLUDE = \
 # We do not have the DF type.
 # Most of the C functions in libgcc2 use almost all registers,
 # so use -mcall-prologues for smaller code size.
-HOST_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc -mcall-prologues -Os
+HOST_LIBGCC2_CFLAGS += -DDF=SF -Dinhibit_libc -mcall-prologues -Os
 
 # Extra 16-bit integer functions.
 intfuncs16 = _absvXX2 _addvXX3 _subvXX3 _mulvXX3 _negvXX2 _clrsbXX2
diff --git a/libgcc/config/bfin/t-elf b/libgcc/config/bfin/t-elf
deleted file mode 100644
--- a/libgcc/config/bfin/t-elf
+++ /dev/null
@@ -1,1 +0,0 @@ 
-HOST_LIBGCC2_CFLAGS = $(PICFLAG)
diff --git a/libgcc/config/c6x/t-elf b/libgcc/config/c6x/t-elf
--- a/libgcc/config/c6x/t-elf
+++ b/libgcc/config/c6x/t-elf
@@ -20,7 +20,7 @@  LIB2ADD = $(srcdir)/config/c6x/gef.c \
           $(srcdir)/config/c6x/eqd.c
 
 # Avoid failures when the user's GOT becomes too large.
-HOST_LIBGCC2_CFLAGS = -msdata=none
+HOST_LIBGCC2_CFLAGS += -msdata=none
 
 LIB2ADDEH = $(srcdir)/config/c6x/unwind-c6x.c \
   $(srcdir)/config/c6x/libunwind.S \
diff --git a/libgcc/config/h8300/t-h8300 b/libgcc/config/h8300/t-h8300
--- a/libgcc/config/h8300/t-h8300
+++ b/libgcc/config/h8300/t-h8300
@@ -10,4 +10,4 @@  LIB2ADD = \
 	$(srcdir)/config/h8300/fixunssfsi.c
 
 # We do not have DF type, so fake out the libgcc2 compilation.
-HOST_LIBGCC2_CFLAGS = -DDF=SF
+HOST_LIBGCC2_CFLAGS += -DDF=SF
diff --git a/libgcc/config/lm32/t-elf b/libgcc/config/lm32/t-elf
--- a/libgcc/config/lm32/t-elf
+++ b/libgcc/config/lm32/t-elf
@@ -1,2 +1,2 @@ 
 CRTSTUFF_T_CFLAGS = -G 0 -msign-extend-enabled
-HOST_LIBGCC2_CFLAGS = -G 0 -msign-extend-enabled
+HOST_LIBGCC2_CFLAGS += -G 0 -msign-extend-enabled
diff --git a/libgcc/config/m32r/t-m32r b/libgcc/config/m32r/t-m32r
--- a/libgcc/config/m32r/t-m32r
+++ b/libgcc/config/m32r/t-m32r
@@ -1,6 +1,6 @@ 
 # Turn off the SDA while compiling libgcc2.  There are no headers for it
 # and we want maximal upward compatibility here.
-HOST_LIBGCC2_CFLAGS = -G 0
+HOST_LIBGCC2_CFLAGS += -G 0
 
 # We need to use -fpic when we are using gcc to compile the routines in
 # initfini.c.  This is only really needed when we are going to use gcc/g++
diff --git a/libgcc/config/mcore/t-mcore b/libgcc/config/mcore/t-mcore
--- a/libgcc/config/mcore/t-mcore
+++ b/libgcc/config/mcore/t-mcore
@@ -2,4 +2,4 @@  LIB1ASMSRC    = mcore/lib1funcs.S
 LIB1ASMFUNCS  = _divsi3 _udivsi3 _modsi3 _umodsi3
 
 # could use -msifilter to be safe from interrupt/jmp interactions and others.
-HOST_LIBGCC2_CFLAGS = -O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter
+HOST_LIBGCC2_CFLAGS += -O3 -DNO_FLOATLIB_FIXUNSDFSI #-msifilter
diff --git a/libgcc/config/mips/t-elf b/libgcc/config/mips/t-elf
--- a/libgcc/config/mips/t-elf
+++ b/libgcc/config/mips/t-elf
@@ -1,3 +1,3 @@ 
 # We must build libgcc2.a with -G 0, in case the user wants to link
 # without the $gp register.
-HOST_LIBGCC2_CFLAGS = -G 0
+HOST_LIBGCC2_CFLAGS += -G 0
diff --git a/libgcc/config/mmix/t-mmix b/libgcc/config/mmix/t-mmix
--- a/libgcc/config/mmix/t-mmix
+++ b/libgcc/config/mmix/t-mmix
@@ -1,4 +1,4 @@ 
-HOST_LIBGCC2_CFLAGS = -mlibfuncs -O2
+HOST_LIBGCC2_CFLAGS += -mlibfuncs -O2
 
 # We need to turn off some assumptions on normality for code in crtstuff.c
 # and crt{i,n}.S, specifically about execution not continuing past the
diff --git a/libgcc/config/pdp11/t-pdp11 b/libgcc/config/pdp11/t-pdp11
--- a/libgcc/config/pdp11/t-pdp11
+++ b/libgcc/config/pdp11/t-pdp11
@@ -5,4 +5,4 @@  LIB2ADD = $(srcdir)/udivmod.c \
 	  $(srcdir)/memmove.c \
 	  $(srcdir)/memset.c
 
-HOST_LIBGCC2_CFLAGS = -O2 -mfloat32
+HOST_LIBGCC2_CFLAGS += -O2 -mfloat32
diff --git a/libgcc/config/picochip/t-picochip b/libgcc/config/picochip/t-picochip
--- a/libgcc/config/picochip/t-picochip
+++ b/libgcc/config/picochip/t-picochip
@@ -25,7 +25,7 @@  LIB2ADD = \
 
 # Special libgcc setup. Make single/double floating point the same,
 # and use our own include files.
-HOST_LIBGCC2_CFLAGS = -DDF=SF -I../../includes/
+HOST_LIBGCC2_CFLAGS += -DDF=SF -I../../includes/
 
 # Switch off all debugging for the embedded libraries.
 # (embedded processors need small libraries by default).
diff --git a/libgcc/config/sh/t-sh b/libgcc/config/sh/t-sh
--- a/libgcc/config/sh/t-sh
+++ b/libgcc/config/sh/t-sh
@@ -59,5 +59,5 @@  div_table-4-300.o: $(srcdir)/config/sh/l
 libgcc-4-300.a: div_table-4-300.o
 	$(AR_CREATE_FOR_TARGET) $@ div_table-4-300.o
 
-HOST_LIBGCC2_CFLAGS = -mieee
+HOST_LIBGCC2_CFLAGS += -mieee
 
diff --git a/libgcc/config/stormy16/t-stormy16 b/libgcc/config/stormy16/t-stormy16
--- a/libgcc/config/stormy16/t-stormy16
+++ b/libgcc/config/stormy16/t-stormy16
@@ -36,4 +36,4 @@  LIB2ADD = \
 	$(srcdir)/config/stormy16/cmpsi2.c \
 	$(srcdir)/config/stormy16/ucmpsi2.c
 
-HOST_LIBGCC2_CFLAGS = -O2
+HOST_LIBGCC2_CFLAGS += -O2
diff --git a/libgcc/config/t-openbsd-thread b/libgcc/config/t-openbsd-thread
--- a/libgcc/config/t-openbsd-thread
+++ b/libgcc/config/t-openbsd-thread
@@ -1,3 +1,3 @@ 
 # This is currently needed to compile libgcc2 for threads support
-HOST_LIBGCC2_CFLAGS=-pthread
+HOST_LIBGCC2_CFLAGS += -pthread
 
diff --git a/libgcc/config/t-vxworks b/libgcc/config/t-vxworks
--- a/libgcc/config/t-vxworks
+++ b/libgcc/config/t-vxworks
@@ -1,7 +1,3 @@ 
-# FIXME: Need to specify the next two?
-# No special flags needed for libgcc.a
-HOST_LIBGCC2_CFLAGS =
-
 # Don't build libgcc.a with debug info
 LIBGCC2_DEBUG_CFLAGS =