Ok, so let's do the analysis. Looks like there are problems in t-rtems
and sh/t-sh, in addition to ARM. But I think all of them can be changed.
./config/mcore/t-mcore:HOST_LIBGCC2_CFLAGS = -O3 -DNO_FLOATLIB_FIXUNSDFSI
#-msifilter
Used as
tmake_file="mcore/t-mcore t-fdpbit"
would not be a problem to change to +=
./config/m32r/t-m32r:HOST_LIBGCC2_CFLAGS = -G 0
Same:
tmake_file="m32r/t-m32r t-fdpbit"
./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.
./config/avr/t-avr:HOST_LIBGCC2_CFLAGS = -DDF=SF -Dinhibit_libc
-mcall-prologues -Os
avr-*-rtems*)
tmake_file="$tmake_file avr/t-avr t-fpbit"
tm_file="$tm_file avr/avr-lib.h"
# Don't use default.
extra_parts=
;;
tmake_file seems to be empty at this point, but let's change it to +=
./config/h8300/t-h8300:HOST_LIBGCC2_CFLAGS = -DDF=SF
Same, safe to change.
./config/lm32/t-elf:HOST_LIBGCC2_CFLAGS = -G 0 -msign-extend-enabled
lm32-*-elf*|lm32-*-rtems*)
extra_parts="$extra_parts crti.o crtn.o"
tmake_file="lm32/t-lm32 lm32/t-elf t-softfp-sfdf t-softfp"
;;
Safe to change.
./config/mmix/t-mmix:HOST_LIBGCC2_CFLAGS = -mlibfuncs -O2
mmix-knuth-mmixware)
extra_parts="crti.o crtn.o crtbegin.o crtend.o"
tmake_file="${tmake_file} ${cpu_type}/t-${cpu_type}"
;;
Safe to change.
./config/mips/t-elf:HOST_LIBGCC2_CFLAGS = -G 0
Only comes after mips/t-mips, safe to change.
./config/picochip/t-picochip:HOST_LIBGCC2_CFLAGS = -DDF=SF -I../../includes/
picochip-*-*)
tmake_file="picochip/t-picochip t-fpbit"
;;
Safe to change.
./config/sh/t-sh:HOST_LIBGCC2_CFLAGS = -mieee
Wrong, sh/t-sh comes after t-libgcc-pic for sh*-*-linux*
.
./config/c6x/t-elf:HOST_LIBGCC2_CFLAGS = -msdata=none
Safe to change.
./config/t-openbsd-thread:HOST_LIBGCC2_CFLAGS=-pthread
Wrong, overrides t-libgcc-pic.
./config/bfin/t-elf:HOST_LIBGCC2_CFLAGS = $(PICFLAG)
Safe to change. Can be removed altogether and replaced with t-libgcc-pic.
./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".
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./config/t-vxworks:HOST_LIBGCC2_CFLAGS =
Can be zapped. But LIBGCC2_DEBUG_CFLAGS cannot, the default is "-g"
./config/arm/t-strongarm-elf:HOST_LIBGCC2_CFLAGS = -fno-inline
Wrong, as you found it should be changed to += because it comes after
t-libgcc-pic for arm*-*-freebsd*.
./config/arm/t-elf:HOST_LIBGCC2_CFLAGS = -fno-inline
Wrong, topic of this thread.
./config/pdp11/t-pdp11:HOST_LIBGCC2_CFLAGS = -O2 -mfloat32
Safe to change.
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.
Paolo