mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-04-20 17:37:22 -05:00
168 lines
7.4 KiB
Diff
168 lines
7.4 KiB
Diff
diff -Nbaur gcc-4.7.0/gcc/config/arm/t-arm-elf gcc-4.7.0-arm/gcc/config/arm/t-arm-elf
|
|
--- gcc-4.7.0/gcc/config/arm/t-arm-elf 2011-11-02 15:23:48.000000000 +0000
|
|
+++ gcc-4.7.0-arm/gcc/config/arm/t-arm-elf 2012-04-05 20:36:17.000000000 +0100
|
|
@@ -26,22 +26,44 @@
|
|
#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
|
|
#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
|
|
|
|
-#MULTILIB_OPTIONS += march=armv7
|
|
-#MULTILIB_DIRNAMES += thumb2
|
|
-#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
|
-#MULTILIB_MATCHES += march?armv7=march?armv7-a
|
|
-#MULTILIB_MATCHES += march?armv7=march?armv7-r
|
|
-#MULTILIB_MATCHES += march?armv7=march?armv7-m
|
|
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
|
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
|
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
|
+#mfloat-abi=hard|mfpu=fpv4-sp-d16
|
|
+
|
|
+MULTILIB_OPTIONS += march=armv7/march=armv6-m/mcpu=cortex-m4
|
|
+MULTILIB_DIRNAMES += thumb2 armv6-m cortex-m4
|
|
+MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
|
+MULTILIB_EXCEPTIONS += march=armv6-m* marm/*march=armv6-m*
|
|
+MULTILIB_EXCEPTIONS += mcpu=cortex-m4* marm/*mcpu=cortex-m4*
|
|
+MULTILIB_EXCEPTIONS += mcpu=cortex-m4* mthumb/mcpu=cortex-m4
|
|
+MULTILIB_EXCEPTIONS += mcpu=cortex-m4* mthumb/mcpu=cortex-m4/mbig-endian
|
|
+MULTILIB_MATCHES += march?armv7=march?armv7-a
|
|
+MULTILIB_MATCHES += march?armv7=march?armv7-r
|
|
+MULTILIB_MATCHES += march?armv7=march?armv7-m
|
|
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
|
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
|
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
|
+MULTILIB_MATCHES += march?armv6-m=mcpu?cortex-m0
|
|
+MULTILIB_MATCHES += march?armv6-m=mcpu?cortex-m1
|
|
+
|
|
+MULTILIB_OPTIONS += mfloat-abi=hard mfpu=fpv4-sp-d16
|
|
+MULTILIB_DIRNAMES += float-abi-hard fpuv4-sp-d16
|
|
+MULTILIB_EXCEPTIONS += mfloat* marm/mfloat*
|
|
+MULTILIB_EXCEPTIONS += mfloat* mthumb/mfloat*
|
|
+MULTILIB_EXCEPTIONS += mfloat* mthumb*march=armv6-m*mfloat*
|
|
+MULTILIB_EXCEPTIONS += mfloat* mthumb*march=armv7*mfloat*
|
|
+MULTILIB_EXCEPTIONS += mfloat* mthumb/mcpu=cortex-m4/mfloat-abi=hard
|
|
+MULTILIB_EXCEPTIONS += mfloat* mthumb/mcpu=cortex-m4/mfloat-abi=hard/mbig-endian
|
|
+MULTILIB_EXCEPTIONS += mfpu* mthumb*march=armv6-m*mfpu*
|
|
+MULTILIB_EXCEPTIONS += mfpu* mthumb*march=armv7*mfpu*
|
|
+MULTILIB_EXCEPTIONS += mfpu* mthumb/mcpu=cortex-m4/mfpu*
|
|
+MULTILIB_EXCEPTIONS += mfpu* mthumb/mfpu*
|
|
+MULTILIB_EXCEPTIONS += mfpu* marm/mfpu*
|
|
|
|
# Not quite true. We can support hard-vfp calling in Thumb2, but how do we
|
|
# express that here? Also, we really need architecture v5e or later
|
|
# (mcrr etc).
|
|
-MULTILIB_OPTIONS += mfloat-abi=hard
|
|
-MULTILIB_DIRNAMES += fpu
|
|
-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
|
+#MULTILIB_OPTIONS += mfloat-abi=hard
|
|
+#MULTILIB_DIRNAMES += fpu
|
|
+#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
|
#MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard*
|
|
#MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard*
|
|
|
|
@@ -49,9 +71,9 @@
|
|
# MULTILIB_DIRNAMES += ep9312
|
|
# MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312*
|
|
#
|
|
-# MULTILIB_OPTIONS += mlittle-endian/mbig-endian
|
|
-# MULTILIB_DIRNAMES += le be
|
|
-# MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
|
|
+MULTILIB_OPTIONS += mlittle-endian/mbig-endian
|
|
+MULTILIB_DIRNAMES += le be
|
|
+MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
|
|
#
|
|
# MULTILIB_OPTIONS += mfloat-abi=hard/mfloat-abi=soft
|
|
# MULTILIB_DIRNAMES += fpu soft
|
|
diff -Nbaur gcc-4.7.0/gcc/config/arm/unknown-elf.h gcc-4.7.0-arm/gcc/config/arm/unknown-elf.h
|
|
--- gcc-4.7.0/gcc/config/arm/unknown-elf.h 2011-03-31 13:13:13.000000000 +0100
|
|
+++ gcc-4.7.0-arm/gcc/config/arm/unknown-elf.h 2012-04-05 20:36:17.000000000 +0100
|
|
@@ -94,4 +94,4 @@
|
|
udivmoddi4, which will depend on the exception unwind routines,
|
|
which will depend on abort, which is defined in libc. */
|
|
#undef LINK_GCC_C_SEQUENCE_SPEC
|
|
-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
|
|
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
|
|
diff -Nbaur gcc-4.7.0/gcc/gcc.c gcc-4.7.0-arm/gcc/gcc.c
|
|
--- gcc-4.7.0/gcc/gcc.c 2012-02-28 17:31:38.000000000 +0000
|
|
+++ gcc-4.7.0-arm/gcc/gcc.c 2012-04-05 20:36:17.000000000 +0100
|
|
@@ -548,6 +548,11 @@
|
|
#endif
|
|
#endif
|
|
|
|
+#ifndef LIBGLOSS_SPEC
|
|
+# define LIBGLOSS_SPEC "-lsysbase"
|
|
+#endif
|
|
+
|
|
+
|
|
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
|
|
#ifndef STARTFILE_SPEC
|
|
#define STARTFILE_SPEC \
|
|
@@ -717,6 +722,7 @@
|
|
static const char *mflib_spec = MFLIB_SPEC;
|
|
static const char *link_gomp_spec = "";
|
|
static const char *libgcc_spec = LIBGCC_SPEC;
|
|
+static const char *libgloss_spec = LIBGLOSS_SPEC;
|
|
static const char *endfile_spec = ENDFILE_SPEC;
|
|
static const char *startfile_spec = STARTFILE_SPEC;
|
|
static const char *linker_name_spec = LINKER_NAME;
|
|
@@ -1201,6 +1207,7 @@
|
|
INIT_STATIC_SPEC ("mflib", &mflib_spec),
|
|
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
|
|
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
|
|
+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
|
|
INIT_STATIC_SPEC ("startfile", &startfile_spec),
|
|
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
|
|
INIT_STATIC_SPEC ("version", &compiler_version),
|
|
diff -Nbaur gcc-4.7.0/libcpp/Makefile.in gcc-4.7.0-arm/libcpp/Makefile.in
|
|
--- gcc-4.7.0/libcpp/Makefile.in 2012-03-22 07:37:39.000000000 +0000
|
|
+++ gcc-4.7.0-arm/libcpp/Makefile.in 2012-04-05 20:36:17.000000000 +0100
|
|
@@ -214,8 +214,7 @@
|
|
# Note that we put the dependencies into a .Tpo file, then move them
|
|
# into place if the compile succeeds. We need this because gcc does
|
|
# not atomically write the dependency output file.
|
|
-COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
|
|
-POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
|
+COMPILE = $(COMPILE.base) -o $@
|
|
else
|
|
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
|
|
$(depcomp) $(COMPILE.base)
|
|
diff -Nbaur gcc-4.7.0/libgcc/crtstuff.c gcc-4.7.0-arm/libgcc/crtstuff.c
|
|
--- gcc-4.7.0/libgcc/crtstuff.c 2011-12-06 21:35:41.000000000 +0000
|
|
+++ gcc-4.7.0-arm/libgcc/crtstuff.c 2012-04-05 20:36:50.000000000 +0100
|
|
@@ -49,7 +49,7 @@
|
|
|
|
/* Target machine header files require this define. */
|
|
#define IN_LIBGCC2
|
|
-
|
|
+#define USED_FOR_TARGET
|
|
/* FIXME: Including auto-host is incorrect, but until we have
|
|
identified the set of defines that need to go into auto-target.h,
|
|
this will have to do. */
|
|
diff -Nbaur gcc-4.7.0/libgcc/Makefile.in gcc-4.7.0-arm/libgcc/Makefile.in
|
|
--- gcc-4.7.0/libgcc/Makefile.in 2011-11-22 03:01:02.000000000 +0000
|
|
+++ gcc-4.7.0-arm/libgcc/Makefile.in 2012-04-05 20:36:17.000000000 +0100
|
|
@@ -500,14 +500,14 @@
|
|
lib2-divmod-o = $(patsubst %,%$(objext),$(LIB2_DIVMOD_FUNCS))
|
|
$(lib2-divmod-o): %$(objext): $(srcdir)/libgcc2.c
|
|
$(gcc_compile) -DL$* -c $< \
|
|
- -fexceptions -fnon-call-exceptions $(vis_hide)
|
|
+ -fno-exceptions -fnon-call-exceptions $(vis_hide)
|
|
libgcc-objects += $(lib2-divmod-o)
|
|
|
|
ifeq ($(enable_shared),yes)
|
|
lib2-divmod-s-o = $(patsubst %,%_s$(objext),$(LIB2_DIVMOD_FUNCS))
|
|
$(lib2-divmod-s-o): %_s$(objext): $(srcdir)/libgcc2.c
|
|
$(gcc_s_compile) -DL$* -c $< \
|
|
- -fexceptions -fnon-call-exceptions
|
|
+ -fno-exceptions -fnon-call-exceptions
|
|
libgcc-s-objects += $(lib2-divmod-s-o)
|
|
endif
|
|
|
|
@@ -810,7 +810,7 @@
|
|
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
|
|
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
|
|
|
|
-c_flags := -fexceptions
|
|
+c_flags := -fno-exceptions
|
|
|
|
ifeq ($(enable_shared),yes)
|
|
|