diff options
Diffstat (limited to 'recipes/gcc')
151 files changed, 15797 insertions, 2029 deletions
diff --git a/recipes/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch b/recipes/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch new file mode 100644 index 0000000000..8a2a4c4040 --- /dev/null +++ b/recipes/gcc/files/gcc-4.3.3-fix-EXTRA_BUILD.patch @@ -0,0 +1,12 @@ +Index: gcc-4.3.3/Makefile.in +=================================================================== +--- gcc-4.3.3.orig/Makefile.in 2010-06-16 18:04:38.379008150 +0400 ++++ gcc-4.3.3/Makefile.in 2010-06-16 18:05:29.115006261 +0400 +@@ -148,6 +148,7 @@ + # built for the build system to override those in BASE_FLAGS_TO_PASSS. + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ LIBCFLAGS="$(CFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. diff --git a/recipes/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch b/recipes/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch new file mode 100644 index 0000000000..b3753364f8 --- /dev/null +++ b/recipes/gcc/files/gcc-4.3.x-fix-EXTRA_BUILD.patch @@ -0,0 +1,13 @@ +Index: gcc-4.3.1/Makefile.in +=================================================================== +--- gcc-4.3.1.orig/Makefile.in 2010-07-07 13:08:44.000000000 +0200 ++++ gcc-4.3.1/Makefile.in 2010-07-07 13:11:59.246625709 +0200 +@@ -149,7 +149,7 @@ + EXTRA_BUILD_FLAGS = \ + CFLAGS="$(CFLAGS_FOR_BUILD)" \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)" \ +- LIBCFLAGS="" ++ LIBCFLAGS="$(CFLAGS_FOR_BUILD)" + + # This is the list of directories to built for the host system. + SUBDIRS = @configdirs@ diff --git a/recipes/gcc/gcc-3.3.3.inc b/recipes/gcc/gcc-3.3.3.inc index b6d7648c5e..695af62b68 100644 --- a/recipes/gcc/gcc-3.3.3.inc +++ b/recipes/gcc/gcc-3.3.3.inc @@ -1,42 +1,42 @@ require gcc-common.inc SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive\ - file://config.sub.patch;patch=1 \ - file://empty6.patch;patch=1 \ - file://pr10392-1-test.patch;patch=1 \ - file://pr10412-1-test.patch;patch=1 \ - file://pr10589-1-test.patch;patch=1 \ - file://pr11162-1-test.patch;patch=1 \ - file://pr11587-1-test.patch;patch=1 \ - file://pr11608.patch;patch=1 \ - file://pr11736-1-test.patch;patch=1 \ - file://pr11864-1-test.patch;patch=1 \ - file://pr12009.patch;patch=1 \ - file://pr12010.patch;patch=1 \ - file://pr13260-test.patch;patch=1 \ - file://pr9365-1-test.patch;patch=1 \ - file://sh-lib1funcs_sizeAndType.patch;patch=1 \ - file://sh-pic-set_fpscr-gcc-3.3.2.patch;patch=1 \ - file://thunk3.patch;patch=1 \ - file://arm-10730.dpatch;patch=1;pnum=0 \ - file://arm-12527.dpatch;patch=1;pnum=0 \ - file://arm-14558.dpatch;patch=1;pnum=0 \ - file://arm-common.dpatch;patch=1;pnum=0 \ - file://arm-gotoff.dpatch;patch=1;pnum=0 \ - file://arm-ldm.dpatch;patch=1;pnum=0 \ - file://arm-tune.patch;patch=1;pnum=0 \ - file://arm-xscale.patch;patch=1;pnum=0 \ - file://arm-14302.patch;patch=1;pnum=0 \ - file://arm-ldm-peephole.patch;patch=1;pnum=0 \ - file://libibery-crosstool.patch;patch=1;pnum=1 \ - file://reverse-compare.patch;patch=1 \ - file://gcc34-15089.patch;patch=1 \ - file://gcc-uclibc-3.3-100-conf.patch;patch=1 \ - file://gcc-uclibc-3.3-110-conf.patch;patch=1 \ - file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \ - file://gcc-uclibc-3.3-200-code.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://bash3.patch;patch=1" + file://config.sub.patch \ + file://empty6.patch \ + file://pr10392-1-test.patch \ + file://pr10412-1-test.patch \ + file://pr10589-1-test.patch \ + file://pr11162-1-test.patch \ + file://pr11587-1-test.patch \ + file://pr11608.patch \ + file://pr11736-1-test.patch \ + file://pr11864-1-test.patch \ + file://pr12009.patch \ + file://pr12010.patch \ + file://pr13260-test.patch \ + file://pr9365-1-test.patch \ + file://sh-lib1funcs_sizeAndType.patch \ + file://sh-pic-set_fpscr-gcc-3.3.2.patch \ + file://thunk3.patch \ + file://arm-10730.dpatch;apply=yes;striplevel=0 \ + file://arm-12527.dpatch;apply=yes;striplevel=0 \ + file://arm-14558.dpatch;apply=yes;striplevel=0 \ + file://arm-common.dpatch;apply=yes;striplevel=0 \ + file://arm-gotoff.dpatch;apply=yes;striplevel=0 \ + file://arm-ldm.dpatch;apply=yes;striplevel=0 \ + file://arm-tune.patch;striplevel=0 \ + file://arm-xscale.patch;striplevel=0 \ + file://arm-14302.patch;striplevel=0 \ + file://arm-ldm-peephole.patch;striplevel=0 \ + file://libibery-crosstool.patch \ + file://reverse-compare.patch \ + file://gcc34-15089.patch \ + file://gcc-uclibc-3.3-100-conf.patch \ + file://gcc-uclibc-3.3-110-conf.patch \ + file://gcc-uclibc-3.3-120-softfloat.patch \ + file://gcc-uclibc-3.3-200-code.patch \ + file://zecke-xgcc-cpp.patch \ + file://bash3.patch" SRC_URI[archive.md5sum] = "3c6cfd9fcd180481063b4058cf6faff2" SRC_URI[archive.sha256sum] = "9ac6618495b7dd2ff0cd50abd76fe3c51287efcc724340687407f9fc250bdc6a" diff --git a/recipes/gcc/gcc-3.3.4.inc b/recipes/gcc/gcc-3.3.4.inc index 0425749c85..1185c65a32 100644 --- a/recipes/gcc/gcc-3.3.4.inc +++ b/recipes/gcc/gcc-3.3.4.inc @@ -1,22 +1,22 @@ require gcc-common.inc -INC_PR = "r11" +INC_PR = "r12" SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://arm-gotoff.dpatch;patch=1;pnum=0 \ - file://arm-ldm.dpatch;patch=1;pnum=0 \ - file://arm-tune.patch;patch=1;pnum=0 \ - file://arm-ldm-peephole.patch;patch=1;pnum=0 \ - file://libibery-crosstool.patch;patch=1;pnum=1 \ - file://reverse-compare.patch;patch=1 \ - file://gcc34-15089.patch;patch=1 \ - file://gcc-uclibc-3.3-100-conf.patch;patch=1 \ - file://gcc-uclibc-3.3-110-conf.patch;patch=1 \ - file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \ - file://gcc-uclibc-3.3-200-code.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-com.patch;patch=1 \ - file://bash3.patch;patch=1" + file://arm-gotoff.dpatch;apply=yes;striplevel=0 \ + file://arm-ldm.dpatch;apply=yes;striplevel=0 \ + file://arm-tune.patch;striplevel=0 \ + file://arm-ldm-peephole.patch;striplevel=0 \ + file://libibery-crosstool.patch \ + file://reverse-compare.patch \ + file://gcc34-15089.patch \ + file://gcc-uclibc-3.3-100-conf.patch \ + file://gcc-uclibc-3.3-110-conf.patch \ + file://gcc-uclibc-3.3-120-softfloat.patch \ + file://gcc-uclibc-3.3-200-code.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-com.patch \ + file://bash3.patch" SRC_URI[archive.md5sum] = "a1c267b34f05c8660b24251865614d8b" SRC_URI[archive.sha256sum] = "3f409186acee739641341e5486e30ea9acecc039452e97a9eb850afbc6c3a691" diff --git a/recipes/gcc/gcc-3.4.3.inc b/recipes/gcc/gcc-3.4.3.inc index 5bb6d31549..cfee4d11cd 100644 --- a/recipes/gcc/gcc-3.4.3.inc +++ b/recipes/gcc/gcc-3.4.3.inc @@ -1,22 +1,22 @@ require gcc-common.inc -INC_PR = "r19" +INC_PR = "r20" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc34-reverse-compare.patch;patch=1 \ - file://gcc34-arm-ldm.patch;patch=1 \ - file://gcc34-arm-ldm-peephole.patch;patch=1 \ - file://gcc34-arm-tune.patch;patch=1 \ - file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \ - file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \ - file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \ - file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \ - file://gcc-3.4.0-arm-bigendian.patch;patch=1 \ - file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \ - file://GCC3.4.0VisibilityPatch.diff;patch=1 \ - file://15342.patch;patch=1 \ - file://always-fixincperm.patch;patch=1 \ - file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 " + file://gcc34-reverse-compare.patch \ + file://gcc34-arm-ldm.patch \ + file://gcc34-arm-ldm-peephole.patch \ + file://gcc34-arm-tune.patch \ + file://gcc-3.4.1-uclibc-100-conf.patch \ + file://gcc-3.4.1-uclibc-200-locale.patch \ + file://gcc-3.4.0-arm-lib1asm.patch \ + file://gcc-3.4.0-arm-nolibfloat.patch \ + file://gcc-3.4.0-arm-bigendian.patch \ + file://gcc-3.4.0-arm-bigendian-uclibc.patch \ + file://GCC3.4.0VisibilityPatch.diff \ + file://15342.patch \ + file://always-fixincperm.patch \ + file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch \ + file://zecke-xgcc-cpp.patch " SRC_URI[archive.md5sum] = "e744b30c834360fccac41eb7269a3011" SRC_URI[archive.sha256sum] = "63dc1c03a107ec73871151bb765da7d5dfc1d699c0d0d6a3d244cf5ccb030913" diff --git a/recipes/gcc/gcc-3.4.4.inc b/recipes/gcc/gcc-3.4.4.inc index daa25fd53d..6d4d266a73 100644 --- a/recipes/gcc/gcc-3.4.4.inc +++ b/recipes/gcc/gcc-3.4.4.inc @@ -1,32 +1,32 @@ require gcc-common.inc -INC_PR = "r15" +INC_PR = "r16" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc34-reverse-compare.patch;patch=1 \ - file://gcc34-arm-ldm.patch;patch=1 \ - file://gcc34-arm-ldm-peephole.patch;patch=1 \ - file://gcc34-arm-tune.patch;patch=1 \ - file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \ - file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \ - file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \ - file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \ - file://gcc-3.4.0-arm-bigendian.patch;patch=1 \ - file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \ - file://GCC3.4.0VisibilityPatch.diff;patch=1 \ - file://15342.patch;patch=1 \ - file://jarfix.patch;patch=1 \ - file://always-fixincperm.patch;patch=1 \ - file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-libgcc2-inhibit-libc.patch;patch=1 \ - file://gcc4-mtune-compat.patch;patch=1 \ - file://gcc34-configure.in.patch;patch=1 \ - file://gcc34-thumb-support.patch;patch=1 \ - file://gcc-cross-fixincl.patch;patch=1 \ - file://gcc-posix-open-fix.patch;patch=1 \ + file://gcc34-reverse-compare.patch \ + file://gcc34-arm-ldm.patch \ + file://gcc34-arm-ldm-peephole.patch \ + file://gcc34-arm-tune.patch \ + file://gcc-3.4.1-uclibc-100-conf.patch \ + file://gcc-3.4.1-uclibc-200-locale.patch \ + file://gcc-3.4.0-arm-lib1asm.patch \ + file://gcc-3.4.0-arm-nolibfloat.patch \ + file://gcc-3.4.0-arm-bigendian.patch \ + file://gcc-3.4.0-arm-bigendian-uclibc.patch \ + file://GCC3.4.0VisibilityPatch.diff \ + file://15342.patch \ + file://jarfix.patch \ + file://always-fixincperm.patch \ + file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-libgcc2-inhibit-libc.patch \ + file://gcc4-mtune-compat.patch \ + file://gcc34-configure.in.patch \ + file://gcc34-thumb-support.patch \ + file://gcc-cross-fixincl.patch \ + file://gcc-posix-open-fix.patch \ " -SRC_URI_append = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append = " file://zecke-no-host-includes.patch " SRC_URI[archive.md5sum] = "b594ff4ea4fbef4ba9220887de713dfe" SRC_URI[archive.sha256sum] = "3444179840638cb8664e8e53604900c4521d29d57785a5091202ee4937d8d0fd" diff --git a/recipes/gcc/gcc-3.4.6.inc b/recipes/gcc/gcc-3.4.6.inc index c6d62e7c19..b6b01e3737 100644 --- a/recipes/gcc/gcc-3.4.6.inc +++ b/recipes/gcc/gcc-3.4.6.inc @@ -1,27 +1,27 @@ require gcc-common.inc SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc34-reverse-compare.patch;patch=1 \ - file://gcc34-arm-ldm.patch;patch=1 \ - file://gcc34-arm-ldm-peephole.patch;patch=1 \ - file://gcc34-arm-tune.patch;patch=1 \ - file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \ - file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \ - file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \ - file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \ - file://gcc-3.4.0-arm-bigendian.patch;patch=1 \ - file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \ - file://GCC3.4.0VisibilityPatch.diff;patch=1 \ - file://jarfix.patch;patch=1 \ - file://always-fixincperm.patch;patch=1 \ - file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-posix-open-fix.patch;patch=1 \ - file://gcc4-mtune-compat.patch;patch=1" + file://gcc34-reverse-compare.patch \ + file://gcc34-arm-ldm.patch \ + file://gcc34-arm-ldm-peephole.patch \ + file://gcc34-arm-tune.patch \ + file://gcc-3.4.1-uclibc-100-conf.patch \ + file://gcc-3.4.1-uclibc-200-locale.patch \ + file://gcc-3.4.0-arm-lib1asm.patch \ + file://gcc-3.4.0-arm-nolibfloat.patch \ + file://gcc-3.4.0-arm-bigendian.patch \ + file://gcc-3.4.0-arm-bigendian-uclibc.patch \ + file://GCC3.4.0VisibilityPatch.diff \ + file://jarfix.patch \ + file://always-fixincperm.patch \ + file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-posix-open-fix.patch \ + file://gcc4-mtune-compat.patch" -SRC_URI += "file://gcc34-configure.in.patch;patch=1" -SRC_URI += "file://gcc34-thumb-support.patch;patch=1" -SRC_URI_append = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI += "file://gcc34-configure.in.patch" +SRC_URI += "file://gcc34-thumb-support.patch" +SRC_URI_append = " file://zecke-no-host-includes.patch " SRC_URI[archive.md5sum] = "4a21ac777d4b5617283ce488b808da7b" SRC_URI[archive.sha256sum] = "7791a601878b765669022b8b3409fba33cc72f9e39340fec8af6d0e6f72dec39" diff --git a/recipes/gcc/gcc-4.0.0.inc b/recipes/gcc/gcc-4.0.0.inc index 835465f807..dd48595212 100644 --- a/recipes/gcc/gcc-4.0.0.inc +++ b/recipes/gcc/gcc-4.0.0.inc @@ -4,9 +4,9 @@ DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc-posix-open-fix.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1" -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " + file://gcc-posix-open-fix.patch \ + file://zecke-xgcc-cpp.patch" +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " # Language Overrides FORTRAN = ",f95" diff --git a/recipes/gcc/gcc-4.0.2.inc b/recipes/gcc/gcc-4.0.2.inc index e4b8380fde..16584ecc89 100644 --- a/recipes/gcc/gcc-4.0.2.inc +++ b/recipes/gcc/gcc-4.0.2.inc @@ -4,24 +4,24 @@ DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc-posix-open-fix.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://GCOV_PREFIX_STRIP-cross-profile_4.1.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 " + file://gcc-posix-open-fix.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://GCOV_PREFIX_STRIP-cross-profile_4.1.patch \ + file://zecke-xgcc-cpp.patch " # uclibc patches below -SRC_URI_append = " file://100-uclibc-conf.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://zecke-host-cpp-ac-hack.patch;patch=1 \ - file://gcc-4.0.2-atmel.0.99.2.patch;patch=1 \ +SRC_URI_append = " file://100-uclibc-conf.patch \ + file://200-uclibc-locale.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://800-arm-bigendian.patch \ + file://zecke-host-cpp-ac-hack.patch \ + file://gcc-4.0.2-atmel.0.99.2.patch \ " -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.1.0.inc b/recipes/gcc/gcc-4.1.0.inc index d23ecc0f2b..d3c5079bc4 100644 --- a/recipes/gcc/gcc-4.1.0.inc +++ b/recipes/gcc/gcc-4.1.0.inc @@ -1,6 +1,6 @@ require gcc-common.inc -INC_PR = "r10" +INC_PR = "r12" DEFAULT_PREFERENCE = "-1" @@ -8,12 +8,14 @@ DEFAULT_PREFERENCE = "-1" FILESPATHPKG .= ":gcc-4.1.1" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://pr34130.patch;patch=1" - -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://zecke-xgcc-cpp.patch \ + file://pr34130.patch \ + file://Makefile.in.patch \ + " + +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF_BASE = "--disable-libssp --disable-libmudflap" EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libssp" diff --git a/recipes/gcc/gcc-4.1.0/Makefile.in.patch b/recipes/gcc/gcc-4.1.0/Makefile.in.patch new file mode 100644 index 0000000000..f6c4bceeb5 --- /dev/null +++ b/recipes/gcc/gcc-4.1.0/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.1.2/gcc/Makefile.in +=================================================================== +--- gcc-4.1.2.orig/gcc/Makefile.in ++++ gcc-4.1.2/gcc/Makefile.in +@@ -548,7 +548,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-unit-at-a-time \ + $(INHIBIT_LIBC_CFLAGS) +@@ -845,9 +845,13 @@ BUILD_VARRAY = build/varray.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) ++ $(CPPINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1379,7 +1383,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.1.1.inc b/recipes/gcc/gcc-4.1.1.inc index 5f10cf016a..88c9d7e69b 100644 --- a/recipes/gcc/gcc-4.1.1.inc +++ b/recipes/gcc/gcc-4.1.1.inc @@ -3,43 +3,44 @@ require gcc-common.inc DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r1" +INC_PR = "r3" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://100-uclibc-conf.patch;patch=1 \ - file://110-arm-eabi.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://801-arm-bigendian-eabi.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://cse.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ - file://gcc-4.1.1-pr13685-1.patch;patch=1 \ - file://gcc-ignore-cache.patch;patch=1 \ - file://gcc-4.1.1-e300cx.patch;patch=1 \ - file://pr34130.patch;patch=1 \ - file://sed-fixinc-backslash.patch;patch=1 \ + file://100-uclibc-conf.patch \ + file://110-arm-eabi.patch \ + file://200-uclibc-locale.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://801-arm-bigendian-eabi.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc41-configure.in.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://cse.patch \ + file://zecke-xgcc-cpp.patch \ + file://unbreak-armv4t.patch \ + file://fix-ICE-in-arm_unwind_emit_set.diff \ + file://gcc-4.1.1-pr13685-1.patch \ + file://gcc-ignore-cache.patch \ + file://gcc-4.1.1-e300cx.patch \ + file://pr34130.patch \ + file://sed-fixinc-backslash.patch \ + file://Makefile.in.patch \ " -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " #This is a dirty hack to get gcc 4.1.1 to compile for glibc AND uclibc on ppc #the patch that is need it to get gcc support soft-floats with glibc, makes gcc fail with uclibc -SRC_URI_append_linux = " file://ppc-gcc-41-20060515.patch;patch=1 \ - file://ppc-sfp-long-double-gcc411-7.patch;patch=1 " +SRC_URI_append_linux = " file://ppc-gcc-41-20060515.patch \ + file://ppc-sfp-long-double-gcc411-7.patch " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.1.1/Makefile.in.patch b/recipes/gcc/gcc-4.1.1/Makefile.in.patch new file mode 100644 index 0000000000..f6c4bceeb5 --- /dev/null +++ b/recipes/gcc/gcc-4.1.1/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.1.2/gcc/Makefile.in +=================================================================== +--- gcc-4.1.2.orig/gcc/Makefile.in ++++ gcc-4.1.2/gcc/Makefile.in +@@ -548,7 +548,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-unit-at-a-time \ + $(INHIBIT_LIBC_CFLAGS) +@@ -845,9 +845,13 @@ BUILD_VARRAY = build/varray.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) ++ $(CPPINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1379,7 +1383,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.1.2.inc b/recipes/gcc/gcc-4.1.2.inc index 1360ce32b8..c102b055f7 100644 --- a/recipes/gcc/gcc-4.1.2.inc +++ b/recipes/gcc/gcc-4.1.2.inc @@ -3,48 +3,57 @@ require gcc-common.inc DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r22" +COMPATIBLE_TARGET_SYS = "." + +INC_PR = "r24" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://100-uclibc-conf.patch;patch=1 \ - file://110-arm-eabi.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ - file://pr34130.patch;patch=1 \ + file://100-uclibc-conf.patch \ + file://110-arm-eabi.patch \ + file://200-uclibc-locale.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc41-configure.in.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://zecke-xgcc-cpp.patch \ + file://unbreak-armv4t.patch \ + file://fix-ICE-in-arm_unwind_emit_set.diff \ + file://cache-amnesia.patch \ + file://gfortran.patch \ + file://gcc-4.0.2-e300c2c3.patch \ + file://pr34130.patch \ + file://Makefile.in.patch \ " -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " + +SRC_URI_append_nios2 = " \ + file://gcc-nios2.patch \ + file://gcc-config-nios2.patch \ + file://nios2-lib-flags.patch \ + " SRC_URI_avr32 = "http://www.angstrom-distribution.org/unstable/sources/gcc-4.1.2-atmel.1.1.0.tar.gz;name=atmel \ -# file://100-uclibc-conf.patch;patch=1 \ -# file://200-uclibc-locale.patch;patch=1 \ -# file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ +# file://100-uclibc-conf.patch \ +# file://200-uclibc-locale.patch \ +# file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://gcc41-configure.in.patch \ + file://zecke-xgcc-cpp.patch \ + file://cache-amnesia.patch \ " do_compile_prepend_avr32() { diff --git a/recipes/gcc/gcc-4.1.2/Makefile.in.patch b/recipes/gcc/gcc-4.1.2/Makefile.in.patch new file mode 100644 index 0000000000..f6c4bceeb5 --- /dev/null +++ b/recipes/gcc/gcc-4.1.2/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.1.2/gcc/Makefile.in +=================================================================== +--- gcc-4.1.2.orig/gcc/Makefile.in ++++ gcc-4.1.2/gcc/Makefile.in +@@ -548,7 +548,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-unit-at-a-time \ + $(INHIBIT_LIBC_CFLAGS) +@@ -845,9 +845,13 @@ BUILD_VARRAY = build/varray.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) ++ $(CPPINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1379,7 +1383,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.1.2/gcc-config-nios2.patch b/recipes/gcc/gcc-4.1.2/gcc-config-nios2.patch new file mode 100644 index 0000000000..1cd5a955d3 --- /dev/null +++ b/recipes/gcc/gcc-4.1.2/gcc-config-nios2.patch @@ -0,0 +1,41 @@ +Index: gcc-4.1.2/config.sub +=================================================================== +--- gcc-4.1.2.orig/config.sub 2010-05-27 15:30:45.069455792 +0200 ++++ gcc-4.1.2/config.sub 2010-05-27 15:36:32.868205558 +0200 +@@ -267,6 +267,7 @@ + | mn10200 | mn10300 \ + | mt \ + | msp430 \ ++ | nios2 \ + | ns16k | ns32k \ + | or32 \ + | pdp10 | pdp11 | pj | pjl \ +@@ -349,6 +350,7 @@ + | mmix-* \ + | mt-* \ + | msp430-* \ ++ | nios2-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ +Index: gcc-4.1.2/gcc/config.gcc +=================================================================== +--- gcc-4.1.2.orig/gcc/config.gcc 2010-05-27 15:30:45.039455207 +0200 ++++ gcc-4.1.2/gcc/config.gcc 2010-05-27 15:33:26.249455379 +0200 +@@ -1597,6 +1597,16 @@ + tm_file="dbxelf.h elfos.h svr4.h ${tm_file}" + tmake_file="${tmake_file} mt/t-mt" + ;; ++nios2-*-*) ++ tm_file="elfos.h ${tm_file}" ++ tmake_file="${tmake_file} nios2/t-nios2" ++ case ${target} in ++ nios2-*-linux*) ++ tm_file="${tm_file} linux.h nios2/linux.h" ++ tmake_file="${tmake_file} nios2/t-linux" ++ ;; ++ esac ++ ;; + ns32k-*-netbsdelf*) + echo "GCC does not yet support the ${target} target"; exit 1 + ;; diff --git a/recipes/gcc/gcc-4.1.2/gcc-nios2.patch b/recipes/gcc/gcc-4.1.2/gcc-nios2.patch new file mode 100644 index 0000000000..80a46b7751 --- /dev/null +++ b/recipes/gcc/gcc-4.1.2/gcc-nios2.patch @@ -0,0 +1,11017 @@ +Index: gcc-4.1.2/gcc/config/nios2/crti.asm +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/crti.asm 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,97 @@ ++/* NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. */ ++/* ++ Copyright (C) 2003 ++ by Jonah Graham (jgraham@altera.com) ++ ++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 with other programs, and to distribute ++those programs 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 another program.) ++ ++This file 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 this program; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. ++ ++ As a special exception, if you link this library with files ++ compiled with GCC to produce an executable, this does not cause ++ the resulting executable to be covered by the GNU General Public License. ++ This exception does not however invalidate any other reasons why ++ the executable file might be covered by the GNU General Public License. ++ ++ ++This file just make a stack frame for the contents of the .fini and ++.init sections. Users may put any desired instructions in those ++sections. ++ ++ ++While technically any code can be put in the init and fini sections ++most stuff will not work other than stuff which obeys the call frame ++and ABI. All the call-preserved registers are saved, the call clobbered ++registers should have been saved by the code calling init and fini. ++ ++See crtstuff.c for an example of code that inserts itself in the ++init and fini sections. ++ ++See crt0.s for the code that calls init and fini. ++*/ ++ ++ .file "crti.asm" ++ ++ .section ".init" ++ .align 2 ++ .global _init ++_init: ++ addi sp, sp, -48 ++ stw ra, 44(sp) ++ stw r23, 40(sp) ++ stw r22, 36(sp) ++ stw r21, 32(sp) ++ stw r20, 28(sp) ++ stw r19, 24(sp) ++ stw r18, 20(sp) ++ stw r17, 16(sp) ++ stw r16, 12(sp) ++ stw fp, 8(sp) ++ addi fp, sp, 8 ++ nextpc r22 ++1: movhi r2, %hiadj(_GLOBAL_OFFSET_TABLE_ - 1b) ++ addi r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b) ++ add r22, r22, r2 ++ ++ ++ .section ".fini" ++ .align 2 ++ .global _fini ++_fini: ++ addi sp, sp, -48 ++ stw ra, 44(sp) ++ stw r23, 40(sp) ++ stw r22, 36(sp) ++ stw r21, 32(sp) ++ stw r20, 28(sp) ++ stw r19, 24(sp) ++ stw r18, 20(sp) ++ stw r17, 16(sp) ++ stw r16, 12(sp) ++ stw fp, 8(sp) ++ addi fp, sp, 8 ++ nextpc r22 ++1: movhi r2, %hiadj(_GLOBAL_OFFSET_TABLE_ - 1b) ++ addi r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b) ++ add r22, r22, r2 ++ ++ +Index: gcc-4.1.2/gcc/config/nios2/crtn.asm +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/crtn.asm 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,71 @@ ++/* NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. */ ++/* ++ Copyright (C) 2003 ++ by Jonah Graham (jgraham@altera.com) ++ ++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 with other programs, and to distribute ++those programs 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 another program.) ++ ++This file 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 this program; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. ++ ++ As a special exception, if you link this library with files ++ compiled with GCC to produce an executable, this does not cause ++ the resulting executable to be covered by the GNU General Public License. ++ This exception does not however invalidate any other reasons why ++ the executable file might be covered by the GNU General Public License. ++ ++ ++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. ++*/ ++ .file "crtn.asm" ++ ++ ++ ++ .section ".init" ++ ldw ra, 44(sp) ++ ldw r23, 40(sp) ++ ldw r22, 36(sp) ++ ldw r21, 32(sp) ++ ldw r20, 28(sp) ++ ldw r19, 24(sp) ++ ldw r18, 20(sp) ++ ldw r17, 16(sp) ++ ldw r16, 12(sp) ++ ldw fp, 8(sp) ++ addi sp, sp, 48 ++ ret ++ ++ .section ".fini" ++ ldw ra, 44(sp) ++ ldw r23, 40(sp) ++ ldw r22, 36(sp) ++ ldw r21, 32(sp) ++ ldw r20, 28(sp) ++ ldw r19, 24(sp) ++ ldw r18, 20(sp) ++ ldw r17, 16(sp) ++ ldw r16, 12(sp) ++ ldw fp, 8(sp) ++ addi sp, sp, 48 ++ ret ++ +Index: gcc-4.1.2/gcc/config/nios2/lib2-divmod-hi.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/lib2-divmod-hi.c 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,133 @@ ++ ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is ++ supposedly valid even though this is a "target" file. */ ++#include "auto-host.h" ++#undef gid_t ++#undef pid_t ++#undef rlim_t ++#undef ssize_t ++#undef uid_t ++#undef vfork ++ ++ ++#include "tconfig.h" ++#include "tsystem.h" ++#include "coretypes.h" ++#include "tm.h" ++ ++ ++/* Don't use `fancy_abort' here even if config.h says to use it. */ ++#ifdef abort ++#undef abort ++#endif ++ ++ ++#ifdef HAVE_GAS_HIDDEN ++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden"))) ++#else ++#define ATTRIBUTE_HIDDEN ++#endif ++ ++#ifndef MIN_UNITS_PER_WORD ++#define MIN_UNITS_PER_WORD UNITS_PER_WORD ++#endif ++ ++#include "libgcc2.h" ++ ++extern HItype __modhi3 (HItype, HItype); ++extern HItype __divhi3 (HItype, HItype); ++extern UHItype __umodhi3 (UHItype, UHItype); ++extern UHItype __udivhi3 (UHItype, UHItype); ++ ++static UHItype udivmodhi4(UHItype, UHItype, word_type); ++ ++static UHItype ++udivmodhi4(UHItype num, UHItype den, word_type modwanted) ++{ ++ UHItype bit = 1; ++ UHItype res = 0; ++ ++ while (den < num && bit && !(den & (1L<<15))) ++ { ++ den <<=1; ++ bit <<=1; ++ } ++ while (bit) ++ { ++ if (num >= den) ++ { ++ num -= den; ++ res |= bit; ++ } ++ bit >>=1; ++ den >>=1; ++ } ++ if (modwanted) return num; ++ return res; ++} ++ ++ ++HItype ++__divhi3 (HItype a, HItype b) ++{ ++ word_type neg = 0; ++ HItype res; ++ ++ if (a < 0) ++ { ++ a = -a; ++ neg = !neg; ++ } ++ ++ if (b < 0) ++ { ++ b = -b; ++ neg = !neg; ++ } ++ ++ res = udivmodhi4 (a, b, 0); ++ ++ if (neg) ++ res = -res; ++ ++ return res; ++} ++ ++ ++HItype ++__modhi3 (HItype a, HItype b) ++{ ++ word_type neg = 0; ++ HItype res; ++ ++ if (a < 0) ++ { ++ a = -a; ++ neg = 1; ++ } ++ ++ if (b < 0) ++ b = -b; ++ ++ res = udivmodhi4 (a, b, 1); ++ ++ if (neg) ++ res = -res; ++ ++ return res; ++} ++ ++ ++UHItype ++__udivhi3 (UHItype a, UHItype b) ++{ ++ return udivmodhi4 (a, b, 0); ++} ++ ++ ++UHItype ++__umodhi3 (UHItype a, UHItype b) ++{ ++ return udivmodhi4 (a, b, 1); ++} ++ +Index: gcc-4.1.2/gcc/config/nios2/lib2-divmod.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/lib2-divmod.c 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,136 @@ ++ ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is ++ supposedly valid even though this is a "target" file. */ ++#include "auto-host.h" ++#undef gid_t ++#undef pid_t ++#undef rlim_t ++#undef ssize_t ++#undef uid_t ++#undef vfork ++ ++ ++#include "tconfig.h" ++#include "tsystem.h" ++#include "coretypes.h" ++#include "tm.h" ++ ++ ++/* Don't use `fancy_abort' here even if config.h says to use it. */ ++#ifdef abort ++#undef abort ++#endif ++ ++ ++#ifdef HAVE_GAS_HIDDEN ++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden"))) ++#else ++#define ATTRIBUTE_HIDDEN ++#endif ++ ++#ifndef MIN_UNITS_PER_WORD ++#define MIN_UNITS_PER_WORD UNITS_PER_WORD ++#endif ++ ++#include "libgcc2.h" ++ ++extern SItype __modsi3 (SItype, SItype); ++extern SItype __divsi3 (SItype, SItype); ++extern SItype __umodsi3 (SItype, SItype); ++extern SItype __udivsi3 (SItype, SItype); ++ ++static USItype udivmodsi4(USItype, USItype, word_type); ++ ++/* 16-bit SI divide and modulo as used in NIOS */ ++ ++ ++static USItype ++udivmodsi4(USItype num, USItype den, word_type modwanted) ++{ ++ USItype bit = 1; ++ USItype res = 0; ++ ++ while (den < num && bit && !(den & (1L<<31))) ++ { ++ den <<=1; ++ bit <<=1; ++ } ++ while (bit) ++ { ++ if (num >= den) ++ { ++ num -= den; ++ res |= bit; ++ } ++ bit >>=1; ++ den >>=1; ++ } ++ if (modwanted) return num; ++ return res; ++} ++ ++ ++SItype ++__divsi3 (SItype a, SItype b) ++{ ++ word_type neg = 0; ++ SItype res; ++ ++ if (a < 0) ++ { ++ a = -a; ++ neg = !neg; ++ } ++ ++ if (b < 0) ++ { ++ b = -b; ++ neg = !neg; ++ } ++ ++ res = udivmodsi4 (a, b, 0); ++ ++ if (neg) ++ res = -res; ++ ++ return res; ++} ++ ++ ++SItype ++__modsi3 (SItype a, SItype b) ++{ ++ word_type neg = 0; ++ SItype res; ++ ++ if (a < 0) ++ { ++ a = -a; ++ neg = 1; ++ } ++ ++ if (b < 0) ++ b = -b; ++ ++ res = udivmodsi4 (a, b, 1); ++ ++ if (neg) ++ res = -res; ++ ++ return res; ++} ++ ++ ++SItype ++__udivsi3 (SItype a, SItype b) ++{ ++ return udivmodsi4 (a, b, 0); ++} ++ ++ ++SItype ++__umodsi3 (SItype a, SItype b) ++{ ++ return udivmodsi4 (a, b, 1); ++} ++ +Index: gcc-4.1.2/gcc/config/nios2/lib2-divtable.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/lib2-divtable.c 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,52 @@ ++ ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is ++ supposedly valid even though this is a "target" file. */ ++#include "auto-host.h" ++#undef gid_t ++#undef pid_t ++#undef rlim_t ++#undef ssize_t ++#undef uid_t ++#undef vfork ++ ++ ++#include "tconfig.h" ++#include "tsystem.h" ++#include "coretypes.h" ++#include "tm.h" ++ ++ ++/* Don't use `fancy_abort' here even if config.h says to use it. */ ++#ifdef abort ++#undef abort ++#endif ++ ++ ++#ifdef HAVE_GAS_HIDDEN ++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden"))) ++#else ++#define ATTRIBUTE_HIDDEN ++#endif ++ ++#include "libgcc2.h" ++ ++UQItype __divsi3_table[] = ++{ ++ 0, 0/1, 0/2, 0/3, 0/4, 0/5, 0/6, 0/7, 0/8, 0/9, 0/10, 0/11, 0/12, 0/13, 0/14, 0/15, ++ 0, 1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, ++ 0, 2/1, 2/2, 2/3, 2/4, 2/5, 2/6, 2/7, 2/8, 2/9, 2/10, 2/11, 2/12, 2/13, 2/14, 2/15, ++ 0, 3/1, 3/2, 3/3, 3/4, 3/5, 3/6, 3/7, 3/8, 3/9, 3/10, 3/11, 3/12, 3/13, 3/14, 3/15, ++ 0, 4/1, 4/2, 4/3, 4/4, 4/5, 4/6, 4/7, 4/8, 4/9, 4/10, 4/11, 4/12, 4/13, 4/14, 4/15, ++ 0, 5/1, 5/2, 5/3, 5/4, 5/5, 5/6, 5/7, 5/8, 5/9, 5/10, 5/11, 5/12, 5/13, 5/14, 5/15, ++ 0, 6/1, 6/2, 6/3, 6/4, 6/5, 6/6, 6/7, 6/8, 6/9, 6/10, 6/11, 6/12, 6/13, 6/14, 6/15, ++ 0, 7/1, 7/2, 7/3, 7/4, 7/5, 7/6, 7/7, 7/8, 7/9, 7/10, 7/11, 7/12, 7/13, 7/14, 7/15, ++ 0, 8/1, 8/2, 8/3, 8/4, 8/5, 8/6, 8/7, 8/8, 8/9, 8/10, 8/11, 8/12, 8/13, 8/14, 8/15, ++ 0, 9/1, 9/2, 9/3, 9/4, 9/5, 9/6, 9/7, 9/8, 9/9, 9/10, 9/11, 9/12, 9/13, 9/14, 9/15, ++ 0, 10/1, 10/2, 10/3, 10/4, 10/5, 10/6, 10/7, 10/8, 10/9, 10/10, 10/11, 10/12, 10/13, 10/14, 10/15, ++ 0, 11/1, 11/2, 11/3, 11/4, 11/5, 11/6, 11/7, 11/8, 11/9, 11/10, 11/11, 11/12, 11/13, 11/14, 11/15, ++ 0, 12/1, 12/2, 12/3, 12/4, 12/5, 12/6, 12/7, 12/8, 12/9, 12/10, 12/11, 12/12, 12/13, 12/14, 12/15, ++ 0, 13/1, 13/2, 13/3, 13/4, 13/5, 13/6, 13/7, 13/8, 13/9, 13/10, 13/11, 13/12, 13/13, 13/14, 13/15, ++ 0, 14/1, 14/2, 14/3, 14/4, 14/5, 14/6, 14/7, 14/8, 14/9, 14/10, 14/11, 14/12, 14/13, 14/14, 14/15, ++ 0, 15/1, 15/2, 15/3, 15/4, 15/5, 15/6, 15/7, 15/8, 15/9, 15/10, 15/11, 15/12, 15/13, 15/14, 15/15, ++}; ++ +Index: gcc-4.1.2/gcc/config/nios2/lib2-mul.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/lib2-mul.c 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,113 @@ ++/* while we are debugging (ie compile outside of gcc build) ++ disable gcc specific headers */ ++#ifndef DEBUG_MULSI3 ++ ++ ++/* We include auto-host.h here to get HAVE_GAS_HIDDEN. This is ++ supposedly valid even though this is a "target" file. */ ++#include "auto-host.h" ++#undef gid_t ++#undef pid_t ++#undef rlim_t ++#undef ssize_t ++#undef uid_t ++#undef vfork ++ ++ ++#include "tconfig.h" ++#include "tsystem.h" ++#include "coretypes.h" ++#include "tm.h" ++ ++ ++/* Don't use `fancy_abort' here even if config.h says to use it. */ ++#ifdef abort ++#undef abort ++#endif ++ ++ ++#ifdef HAVE_GAS_HIDDEN ++#define ATTRIBUTE_HIDDEN __attribute__ ((__visibility__ ("hidden"))) ++#else ++#define ATTRIBUTE_HIDDEN ++#endif ++ ++#ifndef MIN_UNITS_PER_WORD ++#define MIN_UNITS_PER_WORD UNITS_PER_WORD ++#endif ++ ++#include "libgcc2.h" ++ ++#else ++#define SItype int ++#define USItype unsigned int ++#endif ++ ++ ++extern SItype __mulsi3 (SItype, SItype); ++ ++SItype ++__mulsi3 (SItype a, SItype b) ++{ ++ SItype res = 0; ++ USItype cnt = a; ++ ++ while (cnt) ++ { ++ if (cnt & 1) ++ { ++ res += b; ++ } ++ b <<= 1; ++ cnt >>= 1; ++ } ++ ++ return res; ++} ++/* ++TODO: Choose best alternative implementation. ++ ++SItype ++__divsi3 (SItype a, SItype b) ++{ ++ SItype res = 0; ++ USItype cnt = 0; ++ ++ while (cnt < 32) ++ { ++ if (a & (1L << cnt)) ++ { ++ res += b; ++ } ++ b <<= 1; ++ cnt++; ++ } ++ ++ return res; ++} ++*/ ++ ++ ++#ifdef DEBUG_MULSI3 ++ ++int ++main () ++{ ++ int i, j; ++ int error = 0; ++ ++ for (i = -1000; i < 1000; i++) ++ for (j = -1000; j < 1000; j++) ++ { ++ int expect = i * j; ++ int actual = A__divsi3 (i, j); ++ if (expect != actual) ++ { ++ printf ("error: %d * %d = %d not %d\n", i, j, expect, actual); ++ error = 1; ++ } ++ } ++ ++ return error; ++} ++#endif +Index: gcc-4.1.2/gcc/config/nios2/linux-atomic.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/linux-atomic.c 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,302 @@ ++/* Linux-specific atomic operations for Nios II Linux. ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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, 51 Franklin Street, Fifth Floor, Boston, MA ++02110-1301, USA. */ ++ ++#include <asm/unistd.h> ++#define EFAULT 14 ++#define EBUSY 16 ++#define ENOSYS 38 ++ ++/* We implement byte, short and int versions of each atomic operation ++ using the kernel helper defined below. There is no support for ++ 64-bit operations yet. */ ++ ++/* Crash a userspace program with SIGSEV. */ ++#define ABORT_INSTRUCTION asm ("stw zero, 0(zero)") ++ ++/* Kernel helper for compare-and-exchange a 32-bit value. */ ++static inline long ++__kernel_cmpxchg (int oldval, int newval, int *mem) ++{ ++ register int r2 asm ("r2") = __NR_nios2cmpxchg; ++ register unsigned long lws_mem asm("r4") = (unsigned long) (mem); ++ register int lws_old asm("r5") = oldval; ++ register int lws_new asm("r6") = newval; ++ register int err asm ("r7"); ++ asm volatile ("trap" ++ : "=r" (r2), "=r" (err) ++ : "r" (r2), "r" (lws_mem), "r" (lws_old), "r" (lws_new) ++ : "r1", "r3", "r8", "r9", "r10", "r11", "r12", "r13", "r14", ++ "r15", "r29", "memory"); ++ ++ /* If the kernel LWS call succeeded (err == 0), r2 contains the old value ++ from memory. If this value is equal to OLDVAL, the new value was written ++ to memory. If not, return EBUSY. */ ++ if (__builtin_expect (err, 0)) ++ { ++ if(__builtin_expect (r2 == EFAULT || r2 == ENOSYS,0)) ++ ABORT_INSTRUCTION; ++ } ++ else ++ { ++ if (__builtin_expect (r2 != oldval, 0)) ++ r2 = EBUSY; ++ else ++ r2 = 0; ++ } ++ ++ return r2; ++} ++ ++#define HIDDEN __attribute__ ((visibility ("hidden"))) ++ ++/* Big endian masks */ ++#define INVERT_MASK_1 24 ++#define INVERT_MASK_2 16 ++ ++#define MASK_1 0xffu ++#define MASK_2 0xffffu ++ ++#define FETCH_AND_OP_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_fetch_and_##OP##_4 (int *ptr, int val) \ ++ { \ ++ int failure, tmp; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return tmp; \ ++ } ++ ++FETCH_AND_OP_WORD (add, , +) ++FETCH_AND_OP_WORD (sub, , -) ++FETCH_AND_OP_WORD (or, , |) ++FETCH_AND_OP_WORD (and, , &) ++FETCH_AND_OP_WORD (xor, , ^) ++FETCH_AND_OP_WORD (nand, ~, &) ++ ++#define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH ++#define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH ++ ++/* Implement both __sync_<op>_and_fetch and __sync_fetch_and_<op> for ++ subword-sized quantities. */ ++ ++#define SUBWORD_SYNC_OP(OP, PFX_OP, INF_OP, TYPE, WIDTH, RETURN) \ ++ TYPE HIDDEN \ ++ NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE val) \ ++ { \ ++ int *wordptr = (int *) ((unsigned long) ptr & ~3); \ ++ unsigned int mask, shift, oldval, newval; \ ++ int failure; \ ++ \ ++ shift = (((unsigned long) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = ((PFX_OP ((oldval & mask) >> shift) \ ++ INF_OP (unsigned int) val) << shift) & mask; \ ++ newval |= oldval & ~mask; \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (RETURN & mask) >> shift; \ ++ } ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, oldval) ++ ++#define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_##OP##_and_fetch_4 (int *ptr, int val) \ ++ { \ ++ int tmp, failure; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return PFX_OP tmp INF_OP val; \ ++ } ++ ++OP_AND_FETCH_WORD (add, , +) ++OP_AND_FETCH_WORD (sub, , -) ++OP_AND_FETCH_WORD (or, , |) ++OP_AND_FETCH_WORD (and, , &) ++OP_AND_FETCH_WORD (xor, , ^) ++OP_AND_FETCH_WORD (nand, ~, &) ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, newval) ++ ++int HIDDEN ++__sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int actual_oldval, fail; ++ ++ while (1) ++ { ++ actual_oldval = *ptr; ++ ++ if (oldval != actual_oldval) ++ return actual_oldval; ++ ++ fail = __kernel_cmpxchg (actual_oldval, newval, ptr); ++ ++ if (!fail) ++ return oldval; ++ } ++} ++ ++#define SUBWORD_VAL_CAS(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ int *wordptr = (int *)((unsigned long) ptr & ~3), fail; \ ++ unsigned int mask, shift, actual_oldval, actual_newval; \ ++ \ ++ shift = (((unsigned long) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ while (1) \ ++ { \ ++ actual_oldval = *wordptr; \ ++ \ ++ if (((actual_oldval & mask) >> shift) != (unsigned int) oldval) \ ++ return (actual_oldval & mask) >> shift; \ ++ \ ++ actual_newval = (actual_oldval & ~mask) \ ++ | (((unsigned int) newval << shift) & mask); \ ++ \ ++ fail = __kernel_cmpxchg (actual_oldval, actual_newval, \ ++ wordptr); \ ++ \ ++ if (!fail) \ ++ return oldval; \ ++ } \ ++ } ++ ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (char, 1) ++ ++typedef unsigned char bool; ++ ++bool HIDDEN ++__sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int failure = __kernel_cmpxchg (oldval, newval, ptr); ++ return (failure == 0); ++} ++ ++#define SUBWORD_BOOL_CAS(TYPE, WIDTH) \ ++ bool HIDDEN \ ++ __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ TYPE actual_oldval \ ++ = __sync_val_compare_and_swap_##WIDTH (ptr, oldval, newval); \ ++ return (oldval == actual_oldval); \ ++ } ++ ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (char, 1) ++ ++int HIDDEN ++__sync_lock_test_and_set_4 (int *ptr, int val) ++{ ++ int failure, oldval; ++ ++ do { ++ oldval = *ptr; ++ failure = __kernel_cmpxchg (oldval, val, ptr); ++ } while (failure != 0); ++ ++ return oldval; ++} ++ ++#define SUBWORD_TEST_AND_SET(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_lock_test_and_set_##WIDTH (TYPE *ptr, TYPE val) \ ++ { \ ++ int failure; \ ++ unsigned int oldval, newval, shift, mask; \ ++ int *wordptr = (int *) ((unsigned long) ptr & ~3); \ ++ \ ++ shift = (((unsigned long) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = (oldval & ~mask) \ ++ | (((unsigned int) val << shift) & mask); \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (oldval & mask) >> shift; \ ++ } ++ ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (char, 1) ++ ++#define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ ++ void HIDDEN \ ++ __sync_lock_release_##WIDTH (TYPE *ptr) \ ++ { \ ++ *ptr = 0; \ ++ } ++ ++SYNC_LOCK_RELEASE (int, 4) ++SYNC_LOCK_RELEASE (short, 2) ++SYNC_LOCK_RELEASE (char, 1) +Index: gcc-4.1.2/gcc/config/nios2/linux-unwind.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/linux-unwind.h 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,166 @@ ++/* DWARF2 EH unwinding support for NIOS2 Linux. ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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 with other programs, and to distribute ++those programs 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 another program.) ++ ++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, 51 Franklin Street, Fifth Floor, ++Boston, MA 02110-1301, USA. */ ++ ++#ifndef inhibit_libc ++ ++/* Do code reading to identify a signal frame, and set the frame ++ state data appropriately. See unwind-dw2.c for the structs. */ ++ ++#include <signal.h> ++#include <asm/unistd.h> ++ ++/* Unfortunately the kernel headers define the wrong shape of the ++ register file, so we define our own version here. This problem has ++ been reported. */ ++ ++struct nios2_mcontext ++{ ++ int version; /* 2 */ ++ unsigned seq_regs[23]; /* regs 1..23 */ ++ unsigned ra; /* Return address, r31 */ ++ unsigned fp; /* Frame pointer, r28 */ ++ unsigned gp; /* Global pointer, r26 */ ++ unsigned pad1; ++ unsigned ea; /* Exception return address (pc) */ ++ unsigned sp; /* Stack pointer, r27 */ ++ unsigned pad2; ++ /* Note r24, r25, r29, r30 are reserved registers */ ++}; ++ ++/* The kernel's definition of this structure also doesn't match ++ reality. Again, this has been reported. */ ++ ++struct nios2_ucontext { ++ unsigned long uc_flags; ++ unsigned pad1; ++ void *uc_link; ++ stack_t uc_stack; ++ struct siginfo info; ++ struct nios2_mcontext uc_mcontext; ++}; ++ ++#define MD_FALLBACK_FRAME_STATE_FOR nios2_fallback_frame_state ++ ++static _Unwind_Reason_Code ++nios2_fallback_frame_state (struct _Unwind_Context *context, ++ _Unwind_FrameState *fs) ++{ ++ u_int32_t *pc = (u_int32_t *) context->ra; ++ _Unwind_Ptr new_cfa; ++ int i; ++ ++ /* movi r2,(sigreturn/rt_sigreturn) ++ trap */ ++ if (pc[1] != 0x003b683a) /* trap */ ++ return _URC_END_OF_STACK; ++ ++#define NIOS2_REG(NUM,NAME) \ ++ (fs->regs.reg[NUM].how = REG_SAVED_OFFSET, \ ++ fs->regs.reg[NUM].loc.offset = (_Unwind_Ptr)®s->NAME - new_cfa) ++ ++ if (pc[0] == (0x00800004 | (__NR_sigreturn << 6))) ++ { ++ struct sigframe { ++ u_int32_t trampoline[2]; ++ u_int32_t pad1; ++ u_int32_t pad2; ++ struct sigcontext ctx; ++ } *rt_ = context->ra; ++ struct pt_regs *regs = &rt_->ctx.regs; ++ ++ /* The CFA is the user's incoming stack pointer value. */ ++ new_cfa = (_Unwind_Ptr)regs->sp; ++ fs->cfa_how = CFA_REG_OFFSET; ++ fs->cfa_reg = STACK_POINTER_REGNUM; ++ fs->cfa_offset = new_cfa - (_Unwind_Ptr) context->cfa; ++ ++ /* Regs 1..15 */ ++ NIOS2_REG (1, r1); ++ NIOS2_REG (2, r2); ++ NIOS2_REG (3, r3); ++ NIOS2_REG (4, r4); ++ NIOS2_REG (5, r5); ++ NIOS2_REG (6, r6); ++ NIOS2_REG (7, r7); ++ NIOS2_REG (8, r8); ++ NIOS2_REG (9, r9); ++ NIOS2_REG (10, r10); ++ NIOS2_REG (11, r11); ++ NIOS2_REG (12, r12); ++ NIOS2_REG (13, r13); ++ NIOS2_REG (14, r14); ++ NIOS2_REG (15, r15); ++ ++ /* Regs 16..23 are not saved here. They are callee saved or ++ special. */ ++ ++ /* The random registers. */ ++ NIOS2_REG (RA_REGNO, ra); ++ NIOS2_REG (FP_REGNO, fp); ++ NIOS2_REG (GP_REGNO, gp); ++ NIOS2_REG (SIGNAL_UNWIND_RETURN_COLUMN, ea); ++ ++ fs->retaddr_column = SIGNAL_UNWIND_RETURN_COLUMN; ++ ++ return _URC_NO_REASON; ++ } ++ else if (pc[0] == (0x00800004 | (__NR_rt_sigreturn << 6))) ++ { ++ struct sigframe { ++ u_int32_t trampoline[2]; ++ struct nios2_ucontext sigctx; ++ } *rt_ = context->ra; ++ struct nios2_mcontext *regs = &rt_->sigctx.uc_mcontext; ++ ++ if (regs->version != 2) ++ return _URC_END_OF_STACK; ++ ++ /* The CFA is the user's incoming stack pointer value. */ ++ new_cfa = (_Unwind_Ptr)regs->sp; ++ fs->cfa_how = CFA_REG_OFFSET; ++ fs->cfa_reg = STACK_POINTER_REGNUM; ++ fs->cfa_offset = new_cfa - (_Unwind_Ptr) context->cfa; ++ ++ /* The sequential registers. */ ++ for (i = 1; i != 24; i++) ++ NIOS2_REG (i, seq_regs[i-1]); ++ ++ /* The random registers. */ ++ NIOS2_REG (RA_REGNO, ra); ++ NIOS2_REG (FP_REGNO, fp); ++ NIOS2_REG (GP_REGNO, gp); ++ NIOS2_REG (SIGNAL_UNWIND_RETURN_COLUMN, ea); ++ ++ fs->retaddr_column = SIGNAL_UNWIND_RETURN_COLUMN; ++ ++ return _URC_NO_REASON; ++ } ++#undef NIOS2_REG ++ return _URC_END_OF_STACK; ++} ++#endif +Index: gcc-4.1.2/gcc/config/nios2/linux.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/linux.h 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,58 @@ ++/* Definitions for Nios II running Linux-based GNU systems with ++ ELF format. ++ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2008 ++ Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC 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. ++ ++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, 51 Franklin Street, Fifth Floor, ++Boston, MA 02110-1301, USA. */ ++ ++#undef LIB_SPEC ++#define LIB_SPEC "-lc \ ++ %{pthread:-lpthread}" ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++"%{!shared: crt1.o%s} \ ++ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC \ ++"%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" ++ ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ LINUX_TARGET_OS_CPP_BUILTINS(); \ ++ if (flag_pic) \ ++ { \ ++ builtin_define ("__PIC__"); \ ++ builtin_define ("__pic__"); \ ++ } \ ++ } \ ++ while (0) ++ ++#undef SYSROOT_SUFFIX_SPEC ++#define SYSROOT_SUFFIX_SPEC \ ++ "%{EB:/EB}" ++ ++#undef LINK_SPEC ++#define LINK_SPEC LINK_SPEC_ENDIAN \ ++ " %{shared:-shared} \ ++ %{static:-Bstatic} \ ++ %{rdynamic:-export-dynamic}" ++ ++#define MD_UNWIND_SUPPORT "config/nios2/linux-unwind.h" +Index: gcc-4.1.2/gcc/config/nios2/nios2-protos.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/nios2-protos.h 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,92 @@ ++/* NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. */ ++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version. ++ Copyright (C) 2003 Altera ++ Contributed by Jonah Graham (jgraham@altera.com). ++ ++This file is part of GNU CC. ++ ++GNU CC 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. ++ ++GNU CC 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 GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++extern void dump_frame_size (FILE *); ++extern HOST_WIDE_INT compute_frame_size (void); ++extern int nios2_initial_elimination_offset (int, int); ++extern void override_options (void); ++extern void optimization_options (int, int); ++extern int nios2_can_use_return_insn (void); ++extern void expand_prologue (void); ++extern void expand_epilogue (bool); ++extern void function_profiler (FILE *, int); ++extern enum reg_class reg_class_from_constraint (char, const char *); ++extern void nios2_register_target_pragmas (void); ++ ++#ifdef RTX_CODE ++extern int nios2_legitimate_address (rtx, enum machine_mode, int); ++extern int nios2_legitimate_constant (rtx); ++extern void nios2_print_operand (FILE *, rtx, int); ++extern void nios2_print_operand_address (FILE *, rtx); ++extern rtx nios2_legitimize_address (rtx, rtx, enum machine_mode); ++extern bool nios2_legitimate_pic_operand_p (rtx); ++ ++extern int nios2_emit_move_sequence (rtx *, enum machine_mode); ++extern int nios2_emit_expensive_div (rtx *, enum machine_mode); ++extern void nios2_adjust_call_address (rtx *); ++ ++extern rtx nios2_get_return_address (int); ++extern void nios2_set_return_address (rtx, rtx); ++ ++extern void gen_int_relational (enum rtx_code, rtx, rtx, rtx, rtx); ++extern void gen_conditional_move (rtx *, enum machine_mode); ++extern const char *asm_output_opcode (FILE *, const char *); ++ ++/* predicates */ ++extern int call_operand (rtx, enum machine_mode); ++extern int arith_operand (rtx, enum machine_mode); ++extern int uns_arith_operand (rtx, enum machine_mode); ++extern int logical_operand (rtx, enum machine_mode); ++extern int shift_operand (rtx, enum machine_mode); ++extern int reg_or_0_operand (rtx, enum machine_mode); ++extern int equality_op (rtx, enum machine_mode); ++extern int custom_insn_opcode (rtx, enum machine_mode); ++extern int rdwrctl_operand (rtx, enum machine_mode); ++ ++/* custom fpu instruction output */ ++extern const char *nios2_output_fpu_insn_cmps (rtx, enum rtx_code); ++extern const char *nios2_output_fpu_insn_cmpd (rtx, enum rtx_code); ++ ++# ifdef HAVE_MACHINE_MODES ++# if defined TREE_CODE ++extern rtx function_arg (const CUMULATIVE_ARGS *, enum machine_mode, tree, int); ++extern bool nios2_must_pass_in_stack (enum machine_mode, tree); ++extern int function_arg_partial_nregs (const CUMULATIVE_ARGS *, ++ enum machine_mode, tree, int); ++extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, tree, ++ int); ++extern int nios2_function_arg_padding (enum machine_mode, tree); ++extern int nios2_function_arg_padding_upward (enum machine_mode, tree); ++extern int nios2_block_reg_padding (enum machine_mode, tree, int); ++extern int nios2_block_reg_padding_upward (enum machine_mode, tree, int); ++extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int); ++extern void nios2_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, ++ tree, int *, int); ++ ++# endif /* TREE_CODE */ ++# endif /* HAVE_MACHINE_MODES */ ++#endif ++ ++#ifdef TREE_CODE ++extern int nios2_return_in_memory (tree); ++ ++#endif /* TREE_CODE */ +Index: gcc-4.1.2/gcc/config/nios2/nios2.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/nios2.c 2010-06-30 08:52:12.000000000 +0200 +@@ -0,0 +1,4937 @@ ++/* NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. */ ++/* Subroutines for assembler code output for Altera NIOS 2G NIOS2 version. ++ Copyright (C) 2005 Altera ++ Contributed by Jonah Graham (jgraham@altera.com), Will Reece (wreece@altera.com), ++ and Jeff DaSilva (jdasilva@altera.com). ++ ++This file is part of GNU CC. ++ ++GNU CC 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. ++ ++GNU CC 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 GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++ ++#include <stdio.h> ++#include "config.h" ++#include "system.h" ++#include "coretypes.h" ++#include "tm.h" ++#include "rtl.h" ++#include "tree.h" ++#include "tm_p.h" ++#include "regs.h" ++#include "hard-reg-set.h" ++#include "real.h" ++#include "insn-config.h" ++#include "conditions.h" ++#include "output.h" ++#include "insn-attr.h" ++#include "flags.h" ++#include "recog.h" ++#include "expr.h" ++#include "toplev.h" ++#include "basic-block.h" ++#include "function.h" ++#include "integrate.h" ++#include "ggc.h" ++#include "reload.h" ++#include "debug.h" ++#include "optabs.h" ++#include "target.h" ++#include "target-def.h" ++#include "c-pragma.h" /* For c_register_pragma. */ ++#include "cpplib.h" /* For CPP_NUMBER. */ ++#include "c-tree.h" /* For builtin_function. */ ++ ++/* Local prototypes. */ ++static bool nios2_rtx_costs (rtx, int, int, int *); ++ ++static void nios2_asm_function_prologue (FILE *, HOST_WIDE_INT); ++static int nios2_issue_rate (void); ++static struct machine_function *nios2_init_machine_status (void); ++static bool nios2_in_small_data_p (tree); ++static void save_reg (int, HOST_WIDE_INT); ++static void restore_reg (int, HOST_WIDE_INT); ++static unsigned int nios2_section_type_flags (tree, const char *, int); ++ ++/* 0 --> no #pragma seen ++ 1 --> in scope of #pragma reverse_bitfields ++ -1 --> in scope of #pragma no_reverse_bitfields. */ ++static int nios2_pragma_reverse_bitfields_flag = 0; ++static void nios2_pragma_reverse_bitfields (struct cpp_reader *); ++static void nios2_pragma_no_reverse_bitfields (struct cpp_reader *); ++static tree nios2_handle_struct_attribute (tree *, tree, tree, int, bool *); ++static void nios2_insert_attributes (tree, tree *); ++static void nios2_load_pic_register (void); ++static bool nios2_cannot_force_const_mem (rtx); ++bool nios2_legitimate_pic_operand_p (rtx x); ++static rtx nios2_legitimize_pic_address (rtx orig, enum machine_mode mode, ++ rtx reg); ++rtx nios2_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode); ++static void nios2_init_builtins (void); ++static rtx nios2_expand_builtin (tree, rtx, rtx, enum machine_mode, int); ++static bool nios2_function_ok_for_sibcall (tree, tree); ++static int nios2_arg_partial_bytes (CUMULATIVE_ARGS *cum, ++ enum machine_mode mode, tree type, ++ bool named ATTRIBUTE_UNUSED); ++static bool nios2_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ tree type, bool named ATTRIBUTE_UNUSED); ++static void nios2_encode_section_info (tree, rtx, int); ++int nios2_function_arg_padding_upward (enum machine_mode mode, tree type); ++int nios2_block_reg_padding_upward (enum machine_mode mode, tree type, ++ int first ATTRIBUTE_UNUSED); ++static void nios2_output_dwarf_dtprel (FILE *fuke, int size, rtx x); ++ ++/* Initialize the GCC target structure. */ ++#undef TARGET_ASM_FUNCTION_PROLOGUE ++#define TARGET_ASM_FUNCTION_PROLOGUE nios2_asm_function_prologue ++ ++#undef TARGET_DEFAULT_TARGET_FLAGS ++#define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT ++ ++#undef TARGET_SCHED_ISSUE_RATE ++#define TARGET_SCHED_ISSUE_RATE nios2_issue_rate ++#undef TARGET_IN_SMALL_DATA_P ++#define TARGET_IN_SMALL_DATA_P nios2_in_small_data_p ++#undef TARGET_ENCODE_SECTION_INFO ++#define TARGET_ENCODE_SECTION_INFO nios2_encode_section_info ++#undef TARGET_SECTION_TYPE_FLAGS ++#define TARGET_SECTION_TYPE_FLAGS nios2_section_type_flags ++ ++#undef TARGET_INIT_BUILTINS ++#define TARGET_INIT_BUILTINS nios2_init_builtins ++#undef TARGET_EXPAND_BUILTIN ++#define TARGET_EXPAND_BUILTIN nios2_expand_builtin ++ ++#undef TARGET_FUNCTION_OK_FOR_SIBCALL ++#define TARGET_FUNCTION_OK_FOR_SIBCALL nios2_function_ok_for_sibcall ++ ++#undef TARGET_PASS_BY_REFERENCE ++#define TARGET_PASS_BY_REFERENCE nios2_pass_by_reference ++ ++#undef TARGET_ARG_PARTIAL_BYTES ++#define TARGET_ARG_PARTIAL_BYTES nios2_arg_partial_bytes ++ ++#undef TARGET_PROMOTE_PROTOTYPES ++#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true ++ ++#undef TARGET_SETUP_INCOMING_VARARGS ++#define TARGET_SETUP_INCOMING_VARARGS nios2_setup_incoming_varargs ++ ++#undef TARGET_MUST_PASS_IN_STACK ++#define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size ++ ++#undef TARGET_RTX_COSTS ++#define TARGET_RTX_COSTS nios2_rtx_costs ++ ++#undef TARGET_HAVE_TLS ++#define TARGET_HAVE_TLS true ++ ++#undef TARGET_CANNOT_FORCE_CONST_MEM ++#define TARGET_CANNOT_FORCE_CONST_MEM nios2_cannot_force_const_mem ++ ++#undef TARGET_ASM_OUTPUT_DWARF_DTPREL ++#define TARGET_ASM_OUTPUT_DWARF_DTPREL nios2_output_dwarf_dtprel ++ ++const struct attribute_spec nios2_attribute_table[] = ++{ ++ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */ ++ { "reverse_bitfields", 0, 0, false, false, false, ++ nios2_handle_struct_attribute }, ++ { "no_reverse_bitfields", 0, 0, false, false, false, ++ nios2_handle_struct_attribute }, ++ { NULL, 0, 0, false, false, false, NULL } ++}; ++ ++#undef TARGET_ATTRIBUTE_TABLE ++#define TARGET_ATTRIBUTE_TABLE nios2_attribute_table ++ ++#undef TARGET_INSERT_ATTRIBUTES ++#define TARGET_INSERT_ATTRIBUTES nios2_insert_attributes ++ ++/* ??? Might want to redefine TARGET_RETURN_IN_MSB here to handle ++ big-endian case; depends on what ABI we choose. */ ++ ++struct gcc_target targetm = TARGET_INITIALIZER; ++ ++ ++ ++/* Threshold for data being put into the small data/bss area, instead ++ of the normal data area (references to the small data/bss area take ++ 1 instruction, and use the global pointer, references to the normal ++ data area takes 2 instructions). */ ++unsigned HOST_WIDE_INT nios2_section_threshold = NIOS2_DEFAULT_GVALUE; ++ ++/* Structure to be filled in by compute_frame_size with register ++ save masks, and offsets for the current function. */ ++ ++struct nios2_frame_info ++GTY (()) ++{ ++ unsigned HOST_WIDE_INT save_mask; /* Mask of registers to save */ ++ long total_size; /* # bytes that the entire frame takes up. */ ++ long var_size; /* # bytes that variables take up. */ ++ long args_size; /* # bytes that outgoing arguments take up. */ ++ int save_reg_size; /* # bytes needed to store gp regs. */ ++ long save_regs_offset; /* Offset from new sp to store gp registers. */ ++ int initialized; /* != 0 if frame size already calculated. */ ++}; ++ ++struct machine_function ++GTY (()) ++{ ++ ++ /* Current frame information, calculated by compute_frame_size. */ ++ struct nios2_frame_info frame; ++}; ++ ++/* Supported TLS relocations. */ ++ ++enum tls_reloc { ++ TLS_GD16, ++ TLS_LDM16, ++ TLS_LDO16, ++ TLS_IE16, ++ TLS_LE16 ++}; ++ ++#define IS_UNSPEC_TLS(x) ((x)>=UNSPEC_TLS && (x)<=UNSPEC_ADD_TLS_LDO) ++ ++ ++ ++/*************************************** ++ * Register Classes ++ ***************************************/ ++ ++enum reg_class ++reg_class_from_constraint (char chr, const char *str) ++{ ++ if (chr == 'D' && ISDIGIT (str[1]) && ISDIGIT (str[2])) ++ { ++ int regno; ++ int ones = str[2] - '0'; ++ int tens = str[1] - '0'; ++ ++ regno = ones + (10 * tens); ++ if (regno < 0 || regno > 31) ++ return NO_REGS; ++ ++ return D00_REG + regno; ++ } ++ ++ return NO_REGS; ++} ++ ++ ++/*************************************** ++ * Stack Layout and Calling Conventions ++ ***************************************/ ++ ++ ++#define TOO_BIG_OFFSET(X) ((X) > ((1 << 15) - 1)) ++#define TEMP_REG_NUM 8 ++ ++static void ++nios2_asm_function_prologue (FILE *file, HOST_WIDE_INT size ATTRIBUTE_UNUSED) ++{ ++ if (flag_verbose_asm || flag_debug_asm) ++ { ++ compute_frame_size (); ++ dump_frame_size (file); ++ } ++} ++ ++static void ++save_reg (int regno, HOST_WIDE_INT offset) ++{ ++ rtx reg = gen_rtx_REG (SImode, regno); ++ rtx addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); ++ ++ rtx pattern = gen_rtx_SET (SImode, gen_frame_mem (Pmode, addr), reg); ++ rtx insn = emit_insn (pattern); ++ RTX_FRAME_RELATED_P (insn) = 1; ++} ++ ++static void ++restore_reg (int regno, HOST_WIDE_INT offset) ++{ ++ rtx reg = gen_rtx_REG (SImode, regno); ++ rtx addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); ++ ++ rtx pattern = gen_rtx_SET (SImode, reg, gen_frame_mem (Pmode, addr)); ++ emit_insn (pattern); ++} ++ ++ ++void ++expand_prologue (void) ++{ ++ int ix; ++ HOST_WIDE_INT total_frame_size = compute_frame_size (); ++ HOST_WIDE_INT sp_offset; /* offset from base_reg to final stack value */ ++ HOST_WIDE_INT fp_offset; /* offset from base_reg to final fp value */ ++ HOST_WIDE_INT save_offset; ++ rtx insn; ++ unsigned HOST_WIDE_INT save_mask; ++ ++ total_frame_size = compute_frame_size (); ++ ++ /* Decrement the stack pointer */ ++ if (TOO_BIG_OFFSET (total_frame_size)) ++ { ++ /* We need an intermediary point, this will point at the spill ++ block */ ++ insn = emit_insn ++ (gen_add3_insn (stack_pointer_rtx, ++ stack_pointer_rtx, ++ GEN_INT (cfun->machine->frame.save_regs_offset ++ - total_frame_size))); ++ RTX_FRAME_RELATED_P (insn) = 1; ++ ++ fp_offset = 0; ++ sp_offset = -cfun->machine->frame.save_regs_offset; ++ } ++ else if (total_frame_size) ++ { ++ insn = emit_insn (gen_add3_insn (stack_pointer_rtx, ++ stack_pointer_rtx, ++ GEN_INT (-total_frame_size))); ++ RTX_FRAME_RELATED_P (insn) = 1; ++ fp_offset = cfun->machine->frame.save_regs_offset; ++ sp_offset = 0; ++ } ++ else ++ fp_offset = sp_offset = 0; ++ ++ if (current_function_limit_stack) ++ emit_insn (gen_stack_overflow_detect_and_trap ()); ++ ++ save_offset = fp_offset + cfun->machine->frame.save_reg_size; ++ save_mask = cfun->machine->frame.save_mask; ++ ++ for (ix = 32; ix--;) ++ if (save_mask & ((unsigned HOST_WIDE_INT)1 << ix)) ++ { ++ save_offset -= 4; ++ save_reg (ix, save_offset); ++ } ++ ++ if (frame_pointer_needed) ++ { ++ insn = emit_insn (gen_add3_insn (hard_frame_pointer_rtx, ++ stack_pointer_rtx, ++ GEN_INT (fp_offset))); ++ ++ RTX_FRAME_RELATED_P (insn) = 1; ++ } ++ ++ if (sp_offset) ++ { ++ rtx tmp = gen_rtx_REG (Pmode, TEMP_REG_NUM); ++ emit_insn (gen_rtx_SET (Pmode, tmp, GEN_INT (sp_offset))); ++ ++ insn = emit_insn (gen_add3_insn (stack_pointer_rtx, stack_pointer_rtx, ++ tmp)); ++ if (!frame_pointer_needed) ++ { ++ /* Attache a note indicating what just happened */ ++ rtx note = gen_rtx_SET (Pmode, stack_pointer_rtx, ++ gen_rtx_PLUS (Pmode, stack_pointer_rtx, ++ GEN_INT (sp_offset))); ++ REG_NOTES (insn) = alloc_EXPR_LIST (REG_FRAME_RELATED_EXPR, ++ note, REG_NOTES (insn)); ++ RTX_FRAME_RELATED_P (insn) = 1; ++ } ++ if (current_function_limit_stack) ++ emit_insn (gen_stack_overflow_detect_and_trap ()); ++ } ++ ++ /* Load the PIC register if needed. */ ++ if (current_function_uses_pic_offset_table) ++ nios2_load_pic_register (); ++ ++ /* If we are profiling, make sure no instructions are scheduled before ++ the call to mcount. */ ++ if (current_function_profile) ++ emit_insn (gen_blockage ()); ++} ++ ++void ++expand_epilogue (bool sibcall_p) ++{ ++ rtx insn; ++ int ix; ++ HOST_WIDE_INT total_frame_size = compute_frame_size (); ++ unsigned HOST_WIDE_INT save_mask; ++ HOST_WIDE_INT sp_adjust; ++ HOST_WIDE_INT save_offset; ++ ++ if (!sibcall_p && nios2_can_use_return_insn ()) ++ { ++ insn = emit_jump_insn (gen_return ()); ++ return; ++ } ++ ++ emit_insn (gen_blockage ()); ++ ++ if (frame_pointer_needed) ++ { ++ /* Recover the stack pointer. */ ++ emit_insn (gen_rtx_SET (Pmode, stack_pointer_rtx, ++ hard_frame_pointer_rtx)); ++ save_offset = 0; ++ sp_adjust = total_frame_size - cfun->machine->frame.save_regs_offset; ++ } ++ else if (TOO_BIG_OFFSET (total_frame_size)) ++ { ++ rtx tmp = gen_rtx_REG (Pmode, TEMP_REG_NUM); ++ ++ emit_insn ++ (gen_rtx_SET ++ (Pmode, tmp, GEN_INT (cfun->machine->frame.save_regs_offset))); ++ emit_insn (gen_add3_insn (stack_pointer_rtx, stack_pointer_rtx, tmp)); ++ save_offset = 0; ++ sp_adjust = total_frame_size - cfun->machine->frame.save_regs_offset; ++ } ++ else ++ { ++ save_offset = cfun->machine->frame.save_regs_offset; ++ sp_adjust = total_frame_size; ++ } ++ ++ save_mask = cfun->machine->frame.save_mask; ++ save_offset += cfun->machine->frame.save_reg_size; ++ ++ for (ix = 32; ix--;) ++ if (save_mask & ((unsigned HOST_WIDE_INT)1 << ix)) ++ { ++ save_offset -= 4; ++ restore_reg (ix, save_offset); ++ } ++ ++ if (sp_adjust) ++ emit_insn (gen_add3_insn (stack_pointer_rtx, stack_pointer_rtx, ++ GEN_INT (sp_adjust))); ++ ++ /* Add in the __builtin_eh_return stack adjustment. */ ++ if (current_function_calls_eh_return) ++ emit_insn (gen_add3_insn (stack_pointer_rtx, ++ stack_pointer_rtx, ++ EH_RETURN_STACKADJ_RTX)); ++ ++ if (!sibcall_p) ++ insn = emit_jump_insn ++ (gen_return_from_epilogue (gen_rtx_REG (Pmode, RA_REGNO))); ++} ++ ++/* Implement RETURN_ADDR_RTX. Note, we do not support moving ++ back to a previous frame. */ ++rtx ++nios2_get_return_address (int count) ++{ ++ if (count != 0) ++ return const0_rtx; ++ ++ return get_hard_reg_initial_val (Pmode, RA_REGNO); ++} ++ ++/* Emit code to change the current function's return address to ++ ADDRESS. SCRATCH is available as a scratch register, if needed. ++ ADDRESS and SCRATCH are both word-mode GPRs. */ ++ ++void ++nios2_set_return_address (rtx address, rtx scratch) ++{ ++ compute_frame_size (); ++ if ((cfun->machine->frame.save_mask >> RA_REGNO) & 1) ++ { ++ HOST_WIDE_INT offset = cfun->machine->frame.save_reg_size - 4; ++ rtx base; ++ ++ if (frame_pointer_needed) ++ base = hard_frame_pointer_rtx; ++ else ++ { ++ base = stack_pointer_rtx; ++ offset += cfun->machine->frame.save_regs_offset; ++ ++ if (TOO_BIG_OFFSET (offset)) ++ { ++ emit_insn (gen_rtx_SET (Pmode, scratch, GEN_INT (offset))); ++ emit_insn (gen_add3_insn (scratch, scratch, base)); ++ base = scratch; ++ offset = 0; ++ } ++ } ++ if (offset) ++ base = gen_rtx_PLUS (Pmode, base, GEN_INT (offset)); ++ emit_insn (gen_rtx_SET (Pmode, gen_rtx_MEM (Pmode, base), address)); ++ } ++ else ++ emit_insn (gen_rtx_SET (Pmode, gen_rtx_REG (Pmode, RA_REGNO), address)); ++} ++ ++bool ++nios2_function_ok_for_sibcall (tree a ATTRIBUTE_UNUSED, tree b ATTRIBUTE_UNUSED) ++{ ++ return true; ++} ++ ++ ++ ++ ++ ++/* ----------------------- * ++ * Profiling ++ * ----------------------- */ ++ ++void ++function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) ++{ ++ fprintf (file, "\tmov\tr8, ra\n"); ++ if (flag_pic) ++ { ++ fprintf (file, "\tnextpc\tr2\n"); ++ fprintf (file, "\t1: movhi\tr3, %%hiadj(_GLOBAL_OFFSET_TABLE_ - 1b)\n"); ++ fprintf (file, "\taddi\tr3, r3, %%lo(_GLOBAL_OFFSET_TABLE_ - 1b)\n"); ++ fprintf (file, "\tadd\tr2, r2, r3\n"); ++ fprintf (file, "\tldw\tr2, %%call(_mcount)(r2)\n"); ++ fprintf (file, "\tcallr\tr2\n"); ++ } ++ else ++ fprintf (file, "\tcall\t_mcount\n"); ++ fprintf (file, "\tmov\tra, r8\n"); ++} ++ ++ ++/*************************************** ++ * Stack Layout ++ ***************************************/ ++ ++ ++void ++dump_frame_size (FILE *file) ++{ ++ fprintf (file, "\t%s Current Frame Info\n", ASM_COMMENT_START); ++ ++ fprintf (file, "\t%s total_size = %ld\n", ASM_COMMENT_START, ++ cfun->machine->frame.total_size); ++ fprintf (file, "\t%s var_size = %ld\n", ASM_COMMENT_START, ++ cfun->machine->frame.var_size); ++ fprintf (file, "\t%s args_size = %ld\n", ASM_COMMENT_START, ++ cfun->machine->frame.args_size); ++ fprintf (file, "\t%s save_reg_size = %d\n", ASM_COMMENT_START, ++ cfun->machine->frame.save_reg_size); ++ fprintf (file, "\t%s initialized = %d\n", ASM_COMMENT_START, ++ cfun->machine->frame.initialized); ++ fprintf (file, "\t%s save_regs_offset = %ld\n", ASM_COMMENT_START, ++ cfun->machine->frame.save_regs_offset); ++ fprintf (file, "\t%s current_function_is_leaf = %d\n", ASM_COMMENT_START, ++ current_function_is_leaf); ++ fprintf (file, "\t%s frame_pointer_needed = %d\n", ASM_COMMENT_START, ++ frame_pointer_needed); ++ fprintf (file, "\t%s pretend_args_size = %d\n", ASM_COMMENT_START, ++ current_function_pretend_args_size); ++ ++} ++ ++/* Return true if RENOG should be saved in a prologue. */ ++ ++static bool ++save_reg_p (unsigned regno) ++{ ++ gcc_assert (GP_REGNO_P (regno)); ++ ++ if (regs_ever_live[regno] && !call_used_regs[regno]) ++ return true; ++ ++ if (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed) ++ return true; ++ ++ if (regno == PIC_OFFSET_TABLE_REGNUM ++ && current_function_uses_pic_offset_table) ++ return true; ++ ++ if (regno == RA_REGNO && regs_ever_live[RA_REGNO]) ++ return true; ++ ++ return false; ++} ++ ++/* Return the bytes needed to compute the frame pointer from the current ++ stack pointer. */ ++ ++HOST_WIDE_INT ++compute_frame_size (void) ++{ ++ unsigned int regno; ++ HOST_WIDE_INT var_size; /* # of var. bytes allocated */ ++ HOST_WIDE_INT total_size; /* # bytes that the entire frame takes up. */ ++ HOST_WIDE_INT save_reg_size; /* # bytes needed to store callee save regs. */ ++ HOST_WIDE_INT out_args_size; /* # bytes needed for outgoing args. */ ++ unsigned HOST_WIDE_INT save_mask = 0; ++ ++ if (cfun->machine->frame.initialized) ++ return cfun->machine->frame.total_size; ++ ++ save_reg_size = 0; ++ var_size = STACK_ALIGN (get_frame_size ()); ++ out_args_size = STACK_ALIGN (current_function_outgoing_args_size); ++ ++ total_size = var_size + out_args_size; ++ ++ /* Calculate space needed for gp registers. */ ++ for (regno = 0; GP_REGNO_P (regno); regno++) ++ if (save_reg_p (regno)) ++ { ++ save_mask |= (unsigned HOST_WIDE_INT)1 << regno; ++ save_reg_size += 4; ++ } ++ ++ /* If we call eh_return, we need to save the EH data registers. */ ++ if (current_function_calls_eh_return) ++ { ++ unsigned i; ++ unsigned r; ++ ++ for (i = 0; (r = EH_RETURN_DATA_REGNO (i)) != INVALID_REGNUM; i++) ++ if (!(save_mask & (1 << r))) ++ { ++ save_mask |= 1 << r; ++ save_reg_size += 4; ++ } ++ } ++ ++ save_reg_size = STACK_ALIGN (save_reg_size); ++ total_size += save_reg_size; ++ ++ total_size += STACK_ALIGN (current_function_pretend_args_size); ++ ++ /* Save other computed information. */ ++ cfun->machine->frame.save_mask = save_mask; ++ cfun->machine->frame.total_size = total_size; ++ cfun->machine->frame.var_size = var_size; ++ cfun->machine->frame.args_size = out_args_size; ++ cfun->machine->frame.save_reg_size = save_reg_size; ++ cfun->machine->frame.initialized = reload_completed; ++ ++ cfun->machine->frame.save_regs_offset = out_args_size + var_size; ++ ++ return total_size; ++} ++ ++ ++int ++nios2_initial_elimination_offset (int from, int to) ++{ ++ int offset; ++ ++ compute_frame_size (); ++ ++ /* Set OFFSET to the offset from the stack pointer. */ ++ switch (from) ++ { ++ case FRAME_POINTER_REGNUM: ++ offset = cfun->machine->frame.args_size; ++ break; ++ ++ case ARG_POINTER_REGNUM: ++ offset = cfun->machine->frame.total_size; ++ offset -= current_function_pretend_args_size; ++ break; ++ ++ default: ++ gcc_unreachable (); ++ } ++ ++ /* If we are asked for the frame pointer offset, then adjust OFFSET ++ by the offset from the frame pointer to the stack pointer. */ ++ if (to == HARD_FRAME_POINTER_REGNUM) ++ offset -= cfun->machine->frame.save_regs_offset; ++ ++ return offset; ++} ++ ++/* Return nonzero if this function is known to have a null epilogue. ++ This allows the optimizer to omit jumps to jumps if no stack ++ was created. */ ++int ++nios2_can_use_return_insn (void) ++{ ++ if (!reload_completed) ++ return 0; ++ ++ if (regs_ever_live[RA_REGNO] || current_function_profile) ++ return 0; ++ ++ if (cfun->machine->frame.initialized) ++ return cfun->machine->frame.total_size == 0; ++ ++ return compute_frame_size () == 0; ++} ++ ++ ++ ++ ++ ++/* Try to take a bit of tedium out of the __builtin_custom_<blah> ++ builtin functions, too. */ ++ ++#define NIOS2_FOR_ALL_CUSTOM_BUILTINS \ ++ NIOS2_DO_BUILTIN (N, n, n ) \ ++ NIOS2_DO_BUILTIN (NI, ni, nX ) \ ++ NIOS2_DO_BUILTIN (NF, nf, nX ) \ ++ NIOS2_DO_BUILTIN (NP, np, nX ) \ ++ NIOS2_DO_BUILTIN (NII, nii, nXX ) \ ++ NIOS2_DO_BUILTIN (NIF, nif, nXX ) \ ++ NIOS2_DO_BUILTIN (NIP, nip, nXX ) \ ++ NIOS2_DO_BUILTIN (NFI, nfi, nXX ) \ ++ NIOS2_DO_BUILTIN (NFF, nff, nXX ) \ ++ NIOS2_DO_BUILTIN (NFP, nfp, nXX ) \ ++ NIOS2_DO_BUILTIN (NPI, npi, nXX ) \ ++ NIOS2_DO_BUILTIN (NPF, npf, nXX ) \ ++ NIOS2_DO_BUILTIN (NPP, npp, nXX ) \ ++ NIOS2_DO_BUILTIN (IN, in, Xn ) \ ++ NIOS2_DO_BUILTIN (INI, ini, XnX ) \ ++ NIOS2_DO_BUILTIN (INF, inf, XnX ) \ ++ NIOS2_DO_BUILTIN (INP, inp, XnX ) \ ++ NIOS2_DO_BUILTIN (INII, inii, XnXX ) \ ++ NIOS2_DO_BUILTIN (INIF, inif, XnXX ) \ ++ NIOS2_DO_BUILTIN (INIP, inip, XnXX ) \ ++ NIOS2_DO_BUILTIN (INFI, infi, XnXX ) \ ++ NIOS2_DO_BUILTIN (INFF, inff, XnXX ) \ ++ NIOS2_DO_BUILTIN (INFP, infp, XnXX ) \ ++ NIOS2_DO_BUILTIN (INPI, inpi, XnXX ) \ ++ NIOS2_DO_BUILTIN (INPF, inpf, XnXX ) \ ++ NIOS2_DO_BUILTIN (INPP, inpp, XnXX ) \ ++ NIOS2_DO_BUILTIN (FN, fn, Xn ) \ ++ NIOS2_DO_BUILTIN (FNI, fni, XnX ) \ ++ NIOS2_DO_BUILTIN (FNF, fnf, XnX ) \ ++ NIOS2_DO_BUILTIN (FNP, fnp, XnX ) \ ++ NIOS2_DO_BUILTIN (FNII, fnii, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNIF, fnif, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNIP, fnip, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNFI, fnfi, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNFF, fnff, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNFP, fnfp, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNPI, fnpi, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNPF, fnpf, XnXX ) \ ++ NIOS2_DO_BUILTIN (FNPP, fnpp, XnXX ) \ ++ NIOS2_DO_BUILTIN (PN, pn, Xn ) \ ++ NIOS2_DO_BUILTIN (PNI, pni, XnX ) \ ++ NIOS2_DO_BUILTIN (PNF, pnf, XnX ) \ ++ NIOS2_DO_BUILTIN (PNP, pnp, XnX ) \ ++ NIOS2_DO_BUILTIN (PNII, pnii, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNIF, pnif, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNIP, pnip, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNFI, pnfi, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNFF, pnff, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNFP, pnfp, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNPI, pnpi, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNPF, pnpf, XnXX ) \ ++ NIOS2_DO_BUILTIN (PNPP, pnpp, XnXX ) ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++static const char *NIOS2_CONCAT (nios2_output_fpu_insn_, insn) (rtx); \ ++static void NIOS2_CONCAT (nios2_pragma_, insn) (struct cpp_reader *); \ ++static void NIOS2_CONCAT (nios2_pragma_no_, insn) (struct cpp_reader *); \ ++int NIOS2_CONCAT (nios2_custom_, opt) = -1; ++NIOS2_FOR_ALL_FPU_INSNS ++ ++nios2_fpu_info nios2_fpu_insns[nios2_fpu_max_insn] = { ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ { NIOS2_STRINGIFY (opt), \ ++ NIOS2_STRINGIFY (insn), \ ++ NIOS2_STRINGIFY (args), \ ++ -1, \ ++ NIOS2_CONCAT (nios2_output_fpu_insn_, insn), \ ++ "custom_" NIOS2_STRINGIFY (opt), \ ++ NIOS2_CONCAT (nios2_pragma_, insn), \ ++ "no_custom_" NIOS2_STRINGIFY (opt), \ ++ NIOS2_CONCAT (nios2_pragma_no_, insn), \ ++ 0, \ ++ 0, \ ++ 0, \ ++ 0, \ ++ 0, \ ++ &NIOS2_CONCAT (nios2_custom_, opt) }, ++ NIOS2_FOR_ALL_FPU_INSNS ++}; ++ ++const char *nios2_custom_fpu_cfg_string; ++ ++static const char *builtin_custom_seen[256]; ++ ++static void ++nios2_custom_switch (int parameter, int *value, const char *opt) ++{ ++ /* We only document values from 0-255, but we secretly allow -1 so ++ * that the -mno-custom-<opt> switches work. */ ++ if (parameter != -1) ++ { ++ if (parameter < -1 || parameter > 255) ++ error ("switch `-mcustom-%s' value %ld must be between 0 and 255", ++ opt, parameter); ++ *value = (int)parameter; ++ } ++} ++ ++static void ++nios2_custom_check_insns (int is_pragma) ++{ ++ int i; ++ int has_double = 0; ++ int errors = 0; ++ const char *ns[256]; ++ int ps[256]; ++ ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ if (nios2_fpu_insns[i].is_double && nios2_fpu_insns[i].N >= 0) ++ has_double = 1; ++ ++ if (has_double) ++ { ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ { ++ if (nios2_fpu_insns[i].needed_by_double ++ && nios2_fpu_insns[i].N < 0) ++ { ++ if (is_pragma) ++ error ("either switch `-mcustom-%s' or `#pragma custom_%s' is " ++ "required for double precision floating point", ++ nios2_fpu_insns[i].option, ++ nios2_fpu_insns[i].option); ++ else ++ error ("switch `-mcustom-%s' is required for double precision " ++ "floating point", ++ nios2_fpu_insns[i].option); ++ errors = 1; ++ } ++ } ++ } ++ ++ /* Warn if the user has certain exotic operations that won't get used ++ without -funsafe-math-optimizations, See expand_builtin () in ++ bulitins.c. */ ++ if (!flag_unsafe_math_optimizations) ++ { ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ { ++ if (nios2_fpu_insns[i].needs_unsafe && nios2_fpu_insns[i].N >= 0) ++ { ++ warning (0, "%s%s' has no effect unless " ++ "-funsafe-math-optimizations is specified", ++ is_pragma ? "`#pragma custom_" : "switch `-mcustom-", ++ nios2_fpu_insns[i].option); ++ /* Just one warning per function per compilation unit, please. */ ++ nios2_fpu_insns[i].needs_unsafe = 0; ++ } ++ } ++ } ++ ++ /* Warn if the user is trying to use -mcustom-fmins et. al, that won't ++ get used without -ffinite-math-only. See fold in fold () in ++ fold-const.c. */ ++ if (!flag_finite_math_only) ++ { ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ { ++ if (nios2_fpu_insns[i].needs_finite && nios2_fpu_insns[i].N >= 0) ++ { ++ warning (0, "%s%s' has no effect unless -ffinite-math-only " ++ "is specified", ++ is_pragma ? "`#pragma custom_" : "switch `-mcustom-", ++ nios2_fpu_insns[i].option); ++ /* Just one warning per function per compilation unit, please. */ ++ nios2_fpu_insns[i].needs_finite = 0; ++ } ++ } ++ } ++ ++ /* Warn the user about double precision divide braindamage until we ++ can fix it properly. See the RDIV_EXPR case of expand_expr_real in ++ expr.c. */ ++ { ++ static int warned = 0; ++ if (flag_unsafe_math_optimizations ++ && !optimize_size ++ && nios2_fpu_insns[nios2_fpu_divdf3].N >= 0 ++ && !warned) ++ { ++ warning (0, "%s%s' behaves poorly without -Os", ++ is_pragma ? "`#pragma custom_" : "switch `-mcustom-", ++ nios2_fpu_insns[nios2_fpu_divdf3].option); ++ warned = 1; ++ } ++ } ++ ++ /* The following bit of voodoo is lifted from the generated file ++ insn-opinit.c: to allow #pragmas to work properly, we have to tweak ++ the optab_table manually -- it only gets initialized once after the ++ switches are handled and before any #pragmas are seen. */ ++ if (is_pragma) ++ { ++ /* Only do this if the optabs have already been defined, not ++ when we're handling command line switches. */ ++ addv_optab->handlers[SFmode].insn_code = ++ add_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ addv_optab->handlers[DFmode].insn_code = ++ add_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ subv_optab->handlers[SFmode].insn_code = ++ sub_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ subv_optab->handlers[DFmode].insn_code = ++ sub_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ smulv_optab->handlers[SFmode].insn_code = ++ smul_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ smulv_optab->handlers[DFmode].insn_code = ++ smul_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ sdiv_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ sdiv_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ negv_optab->handlers[SFmode].insn_code = ++ neg_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ negv_optab->handlers[DFmode].insn_code = ++ neg_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ smin_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ smin_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ smax_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ smax_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ absv_optab->handlers[SFmode].insn_code = ++ abs_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ absv_optab->handlers[DFmode].insn_code = ++ abs_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ sqrt_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ sqrt_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ cos_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ cos_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ sin_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ sin_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ tan_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ tan_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ atan_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ atan_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ exp_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ exp_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ log_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ log_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ sfloat_optab->handlers[SFmode][SImode].insn_code = CODE_FOR_nothing; ++ sfloat_optab->handlers[DFmode][SImode].insn_code = CODE_FOR_nothing; ++ ufloat_optab->handlers[SFmode][SImode].insn_code = CODE_FOR_nothing; ++ ufloat_optab->handlers[DFmode][SImode].insn_code = CODE_FOR_nothing; ++ sfix_optab->handlers[SImode][SFmode].insn_code = CODE_FOR_nothing; ++ sfix_optab->handlers[SImode][DFmode].insn_code = CODE_FOR_nothing; ++ ufix_optab->handlers[SImode][SFmode].insn_code = CODE_FOR_nothing; ++ ufix_optab->handlers[SImode][DFmode].insn_code = CODE_FOR_nothing; ++ sext_optab->handlers[DFmode][SFmode].insn_code = CODE_FOR_nothing; ++ trunc_optab->handlers[SFmode][DFmode].insn_code = CODE_FOR_nothing; ++ cmp_optab->handlers[SFmode].insn_code = CODE_FOR_nothing; ++ cmp_optab->handlers[DFmode].insn_code = CODE_FOR_nothing; ++ ++ if (HAVE_addsf3) ++ addv_optab->handlers[SFmode].insn_code = ++ add_optab->handlers[SFmode].insn_code = CODE_FOR_addsf3; ++ if (HAVE_adddf3) ++ addv_optab->handlers[DFmode].insn_code = ++ add_optab->handlers[DFmode].insn_code = CODE_FOR_adddf3; ++ if (HAVE_subsf3) ++ subv_optab->handlers[SFmode].insn_code = ++ sub_optab->handlers[SFmode].insn_code = CODE_FOR_subsf3; ++ if (HAVE_subdf3) ++ subv_optab->handlers[DFmode].insn_code = ++ sub_optab->handlers[DFmode].insn_code = CODE_FOR_subdf3; ++ if (HAVE_mulsf3) ++ smulv_optab->handlers[SFmode].insn_code = ++ smul_optab->handlers[SFmode].insn_code = CODE_FOR_mulsf3; ++ if (HAVE_muldf3) ++ smulv_optab->handlers[DFmode].insn_code = ++ smul_optab->handlers[DFmode].insn_code = CODE_FOR_muldf3; ++ if (HAVE_divsf3) ++ sdiv_optab->handlers[SFmode].insn_code = CODE_FOR_divsf3; ++ if (HAVE_divdf3) ++ sdiv_optab->handlers[DFmode].insn_code = CODE_FOR_divdf3; ++ if (HAVE_negsf2) ++ negv_optab->handlers[SFmode].insn_code = ++ neg_optab->handlers[SFmode].insn_code = CODE_FOR_negsf2; ++ if (HAVE_negdf2) ++ negv_optab->handlers[DFmode].insn_code = ++ neg_optab->handlers[DFmode].insn_code = CODE_FOR_negdf2; ++ if (HAVE_minsf3) ++ smin_optab->handlers[SFmode].insn_code = CODE_FOR_minsf3; ++ if (HAVE_mindf3) ++ smin_optab->handlers[DFmode].insn_code = CODE_FOR_mindf3; ++ if (HAVE_maxsf3) ++ smax_optab->handlers[SFmode].insn_code = CODE_FOR_maxsf3; ++ if (HAVE_maxdf3) ++ smax_optab->handlers[DFmode].insn_code = CODE_FOR_maxdf3; ++ if (HAVE_abssf2) ++ absv_optab->handlers[SFmode].insn_code = ++ abs_optab->handlers[SFmode].insn_code = CODE_FOR_abssf2; ++ if (HAVE_absdf2) ++ absv_optab->handlers[DFmode].insn_code = ++ abs_optab->handlers[DFmode].insn_code = CODE_FOR_absdf2; ++ if (HAVE_sqrtsf2) ++ sqrt_optab->handlers[SFmode].insn_code = CODE_FOR_sqrtsf2; ++ if (HAVE_sqrtdf2) ++ sqrt_optab->handlers[DFmode].insn_code = CODE_FOR_sqrtdf2; ++ if (HAVE_cossf2) ++ cos_optab->handlers[SFmode].insn_code = CODE_FOR_cossf2; ++ if (HAVE_cosdf2) ++ cos_optab->handlers[DFmode].insn_code = CODE_FOR_cosdf2; ++ if (HAVE_sinsf2) ++ sin_optab->handlers[SFmode].insn_code = CODE_FOR_sinsf2; ++ if (HAVE_sindf2) ++ sin_optab->handlers[DFmode].insn_code = CODE_FOR_sindf2; ++ if (HAVE_tansf2) ++ tan_optab->handlers[SFmode].insn_code = CODE_FOR_tansf2; ++ if (HAVE_tandf2) ++ tan_optab->handlers[DFmode].insn_code = CODE_FOR_tandf2; ++ if (HAVE_atansf2) ++ atan_optab->handlers[SFmode].insn_code = CODE_FOR_atansf2; ++ if (HAVE_atandf2) ++ atan_optab->handlers[DFmode].insn_code = CODE_FOR_atandf2; ++ if (HAVE_expsf2) ++ exp_optab->handlers[SFmode].insn_code = CODE_FOR_expsf2; ++ if (HAVE_expdf2) ++ exp_optab->handlers[DFmode].insn_code = CODE_FOR_expdf2; ++ if (HAVE_logsf2) ++ log_optab->handlers[SFmode].insn_code = CODE_FOR_logsf2; ++ if (HAVE_logdf2) ++ log_optab->handlers[DFmode].insn_code = CODE_FOR_logdf2; ++ if (HAVE_floatsisf2) ++ sfloat_optab->handlers[SFmode][SImode].insn_code = CODE_FOR_floatsisf2; ++ if (HAVE_floatsidf2) ++ sfloat_optab->handlers[DFmode][SImode].insn_code = CODE_FOR_floatsidf2; ++ if (HAVE_floatunssisf2) ++ ufloat_optab->handlers[SFmode][SImode].insn_code = CODE_FOR_floatunssisf2; ++ if (HAVE_floatunssidf2) ++ ufloat_optab->handlers[DFmode][SImode].insn_code = CODE_FOR_floatunssidf2; ++ if (HAVE_fixsfsi2) ++ sfix_optab->handlers[SImode][SFmode].insn_code = CODE_FOR_fixsfsi2; ++ if (HAVE_fixdfsi2) ++ sfix_optab->handlers[SImode][DFmode].insn_code = CODE_FOR_fixdfsi2; ++ if (HAVE_fixunssfsi2) ++ ufix_optab->handlers[SImode][SFmode].insn_code = CODE_FOR_fixunssfsi2; ++ if (HAVE_fixunsdfsi2) ++ ufix_optab->handlers[SImode][DFmode].insn_code = CODE_FOR_fixunsdfsi2; ++ if (HAVE_extendsfdf2) ++ sext_optab->handlers[DFmode][SFmode].insn_code = CODE_FOR_extendsfdf2; ++ if (HAVE_truncdfsf2) ++ trunc_optab->handlers[SFmode][DFmode].insn_code = CODE_FOR_truncdfsf2; ++ if (HAVE_cmpsf) ++ cmp_optab->handlers[SFmode].insn_code = CODE_FOR_cmpsf; ++ if (HAVE_cmpdf) ++ cmp_optab->handlers[DFmode].insn_code = CODE_FOR_cmpdf; ++ } ++ ++ /* Check for duplicate values of N. */ ++ for (i = 0; i < 256; i++) ++ { ++ ns[i] = 0; ++ ps[i] = 0; ++ } ++ ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ { ++ int N = nios2_fpu_insns[i].N; ++ if (N >= 0) ++ { ++ if (ns[N]) ++ { ++ error ("%s%s' conflicts with %s%s'", ++ is_pragma ? "`#pragma custom_" : "switch `-mcustom-", ++ nios2_fpu_insns[i].option, ++ ps[N] ? "`#pragma custom_" : "switch `-mcustom-", ++ ns[N]); ++ errors = 1; ++ } ++ else if (builtin_custom_seen[N]) ++ { ++ error ("call to `%s' conflicts with %s%s'", ++ builtin_custom_seen[N], ++ (nios2_fpu_insns[i].pragma_seen ++ ? "`#pragma custom_" : "switch `-mcustom-"), ++ nios2_fpu_insns[i].option); ++ errors = 1; ++ } ++ else ++ { ++ ns[N] = nios2_fpu_insns[i].option; ++ ps[N] = nios2_fpu_insns[i].pragma_seen; ++ } ++ } ++ } ++ ++ if (errors) ++ fatal_error ("conflicting use of -mcustom switches, #pragmas, and/or " ++ "__builtin_custom_ functions"); ++} ++ ++static void ++nios2_handle_custom_fpu_cfg (const char *cfg, int is_pragma) ++{ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ int opt = nios2_fpu_insns[NIOS2_CONCAT (nios2_fpu_, insn)].N; ++NIOS2_FOR_ALL_FPU_INSNS ++ ++ /* ++ * ??? These are just some sample possibilities. We'll change these ++ * at the last minute to match the capabilities of the actual fpu. ++ */ ++ if (!strcasecmp (cfg, "60-1")) ++ { ++ fmuls = 252; ++ fadds = 253; ++ fsubs = 254; ++ flag_single_precision_constant = 1; ++ } ++ else if (!strcasecmp (cfg, "60-2")) ++ { ++ fmuls = 252; ++ fadds = 253; ++ fsubs = 254; ++ fdivs = 255; ++ flag_single_precision_constant = 1; ++ } ++ else if (!strcasecmp (cfg, "72-3")) ++ { ++ floatus = 243; ++ fixsi = 244; ++ floatis = 245; ++ fcmpgts = 246; ++ fcmples = 249; ++ fcmpeqs = 250; ++ fcmpnes = 251; ++ fmuls = 252; ++ fadds = 253; ++ fsubs = 254; ++ fdivs = 255; ++ flag_single_precision_constant = 1; ++ } ++ else ++ warning (0, "ignoring unrecognized %sfpu-cfg' value `%s'", ++ is_pragma ? "`#pragma custom_" : "switch -mcustom-", cfg); ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ nios2_fpu_insns[NIOS2_CONCAT (nios2_fpu_, insn)].N = opt; ++NIOS2_FOR_ALL_FPU_INSNS ++ ++ /* Guard against errors in the standard configurations. */ ++ nios2_custom_check_insns (is_pragma); ++} ++ ++void ++override_options (void) ++{ ++ int i; ++ ++ /* Function to allocate machine-dependent function status. */ ++ init_machine_status = &nios2_init_machine_status; ++ ++ nios2_section_threshold ++ = g_switch_set ? g_switch_value : NIOS2_DEFAULT_GVALUE; ++ ++ /* If we don't have mul, we don't have mulx either! */ ++ if (!TARGET_HAS_MUL && TARGET_HAS_MULX) ++ target_flags &= ~MASK_HAS_MULX; ++ ++ /* Set up for stack limit checking. */ ++ if (TARGET_STACK_CHECK) ++ stack_limit_rtx = gen_rtx_REG(SImode, ET_REGNO); ++ ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ { ++ nios2_fpu_insns[i].is_double = (nios2_fpu_insns[i].args[0] == 'd' ++ || nios2_fpu_insns[i].args[0] == 'd' ++ || nios2_fpu_insns[i].args[0] == 'd'); ++ nios2_fpu_insns[i].needed_by_double = (i == nios2_fpu_nios2_fwrx ++ || i == nios2_fpu_nios2_fwry ++ || i == nios2_fpu_nios2_frdxlo ++ || i == nios2_fpu_nios2_frdxhi ++ || i == nios2_fpu_nios2_frdy); ++ nios2_fpu_insns[i].needs_unsafe = (i == nios2_fpu_cossf2 ++ || i == nios2_fpu_cosdf2 ++ || i == nios2_fpu_sinsf2 ++ || i == nios2_fpu_sindf2 ++ || i == nios2_fpu_tansf2 ++ || i == nios2_fpu_tandf2 ++ || i == nios2_fpu_atansf2 ++ || i == nios2_fpu_atandf2 ++ || i == nios2_fpu_expsf2 ++ || i == nios2_fpu_expdf2 ++ || i == nios2_fpu_logsf2 ++ || i == nios2_fpu_logdf2); ++ nios2_fpu_insns[i].needs_finite = (i == nios2_fpu_minsf3 ++ || i == nios2_fpu_maxsf3 ++ || i == nios2_fpu_mindf3 ++ || i == nios2_fpu_maxdf3); ++ } ++ ++ /* We haven't seen any __builtin_custom functions yet. */ ++ for (i = 0; i < 256; i++) ++ builtin_custom_seen[i] = 0; ++ ++ /* Set up default handling for floating point custom instructions. ++ ++ Putting things in this order means that the -mcustom-fpu-cfg= ++ switch will always be overridden by individual -mcustom-fadds= ++ switches, regardless of the order in which they were specified ++ on the command line. ??? Remember to document this. */ ++ if (nios2_custom_fpu_cfg_string && *nios2_custom_fpu_cfg_string) ++ nios2_handle_custom_fpu_cfg (nios2_custom_fpu_cfg_string, 0); ++ ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ nios2_custom_switch (*nios2_fpu_insns[i].pN, ++ &nios2_fpu_insns[i].N, ++ nios2_fpu_insns[i].option); ++ ++ nios2_custom_check_insns (0); ++} ++ ++void ++optimization_options (int level, int size) ++{ ++ if (level || size) ++ target_flags |= MASK_INLINE_MEMCPY; ++ ++ if (level >= 3 && !size) ++ target_flags |= MASK_FAST_SW_DIV; ++} ++ ++/* Allocate a chunk of memory for per-function machine-dependent data. */ ++static struct machine_function * ++nios2_init_machine_status (void) ++{ ++ return ((struct machine_function *) ++ ggc_alloc_cleared (sizeof (struct machine_function))); ++} ++ ++ ++ ++/***************** ++ * Describing Relative Costs of Operations ++ *****************/ ++ ++/* Compute a (partial) cost for rtx X. Return true if the complete ++ cost has been computed, and false if subexpressions should be ++ scanned. In either case, *TOTAL contains the cost result. */ ++ ++ ++ ++static bool ++nios2_rtx_costs (rtx x, int code, int outer_code ATTRIBUTE_UNUSED, int *total) ++{ ++ switch (code) ++ { ++ case CONST_INT: ++ if (INTVAL (x) == 0) ++ { ++ *total = COSTS_N_INSNS (0); ++ return true; ++ } ++ else if (SMALL_INT (INTVAL (x)) ++ || SMALL_INT_UNSIGNED (INTVAL (x)) ++ || UPPER16_INT (INTVAL (x))) ++ { ++ *total = COSTS_N_INSNS (2); ++ return true; ++ } ++ else ++ { ++ *total = COSTS_N_INSNS (4); ++ return true; ++ } ++ ++ case LABEL_REF: ++ case SYMBOL_REF: ++ /* ??? gp relative stuff will fit in here. */ ++ /* fall through */ ++ case CONST: ++ case CONST_DOUBLE: ++ { ++ *total = COSTS_N_INSNS (4); ++ return true; ++ } ++ ++ case MULT: ++ { ++ *total = COSTS_N_INSNS (1); ++ return false; ++ } ++ case SIGN_EXTEND: ++ { ++ *total = COSTS_N_INSNS (3); ++ return false; ++ } ++ case ZERO_EXTEND: ++ { ++ *total = COSTS_N_INSNS (1); ++ return false; ++ } ++ ++ default: ++ return false; ++ } ++} ++ ++ ++/*************************************** ++ * INSTRUCTION SUPPORT ++ * ++ * These functions are used within the Machine Description to ++ * handle common or complicated output and expansions from ++ * instructions. ++ ***************************************/ ++ ++/* Return TRUE if X references a SYMBOL_REF. */ ++static int ++symbol_mentioned_p (rtx x) ++{ ++ const char * fmt; ++ int i; ++ ++ if (GET_CODE (x) == SYMBOL_REF) ++ return 1; ++ ++ /* UNSPEC_TLS entries for a symbol include the SYMBOL_REF, but they ++ are constant offsets, not symbols. */ ++ if (GET_CODE (x) == UNSPEC && IS_UNSPEC_TLS (XINT (x, 1))) ++ return 0; ++ ++ fmt = GET_RTX_FORMAT (GET_CODE (x)); ++ ++ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) ++ { ++ if (fmt[i] == 'E') ++ { ++ int j; ++ ++ for (j = XVECLEN (x, i) - 1; j >= 0; j--) ++ if (symbol_mentioned_p (XVECEXP (x, i, j))) ++ return 1; ++ } ++ else if (fmt[i] == 'e' && symbol_mentioned_p (XEXP (x, i))) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++/* Return TRUE if X references a LABEL_REF. */ ++static int ++label_mentioned_p (rtx x) ++{ ++ const char * fmt; ++ int i; ++ ++ if (GET_CODE (x) == LABEL_REF) ++ return 1; ++ ++ /* UNSPEC_TLS entries for a symbol include a LABEL_REF for the referencing ++ instruction, but they are constant offsets, not symbols. */ ++ if (GET_CODE (x) == UNSPEC && IS_UNSPEC_TLS (XINT (x, 1))) ++ return 0; ++ ++ fmt = GET_RTX_FORMAT (GET_CODE (x)); ++ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) ++ { ++ if (fmt[i] == 'E') ++ { ++ int j; ++ ++ for (j = XVECLEN (x, i) - 1; j >= 0; j--) ++ if (label_mentioned_p (XVECEXP (x, i, j))) ++ return 1; ++ } ++ else if (fmt[i] == 'e' && label_mentioned_p (XEXP (x, i))) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++static int ++tls_mentioned_p (rtx x) ++{ ++ switch (GET_CODE (x)) ++ { ++ case CONST: ++ return tls_mentioned_p (XEXP (x, 0)); ++ ++ case UNSPEC: ++ if (IS_UNSPEC_TLS (XINT (x, 1))) ++ return 1; ++ ++ default: ++ return 0; ++ } ++} ++ ++/* Helper for nios2_tls_referenced_p. */ ++ ++static int ++nios2_tls_operand_p_1 (rtx *x, void *data ATTRIBUTE_UNUSED) ++{ ++ if (GET_CODE (*x) == SYMBOL_REF) ++ return SYMBOL_REF_TLS_MODEL (*x) != 0; ++ ++ /* Don't recurse into UNSPEC_TLS looking for TLS symbols; these are ++ TLS offsets, not real symbol references. */ ++ if (GET_CODE (*x) == UNSPEC ++ && IS_UNSPEC_TLS (XINT (*x, 1))) ++ return -1; ++ ++ return 0; ++} ++ ++/* Return TRUE if X contains any TLS symbol references. */ ++ ++static bool ++nios2_tls_referenced_p (rtx x) ++{ ++ if (! TARGET_HAVE_TLS) ++ return false; ++ ++ return for_each_rtx (&x, nios2_tls_operand_p_1, NULL); ++} ++ ++static bool ++nios2_cannot_force_const_mem (rtx x) ++{ ++ return nios2_tls_referenced_p (x); ++} ++ ++/* Emit a call to __tls_get_addr. TI is the argument to this function. RET is ++ an RTX for the return value location. The entire insn sequence is ++ returned. */ ++ ++static GTY(()) rtx nios2_tls_symbol; ++ ++static rtx ++nios2_call_tls_get_addr (rtx ti) ++{ ++ rtx arg = gen_rtx_REG (Pmode, FIRST_ARG_REGNO); ++ rtx ret = gen_rtx_REG (Pmode, FIRST_RETVAL_REGNO); ++ rtx fn, insn; ++ ++ if (!nios2_tls_symbol) ++ nios2_tls_symbol = init_one_libfunc ("__tls_get_addr"); ++ ++ emit_insn (gen_rtx_SET (Pmode, arg, ti)); ++ fn = gen_rtx_MEM (QImode, nios2_tls_symbol); ++ insn = emit_call_insn (gen_call_value (ret, fn, const0_rtx)); ++ CONST_OR_PURE_CALL_P (insn) = 1; ++ use_reg (&CALL_INSN_FUNCTION_USAGE (insn), ret); ++ use_reg (&CALL_INSN_FUNCTION_USAGE (insn), arg); ++ ++ return ret; ++} ++ ++/* Generate the code to access LOC, a thread local SYMBOL_REF. The ++ return value will be a valid address and move_operand (either a REG ++ or a LO_SUM). */ ++ ++static rtx ++nios2_legitimize_tls_address (rtx loc) ++{ ++ rtx dest = gen_reg_rtx (Pmode); ++ rtx ret, tmp1; ++ enum tls_model model = SYMBOL_REF_TLS_MODEL (loc); ++ ++ switch (model) ++ { ++ case TLS_MODEL_GLOBAL_DYNAMIC: ++ tmp1 = gen_reg_rtx (Pmode); ++ emit_insn (gen_add_tls_gd (tmp1, pic_offset_table_rtx, loc)); ++ current_function_uses_pic_offset_table = 1; ++ ret = nios2_call_tls_get_addr (tmp1); ++ emit_insn (gen_rtx_SET (Pmode, dest, ret)); ++ break; ++ ++ case TLS_MODEL_LOCAL_DYNAMIC: ++ tmp1 = gen_reg_rtx (Pmode); ++ emit_insn (gen_add_tls_ldm (tmp1, pic_offset_table_rtx, loc)); ++ current_function_uses_pic_offset_table = 1; ++ ret = nios2_call_tls_get_addr (tmp1); ++ ++ emit_insn (gen_add_tls_ldo (dest, ret, loc)); ++ ++ break; ++ ++ case TLS_MODEL_INITIAL_EXEC: ++ tmp1 = gen_reg_rtx (Pmode); ++ emit_insn (gen_load_tls_ie (tmp1, pic_offset_table_rtx, loc)); ++ current_function_uses_pic_offset_table = 1; ++ emit_insn (gen_add3_insn (dest, ++ gen_rtx_REG (Pmode, THREAD_POINTER_REGNUM), ++ tmp1)); ++ break; ++ ++ case TLS_MODEL_LOCAL_EXEC: ++ emit_insn (gen_add_tls_le (dest, ++ gen_rtx_REG (Pmode, THREAD_POINTER_REGNUM), ++ loc)); ++ break; ++ ++ default: ++ gcc_unreachable (); ++ } ++ ++ return dest; ++} ++ ++int ++nios2_emit_move_sequence (rtx *operands, enum machine_mode mode) ++{ ++ rtx to = operands[0]; ++ rtx from = operands[1]; ++ ++ if (!register_operand (to, mode) && !reg_or_0_operand (from, mode)) ++ { ++ if (no_new_pseudos) ++ internal_error ("Trying to force_reg no_new_pseudos == 1"); ++ from = copy_to_mode_reg (mode, from); ++ } ++ ++ /* Recognize the case where from is a reference to thread-local ++ data and load its address to a register. */ ++ if (nios2_tls_referenced_p (from)) ++ { ++ rtx tmp = from; ++ rtx addend = NULL; ++ ++ if (GET_CODE (tmp) == CONST && GET_CODE (XEXP (tmp, 0)) == PLUS) ++ { ++ addend = XEXP (XEXP (tmp, 0), 1); ++ tmp = XEXP (XEXP (tmp, 0), 0); ++ } ++ ++ gcc_assert (GET_CODE (tmp) == SYMBOL_REF); ++ gcc_assert (SYMBOL_REF_TLS_MODEL (tmp) != 0); ++ ++ tmp = nios2_legitimize_tls_address (tmp); ++ if (addend) ++ { ++ tmp = gen_rtx_PLUS (SImode, tmp, addend); ++ tmp = force_operand (tmp, to); ++ } ++ from = tmp; ++ } ++ else if (flag_pic && (CONSTANT_P (from) || symbol_mentioned_p (from) || ++ label_mentioned_p (from))) ++ from = nios2_legitimize_pic_address (from, SImode, ++ (no_new_pseudos ? to : 0)); ++ ++ operands[0] = to; ++ operands[1] = from; ++ return 0; ++} ++ ++/* Divide Support */ ++ ++/* ++ If -O3 is used, we want to output a table lookup for ++ divides between small numbers (both num and den >= 0 ++ and < 0x10). The overhead of this method in the worse ++ case is 40 bytes in the text section (10 insns) and ++ 256 bytes in the data section. Additional divides do ++ not incur additional penalties in the data section. ++ ++ Code speed is improved for small divides by about 5x ++ when using this method in the worse case (~9 cycles ++ vs ~45). And in the worse case divides not within the ++ table are penalized by about 10% (~5 cycles vs ~45). ++ However in the typical case the penalty is not as bad ++ because doing the long divide in only 45 cycles is ++ quite optimistic. ++ ++ ??? It would be nice to have some benchmarks other ++ than Dhrystone to back this up. ++ ++ This bit of expansion is to create this instruction ++ sequence as rtl. ++ or $8, $4, $5 ++ slli $9, $4, 4 ++ cmpgeui $3, $8, 16 ++ beq $3, $0, .L3 ++ or $10, $9, $5 ++ add $12, $11, divide_table ++ ldbu $2, 0($12) ++ br .L1 ++.L3: ++ call slow_div ++.L1: ++# continue here with result in $2 ++ ++ ??? Ideally I would like the emit libcall block to contain ++ all of this code, but I don't know how to do that. What it ++ means is that if the divide can be eliminated, it may not ++ completely disappear. ++ ++ ??? The __divsi3_table label should ideally be moved out ++ of this block and into a global. If it is placed into the ++ sdata section we can save even more cycles by doing things ++ gp relative. ++*/ ++int ++nios2_emit_expensive_div (rtx *operands, enum machine_mode mode) ++{ ++ rtx or_result, shift_left_result; ++ rtx lookup_value; ++ rtx lab1, lab3; ++ rtx insns; ++ rtx libfunc; ++ rtx final_result; ++ rtx tmp; ++ ++ /* It may look a little generic, but only SImode ++ is supported for now. */ ++ gcc_assert (mode == SImode); ++ ++ libfunc = sdiv_optab->handlers[(int) SImode].libfunc; ++ ++ ++ ++ lab1 = gen_label_rtx (); ++ lab3 = gen_label_rtx (); ++ ++ or_result = expand_simple_binop (SImode, IOR, ++ operands[1], operands[2], ++ 0, 0, OPTAB_LIB_WIDEN); ++ ++ emit_cmp_and_jump_insns (or_result, GEN_INT (15), GTU, 0, ++ GET_MODE (or_result), 0, lab3); ++ JUMP_LABEL (get_last_insn ()) = lab3; ++ ++ shift_left_result = expand_simple_binop (SImode, ASHIFT, ++ operands[1], GEN_INT (4), ++ 0, 0, OPTAB_LIB_WIDEN); ++ ++ lookup_value = expand_simple_binop (SImode, IOR, ++ shift_left_result, operands[2], ++ 0, 0, OPTAB_LIB_WIDEN); ++ ++ convert_move (operands[0], ++ gen_rtx_MEM (QImode, ++ gen_rtx_PLUS (SImode, ++ lookup_value, ++ gen_rtx_SYMBOL_REF (SImode, "__divsi3_table"))), ++ 1); ++ ++ ++ tmp = emit_jump_insn (gen_jump (lab1)); ++ JUMP_LABEL (tmp) = lab1; ++ emit_barrier (); ++ ++ emit_label (lab3); ++ LABEL_NUSES (lab3) = 1; ++ ++ start_sequence (); ++ final_result = emit_library_call_value (libfunc, NULL_RTX, ++ LCT_CONST, SImode, 2, ++ operands[1], SImode, ++ operands[2], SImode); ++ ++ ++ insns = get_insns (); ++ end_sequence (); ++ emit_libcall_block (insns, operands[0], final_result, ++ gen_rtx_DIV (SImode, operands[1], operands[2])); ++ ++ emit_label (lab1); ++ LABEL_NUSES (lab1) = 1; ++ return 1; ++} ++ ++/* The function with address *ADDR is being called. If the address ++ needs to be loaded from the GOT, emit the instruction to do so and ++ update *ADDR to point to the rtx for the loaded value. */ ++ ++void ++nios2_adjust_call_address (rtx *addr) ++{ ++ if (flag_pic ++ && (GET_CODE (*addr) == SYMBOL_REF || GET_CODE (*addr) == LABEL_REF)) ++ { ++ rtx addr_orig; ++ current_function_uses_pic_offset_table = 1; ++ addr_orig = *addr; ++ *addr = gen_reg_rtx (GET_MODE (addr_orig)); ++ emit_insn (gen_pic_load_call_addr (*addr, ++ pic_offset_table_rtx, addr_orig)); ++ } ++} ++ ++/* Branches/Compares. */ ++ ++/* The way of handling branches/compares ++ in gcc is heavily borrowed from MIPS. */ ++ ++enum internal_test ++{ ++ ITEST_EQ, ++ ITEST_NE, ++ ITEST_GT, ++ ITEST_GE, ++ ITEST_LT, ++ ITEST_LE, ++ ITEST_GTU, ++ ITEST_GEU, ++ ITEST_LTU, ++ ITEST_LEU, ++ ITEST_MAX ++}; ++ ++static enum internal_test map_test_to_internal_test (enum rtx_code); ++ ++/* Cached operands, and operator to compare for use in set/branch/trap ++ on condition codes. */ ++rtx branch_cmp[2]; ++enum cmp_type branch_type; ++ ++/* Make normal rtx_code into something we can index from an array. */ ++ ++static enum internal_test ++map_test_to_internal_test (enum rtx_code test_code) ++{ ++ enum internal_test test = ITEST_MAX; ++ ++ switch (test_code) ++ { ++ case EQ: ++ test = ITEST_EQ; ++ break; ++ case NE: ++ test = ITEST_NE; ++ break; ++ case GT: ++ test = ITEST_GT; ++ break; ++ case GE: ++ test = ITEST_GE; ++ break; ++ case LT: ++ test = ITEST_LT; ++ break; ++ case LE: ++ test = ITEST_LE; ++ break; ++ case GTU: ++ test = ITEST_GTU; ++ break; ++ case GEU: ++ test = ITEST_GEU; ++ break; ++ case LTU: ++ test = ITEST_LTU; ++ break; ++ case LEU: ++ test = ITEST_LEU; ++ break; ++ default: ++ break; ++ } ++ ++ return test; ++} ++ ++bool have_nios2_fpu_cmp_insn( enum rtx_code cond_t, enum cmp_type cmp_t ); ++enum rtx_code get_reverse_cond(enum rtx_code cond_t); ++ ++bool ++have_nios2_fpu_cmp_insn( enum rtx_code cond_t, enum cmp_type cmp_t ) ++{ ++ if (cmp_t == CMP_SF) ++ { ++ switch (cond_t) ++ { ++ case EQ: ++ return (nios2_fpu_insns[nios2_fpu_nios2_seqsf].N >= 0); ++ case NE: ++ return (nios2_fpu_insns[nios2_fpu_nios2_snesf].N >= 0); ++ case GT: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sgtsf].N >= 0); ++ case GE: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sgesf].N >= 0); ++ case LT: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sltsf].N >= 0); ++ case LE: ++ return (nios2_fpu_insns[nios2_fpu_nios2_slesf].N >= 0); ++ default: ++ break; ++ } ++ } ++ else if (cmp_t == CMP_DF) ++ { ++ switch (cond_t) ++ { ++ case EQ: ++ return (nios2_fpu_insns[nios2_fpu_nios2_seqdf].N >= 0); ++ case NE: ++ return (nios2_fpu_insns[nios2_fpu_nios2_snedf].N >= 0); ++ case GT: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sgtdf].N >= 0); ++ case GE: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sgedf].N >= 0); ++ case LT: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sltdf].N >= 0); ++ case LE: ++ return (nios2_fpu_insns[nios2_fpu_nios2_sledf].N >= 0); ++ default: ++ break; ++ } ++ } ++ ++ return false; ++} ++ ++/* Note that get_reverse_cond() is not the same as get_inverse_cond() ++ get_reverse_cond() means that if the operand order is reversed, ++ what is the operand that is needed to generate the same condition? */ ++enum rtx_code ++get_reverse_cond(enum rtx_code cond_t) ++{ ++ switch (cond_t) ++ { ++ case GT: return LT; ++ case GE: return LE; ++ case LT: return GT; ++ case LE: return GE; ++ case GTU: return LTU; ++ case GEU: return LEU; ++ case LTU: return GTU; ++ case LEU: return GEU; ++ default: break; ++ } ++ ++ return cond_t; ++} ++ ++ ++/* Generate the code to compare (and possibly branch) two integer values ++ TEST_CODE is the comparison code we are trying to emulate ++ (or implement directly) ++ RESULT is where to store the result of the comparison, ++ or null to emit a branch ++ CMP0 CMP1 are the two comparison operands ++ DESTINATION is the destination of the branch, or null to only compare. */ ++ ++void ++gen_int_relational (enum rtx_code test_code, /* Relational test (EQ, etc). */ ++ rtx result, /* Result to store comp. or 0 if branch. */ ++ rtx cmp0, /* First operand to compare. */ ++ rtx cmp1, /* Second operand to compare. */ ++ rtx destination) /* Destination of the branch, ++ or 0 if compare. */ ++{ ++ struct cmp_info ++ { ++ /* For register (or 0) compares. */ ++ enum rtx_code test_code_reg; /* Code to use in instruction (LT vs. LTU). */ ++ int reverse_regs; /* Reverse registers in test. */ ++ ++ /* for immediate compares */ ++ enum rtx_code test_code_const; /* Code to use in instruction (LT vs. LTU). */ ++ int const_low; /* Low bound of constant we can accept. */ ++ int const_high; /* High bound of constant we can accept. */ ++ int const_add; /* Constant to add. */ ++ ++ /* generic info */ ++ int unsignedp; /* != 0 for unsigned comparisons. */ ++ }; ++ ++ static const struct cmp_info info[(int) ITEST_MAX] = { ++ ++ {EQ, 0, EQ, -32768, 32767, 0, 0}, /* EQ */ ++ {NE, 0, NE, -32768, 32767, 0, 0}, /* NE */ ++ ++ {LT, 1, GE, -32769, 32766, 1, 0}, /* GT */ ++ {GE, 0, GE, -32768, 32767, 0, 0}, /* GE */ ++ {LT, 0, LT, -32768, 32767, 0, 0}, /* LT */ ++ {GE, 1, LT, -32769, 32766, 1, 0}, /* LE */ ++ ++ {LTU, 1, GEU, 0, 65534, 1, 0}, /* GTU */ ++ {GEU, 0, GEU, 0, 65535, 0, 0}, /* GEU */ ++ {LTU, 0, LTU, 0, 65535, 0, 0}, /* LTU */ ++ {GEU, 1, LTU, 0, 65534, 1, 0}, /* LEU */ ++ }; ++ ++ enum internal_test test; ++ enum machine_mode mode; ++ const struct cmp_info *p_info; ++ int branch_p; ++ ++ ++ test = map_test_to_internal_test (test_code); ++ gcc_assert (test != ITEST_MAX); ++ ++ p_info = &info[(int) test]; ++ ++ mode = GET_MODE (cmp0); ++ if (mode == VOIDmode) ++ mode = GET_MODE (cmp1); ++ ++ branch_p = (destination != 0); ++ ++ /* Handle floating point comparison directly. */ ++ if (branch_type == CMP_SF || branch_type == CMP_DF) ++ { ++ ++ bool reverse_operands = false; ++ ++ enum machine_mode float_mode = (branch_type == CMP_SF) ? SFmode : DFmode; ++ ++ gcc_assert (register_operand (cmp0, float_mode) && ++ register_operand (cmp1, float_mode)); ++ ++ if (branch_p) ++ { ++ test_code = p_info->test_code_reg; ++ reverse_operands = (p_info->reverse_regs); ++ } ++ ++ if (!have_nios2_fpu_cmp_insn(test_code, branch_type) && ++ have_nios2_fpu_cmp_insn(get_reverse_cond(test_code), branch_type) ) ++ { ++ test_code = get_reverse_cond(test_code); ++ reverse_operands = !reverse_operands; ++ } ++ ++ if (reverse_operands) ++ { ++ rtx temp = cmp0; ++ cmp0 = cmp1; ++ cmp1 = temp; ++ } ++ ++ if (branch_p) ++ { ++ rtx cond = gen_rtx_fmt_ee (test_code, SImode, cmp0, cmp1); ++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination); ++ rtx insn = gen_rtx_SET (VOIDmode, pc_rtx, ++ gen_rtx_IF_THEN_ELSE (VOIDmode, ++ cond, label, pc_rtx)); ++ emit_jump_insn (insn); ++ } ++ else ++ emit_move_insn (result, gen_rtx_fmt_ee (test_code, SImode, cmp0, ++ cmp1)); ++ return; ++ } ++ ++ /* We can't, under any circumstances, have const_ints in cmp0 ++ ??? Actually we could have const0. */ ++ if (GET_CODE (cmp0) == CONST_INT) ++ cmp0 = force_reg (mode, cmp0); ++ ++ /* If the comparison is against an int not in legal range ++ move it into a register. */ ++ if (GET_CODE (cmp1) == CONST_INT) ++ { ++ HOST_WIDE_INT value = INTVAL (cmp1); ++ ++ if (value < p_info->const_low || value > p_info->const_high) ++ cmp1 = force_reg (mode, cmp1); ++ } ++ ++ /* Comparison to constants, may involve adding 1 to change a GT into GE. ++ Comparison between two registers, may involve switching operands. */ ++ if (GET_CODE (cmp1) == CONST_INT) ++ { ++ if (p_info->const_add != 0) ++ { ++ HOST_WIDE_INT new = INTVAL (cmp1) + p_info->const_add; ++ ++ /* If modification of cmp1 caused overflow, ++ we would get the wrong answer if we follow the usual path; ++ thus, x > 0xffffffffU would turn into x > 0U. */ ++ gcc_assert ((p_info->unsignedp ++ ? (unsigned HOST_WIDE_INT) new > ++ (unsigned HOST_WIDE_INT) INTVAL (cmp1) ++ : new > INTVAL (cmp1)) == (p_info->const_add > 0)); ++ ++ cmp1 = GEN_INT (new); ++ } ++ } ++ ++ else if (p_info->reverse_regs) ++ { ++ rtx temp = cmp0; ++ cmp0 = cmp1; ++ cmp1 = temp; ++ } ++ ++ ++ ++ if (branch_p) ++ { ++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode)) ++ { ++ rtx insn; ++ rtx cond = gen_rtx_fmt_ee (p_info->test_code_reg, mode, cmp0, cmp1); ++ rtx label = gen_rtx_LABEL_REF (VOIDmode, destination); ++ ++ insn = gen_rtx_SET (VOIDmode, pc_rtx, ++ gen_rtx_IF_THEN_ELSE (VOIDmode, ++ cond, label, pc_rtx)); ++ emit_jump_insn (insn); ++ } ++ else ++ { ++ rtx cond, label; ++ ++ result = gen_reg_rtx (mode); ++ ++ emit_move_insn (result, ++ gen_rtx_fmt_ee (p_info->test_code_const, mode, cmp0, ++ cmp1)); ++ ++ cond = gen_rtx_NE (mode, result, const0_rtx); ++ label = gen_rtx_LABEL_REF (VOIDmode, destination); ++ ++ emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, ++ gen_rtx_IF_THEN_ELSE (VOIDmode, ++ cond, ++ label, pc_rtx))); ++ } ++ } ++ else ++ { ++ if (register_operand (cmp0, mode) && register_operand (cmp1, mode)) ++ emit_move_insn (result, ++ gen_rtx_fmt_ee (p_info->test_code_reg, mode, cmp0, cmp1)); ++ else ++ emit_move_insn (result, ++ gen_rtx_fmt_ee (p_info->test_code_const, mode, cmp0, ++ cmp1)); ++ } ++ ++} ++ ++ ++/* ??? For now conditional moves are only supported ++ when the mode of the operands being compared are ++ the same as the ones being moved. */ ++ ++void ++gen_conditional_move (rtx *operands, enum machine_mode mode) ++{ ++ rtx insn, cond; ++ rtx cmp_reg = gen_reg_rtx (mode); ++ enum rtx_code cmp_code = GET_CODE (operands[1]); ++ enum rtx_code move_code = EQ; ++ ++ /* Emit a comparison if it is not "simple". ++ Simple comparisons are X eq 0 and X ne 0. */ ++ if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[1] == const0_rtx) ++ { ++ cmp_reg = branch_cmp[0]; ++ move_code = cmp_code; ++ } ++ else if ((cmp_code == EQ || cmp_code == NE) && branch_cmp[0] == const0_rtx) ++ { ++ cmp_reg = branch_cmp[1]; ++ move_code = cmp_code == EQ ? NE : EQ; ++ } ++ else ++ gen_int_relational (cmp_code, cmp_reg, branch_cmp[0], branch_cmp[1], ++ NULL_RTX); ++ ++ cond = gen_rtx_fmt_ee (move_code, VOIDmode, cmp_reg, CONST0_RTX (mode)); ++ insn = gen_rtx_SET (mode, operands[0], ++ gen_rtx_IF_THEN_ELSE (mode, ++ cond, operands[2], operands[3])); ++ emit_insn (insn); ++} ++ ++/******************* ++ * Addressing Modes ++ *******************/ ++ ++int ++nios2_legitimate_constant (rtx x) ++{ ++ switch (GET_CODE (x)) ++ { ++ case SYMBOL_REF: ++ return !SYMBOL_REF_TLS_MODEL (x); ++ case CONST: ++ { ++ rtx op = XEXP (x, 0); ++ if (GET_CODE (op) != PLUS) ++ return false; ++ return nios2_legitimate_constant (XEXP (op, 0)) ++ && nios2_legitimate_constant (XEXP (op, 1)); ++ } ++ default: ++ return true; ++ } ++} ++ ++int ++nios2_legitimate_address (rtx operand, enum machine_mode mode ATTRIBUTE_UNUSED, ++ int strict) ++{ ++ int ret_val = 0; ++ ++ switch (GET_CODE (operand)) ++ { ++ /* direct. */ ++ case SYMBOL_REF: ++ if (SYMBOL_REF_TLS_MODEL (operand)) ++ break; ++ ++ if (SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (operand)) ++ { ++ ret_val = 1; ++ break; ++ } ++ /* else, fall through */ ++ case LABEL_REF: ++ case CONST_INT: ++ case CONST: ++ case CONST_DOUBLE: ++ /* ??? In here I need to add gp addressing */ ++ ret_val = 0; ++ ++ break; ++ ++ /* Register indirect. */ ++ case REG: ++ ret_val = REG_OK_FOR_BASE_P2 (operand, strict); ++ break; ++ ++ /* Register indirect with displacement. */ ++ case PLUS: ++ { ++ rtx op0 = XEXP (operand, 0); ++ rtx op1 = XEXP (operand, 1); ++ ++ if (REG_P (op0) && REG_P (op1)) ++ ret_val = 0; ++ else if (REG_P (op0) && GET_CODE (op1) == CONST_INT) ++ ret_val = REG_OK_FOR_BASE_P2 (op0, strict) ++ && SMALL_INT (INTVAL (op1)); ++ else if (REG_P (op1) && GET_CODE (op0) == CONST_INT) ++ ret_val = REG_OK_FOR_BASE_P2 (op1, strict) ++ && SMALL_INT (INTVAL (op0)); ++ else ++ ret_val = 0; ++ } ++ break; ++ ++ default: ++ ret_val = 0; ++ break; ++ } ++ ++ return ret_val; ++} ++ ++/* Return true if EXP should be placed in the small data section. */ ++ ++static bool ++nios2_in_small_data_p (tree exp) ++{ ++ /* We want to merge strings, so we never consider them small data. */ ++ if (TREE_CODE (exp) == STRING_CST) ++ return false; ++ ++ if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp)) ++ { ++ const char *section = TREE_STRING_POINTER (DECL_SECTION_NAME (exp)); ++ /* ??? these string names need moving into ++ an array in some header file */ ++ if (nios2_section_threshold > 0 ++ && (strcmp (section, ".sbss") == 0 ++ || strncmp (section, ".sbss.", 6) == 0 ++ || strcmp (section, ".sdata") == 0 ++ || strncmp (section, ".sdata.", 7) == 0)) ++ return true; ++ } ++ else if (TREE_CODE (exp) == VAR_DECL) ++ { ++ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp)); ++ ++ /* If this is an incomplete type with size 0, then we can't put it ++ in sdata because it might be too big when completed. */ ++ if (size > 0 && (unsigned HOST_WIDE_INT)size <= nios2_section_threshold) ++ return true; ++ } ++ ++ return false; ++} ++ ++static void ++nios2_encode_section_info (tree decl, rtx rtl, int first) ++{ ++ ++ rtx symbol; ++ int flags; ++ ++ default_encode_section_info (decl, rtl, first); ++ ++ /* Careful not to prod global register variables. */ ++ if (GET_CODE (rtl) != MEM) ++ return; ++ symbol = XEXP (rtl, 0); ++ if (GET_CODE (symbol) != SYMBOL_REF) ++ return; ++ ++ flags = SYMBOL_REF_FLAGS (symbol); ++ ++ /* We don't want weak variables to be addressed with gp in case they end up ++ with value 0 which is not within 2^15 of $gp. */ ++ if (DECL_P (decl) && DECL_WEAK (decl)) ++ flags |= SYMBOL_FLAG_WEAK_DECL; ++ ++ SYMBOL_REF_FLAGS (symbol) = flags; ++} ++ ++ ++static unsigned int ++nios2_section_type_flags (tree decl, const char *name, int reloc) ++{ ++ unsigned int flags; ++ ++ flags = default_section_type_flags (decl, name, reloc); ++ ++ if (strcmp (name, ".sbss") == 0 ++ || strncmp (name, ".sbss.", 6) == 0 ++ || strcmp (name, ".sdata") == 0 ++ || strncmp (name, ".sdata.", 7) == 0) ++ flags |= SECTION_SMALL; ++ ++ return flags; ++} ++ ++/* Handle a #pragma reverse_bitfields. */ ++static void ++nios2_pragma_reverse_bitfields (struct cpp_reader *pfile ATTRIBUTE_UNUSED) ++{ ++ nios2_pragma_reverse_bitfields_flag = 1; /* Reverse */ ++} ++ ++/* Handle a #pragma no_reverse_bitfields. */ ++static void ++nios2_pragma_no_reverse_bitfields (struct cpp_reader *pfile ATTRIBUTE_UNUSED) ++{ ++ nios2_pragma_reverse_bitfields_flag = -1; /* Forward */ ++} ++ ++/* Handle the various #pragma custom_<switch>s. */ ++static void ++nios2_pragma_fpu (int *value, const char *opt, int *seen) ++{ ++ tree t; ++ if (c_lex (&t) != CPP_NUMBER) ++ { ++ error ("`#pragma custom_%s' value must be a number between 0 and 255", ++ opt); ++ return; ++ } ++ ++ if (TREE_INT_CST_HIGH (t) == 0 ++ && TREE_INT_CST_LOW (t) <= 255) ++ { ++ *value = (int)TREE_INT_CST_LOW (t); ++ *seen = 1; ++ } ++ else ++ error ("`#pragma custom_%s' value must be between 0 and 255", opt); ++ nios2_custom_check_insns (1); ++} ++ ++/* Handle the various #pragma no_custom_<switch>s. */ ++static void ++nios2_pragma_no_fpu (int *value, const char *opt ATTRIBUTE_UNUSED) ++{ ++ *value = -1; ++ nios2_custom_check_insns (1); ++} ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++static void \ ++NIOS2_CONCAT (nios2_pragma_, insn) \ ++ (struct cpp_reader *pfile ATTRIBUTE_UNUSED) \ ++{ \ ++ nios2_fpu_info *inf = &(nios2_fpu_insns[NIOS2_CONCAT (nios2_fpu_, insn)]); \ ++ nios2_pragma_fpu (&(inf->N), inf->option, &(inf->pragma_seen)); \ ++} \ ++static void \ ++NIOS2_CONCAT (nios2_pragma_no_, insn) \ ++ (struct cpp_reader *pfile ATTRIBUTE_UNUSED) \ ++{ \ ++ nios2_fpu_info *inf = &(nios2_fpu_insns[NIOS2_CONCAT (nios2_fpu_, insn)]); \ ++ nios2_pragma_no_fpu (&(inf->N), inf->option); \ ++} ++NIOS2_FOR_ALL_FPU_INSNS ++ ++static void ++nios2_pragma_handle_custom_fpu_cfg (struct cpp_reader *pfile ATTRIBUTE_UNUSED) ++{ ++ tree t; ++ if (c_lex (&t) != CPP_STRING) ++ { ++ error ("`#pragma custom_fpu_cfg' value must be a string"); ++ return; ++ } ++ ++ if (TREE_STRING_LENGTH (t) > 0) ++ nios2_handle_custom_fpu_cfg (TREE_STRING_POINTER (t), 1); ++} ++ ++void ++nios2_register_target_pragmas (void) ++{ ++ int i; ++ ++ c_register_pragma (0, "reverse_bitfields", ++ nios2_pragma_reverse_bitfields); ++ c_register_pragma (0, "no_reverse_bitfields", ++ nios2_pragma_no_reverse_bitfields); ++ ++ for (i = 0; i < nios2_fpu_max_insn; i++) ++ { ++ nios2_fpu_info *inf = &(nios2_fpu_insns[i]); ++ c_register_pragma (0, inf->pname, inf->pragma); ++ c_register_pragma (0, inf->nopname, inf->nopragma); ++ } ++ ++ c_register_pragma (0, "custom_fpu_cfg", ++ nios2_pragma_handle_custom_fpu_cfg); ++} ++ ++/* Handle a "reverse_bitfields" or "no_reverse_bitfields" attribute. ++ ??? What do these attributes mean on a union? */ ++static tree ++nios2_handle_struct_attribute (tree *node, tree name, ++ tree args ATTRIBUTE_UNUSED, ++ int flags ATTRIBUTE_UNUSED, ++ bool *no_add_attrs) ++{ ++ tree *type = NULL; ++ if (DECL_P (*node)) ++ { ++ if (TREE_CODE (*node) == TYPE_DECL) ++ type = &TREE_TYPE (*node); ++ } ++ else ++ type = node; ++ ++ if (!(type && (TREE_CODE (*type) == RECORD_TYPE ++ || TREE_CODE (*type) == UNION_TYPE))) ++ { ++ warning (0, "`%s' attribute ignored", IDENTIFIER_POINTER (name)); ++ *no_add_attrs = true; ++ } ++ ++ else if ((is_attribute_p ("reverse_bitfields", name) ++ && lookup_attribute ("no_reverse_bitfields", ++ TYPE_ATTRIBUTES (*type))) ++ || ((is_attribute_p ("no_reverse_bitfields", name) ++ && lookup_attribute ("reverse_bitfields", ++ TYPE_ATTRIBUTES (*type))))) ++ { ++ warning (0, "`%s' incompatible attribute ignored", ++ IDENTIFIER_POINTER (name)); ++ *no_add_attrs = true; ++ } ++ ++ return NULL_TREE; ++} ++ ++/* Add __attribute__ ((pragma_reverse_bitfields)) when in the scope of a ++ #pragma reverse_bitfields, or __attribute__ ++ ((pragma_no_reverse_bitfields)) when in the scope of a #pragma ++ no_reverse_bitfields. This gets called before ++ nios2_handle_struct_attribute above, so we can't just reuse the same ++ attributes. */ ++static void ++nios2_insert_attributes (tree node, tree *attr_ptr) ++{ ++ tree type = NULL; ++ if (DECL_P (node)) ++ { ++ if (TREE_CODE (node) == TYPE_DECL) ++ type = TREE_TYPE (node); ++ } ++ else ++ type = node; ++ ++ if (!type ++ || (TREE_CODE (type) != RECORD_TYPE ++ && TREE_CODE (type) != UNION_TYPE)) ++ { ++ /* We can ignore things other than structs & unions. */ ++ return; ++ } ++ ++ if (lookup_attribute ("reverse_bitfields", TYPE_ATTRIBUTES (type)) ++ || lookup_attribute ("no_reverse_bitfields", TYPE_ATTRIBUTES (type))) ++ { ++ /* If an attribute is already set, it silently overrides the ++ current #pragma, if any. */ ++ return; ++ } ++ ++ if (nios2_pragma_reverse_bitfields_flag) ++ { ++ const char *id = (nios2_pragma_reverse_bitfields_flag == 1 ? ++ "pragma_reverse_bitfields" : ++ "pragma_no_reverse_bitfields"); ++ /* No attribute set, and we are in the scope of a #pragma. */ ++ *attr_ptr = tree_cons (get_identifier (id), NULL, *attr_ptr); ++ } ++} ++ ++/***************************************** ++ * Position Independent Code ++ *****************************************/ ++ ++/* Emit code to load the PIC register. */ ++ ++static void ++nios2_load_pic_register (void) ++{ ++ rtx tmp = gen_rtx_REG (Pmode, TEMP_REG_NUM); ++ ++ emit_insn (gen_load_got_register (pic_offset_table_rtx, tmp)); ++ emit_insn (gen_add3_insn (pic_offset_table_rtx, pic_offset_table_rtx, tmp)); ++} ++ ++/* Nonzero if the constant value X is a legitimate general operand ++ when generating PIC code. It is given that flag_pic is on and ++ that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ ++ ++bool ++nios2_legitimate_pic_operand_p (rtx x) ++{ ++ rtx inner; ++ ++ /* UNSPEC_TLS is always PIC. */ ++ if (tls_mentioned_p (x)) ++ return true; ++ ++ if (GET_CODE (x) == SYMBOL_REF) ++ return false; ++ if (GET_CODE (x) == LABEL_REF) ++ return false; ++ if (GET_CODE (x) == CONST) ++ { ++ inner = XEXP (x, 0); ++ if (GET_CODE (inner) == PLUS && ++ GET_CODE (XEXP (inner, 0)) == SYMBOL_REF && ++ GET_CODE (XEXP (inner, 1)) == CONST) ++ return false; ++ } ++ return true; ++} ++ ++rtx ++nios2_legitimize_pic_address (rtx orig, ++ enum machine_mode mode ATTRIBUTE_UNUSED, rtx reg) ++{ ++ if (GET_CODE (orig) == SYMBOL_REF ++ || GET_CODE (orig) == LABEL_REF) ++ { ++ if (reg == 0) ++ { ++ gcc_assert (!no_new_pseudos); ++ reg = gen_reg_rtx (Pmode); ++ } ++ ++ emit_insn (gen_pic_load_addr (reg, pic_offset_table_rtx, orig)); ++ ++ current_function_uses_pic_offset_table = 1; ++ ++ return reg; ++ } ++ else if (GET_CODE (orig) == CONST) ++ { ++ rtx base, offset; ++ ++ if (GET_CODE (XEXP (orig, 0)) == PLUS ++ && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx) ++ return orig; ++ ++ if (GET_CODE (XEXP (orig, 0)) == UNSPEC ++ && IS_UNSPEC_TLS (XINT (XEXP (orig, 0), 1))) ++ return orig; ++ ++ if (reg == 0) ++ { ++ gcc_assert (!no_new_pseudos); ++ reg = gen_reg_rtx (Pmode); ++ } ++ ++ gcc_assert (GET_CODE (XEXP (orig, 0)) == PLUS); ++ ++ base = nios2_legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, ++ reg); ++ offset = nios2_legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode, ++ base == reg ? 0 : reg); ++ ++ if (GET_CODE (offset) == CONST_INT) ++ return plus_constant (base, INTVAL (offset)); ++ ++ return gen_rtx_PLUS (Pmode, base, offset); ++ } ++ ++ return orig; ++} ++ ++/* Test for various thread-local symbols. */ ++ ++/* Return TRUE if X is a thread-local symbol. */ ++ ++static bool ++nios2_tls_symbol_p (rtx x) ++{ ++ if (! TARGET_HAVE_TLS) ++ return false; ++ ++ if (GET_CODE (x) != SYMBOL_REF) ++ return false; ++ ++ return SYMBOL_REF_TLS_MODEL (x) != 0; ++} ++ ++rtx ++nios2_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) ++{ ++ if (nios2_tls_symbol_p (x)) ++ return nios2_legitimize_tls_address (x); ++ ++ if (flag_pic) ++ { ++ /* We need to find and carefully transform any SYMBOL and LABEL ++ references; so go back to the original address expression. */ ++ rtx new_x = nios2_legitimize_pic_address (orig_x, mode, NULL_RTX); ++ ++ if (new_x != orig_x) ++ x = new_x; ++ } ++ ++ return x; ++} ++ ++/***************************************** ++ * Defining the Output Assembler Language ++ *****************************************/ ++ ++/* -------------- * ++ * Output of Data ++ * -------------- */ ++ ++ ++/* -------------------------------- * ++ * Output of Assembler Instructions ++ * -------------------------------- */ ++ ++ ++/* print the operand OP to file stream ++ FILE modified by LETTER. LETTER ++ can be one of: ++ i: print "i" if OP is an immediate, except 0 ++ o: print "io" if OP is volatile ++ ++ z: for const0_rtx print $0 instead of 0 ++ H: for %hiadj ++ L: for %lo ++ U: for upper half of 32 bit value ++ D: for the upper 32-bits of a 64-bit double value ++ */ ++ ++void ++nios2_print_operand (FILE *file, rtx op, int letter) ++{ ++ ++ switch (letter) ++ { ++ case 'i': ++ if (CONSTANT_P (op) && (op != const0_rtx)) ++ fprintf (file, "i"); ++ return; ++ ++ case 'o': ++ if (GET_CODE (op) == MEM && TARGET_BYPASS_CACHE) ++ fprintf (file, "io"); ++ return; ++ ++ default: ++ break; ++ } ++ ++ if (comparison_operator (op, VOIDmode)) ++ { ++ if (letter == 0) ++ { ++ fprintf (file, "%s", GET_RTX_NAME (GET_CODE (op))); ++ return; ++ } ++ } ++ ++ ++ switch (GET_CODE (op)) ++ { ++ case REG: ++ if (letter == 0 || letter == 'z') ++ { ++ fprintf (file, "%s", reg_names[REGNO (op)]); ++ return; ++ } ++ else if (letter == 'D') ++ { ++ fprintf (file, "%s", reg_names[REGNO (op)+1]); ++ return; ++ } ++ break; ++ ++ case CONST_INT: ++ if (INTVAL (op) == 0 && letter == 'z') ++ { ++ fprintf (file, "zero"); ++ return; ++ } ++ else if (letter == 'U') ++ { ++ HOST_WIDE_INT val = INTVAL (op); ++ rtx new_op; ++ val = (val / 65536) & 0xFFFF; ++ new_op = GEN_INT (val); ++ output_addr_const (file, new_op); ++ return; ++ } ++ ++ /* else, fall through. */ ++ case CONST: ++ case LABEL_REF: ++ case SYMBOL_REF: ++ case CONST_DOUBLE: ++ if (letter == 0 || letter == 'z') ++ { ++ output_addr_const (file, op); ++ return; ++ } ++ else if (letter == 'H') ++ { ++ fprintf (file, "%%hiadj("); ++ output_addr_const (file, op); ++ fprintf (file, ")"); ++ return; ++ } ++ else if (letter == 'L') ++ { ++ fprintf (file, "%%lo("); ++ output_addr_const (file, op); ++ fprintf (file, ")"); ++ return; ++ } ++ break; ++ ++ ++ case SUBREG: ++ case MEM: ++ if (letter == 0) ++ { ++ output_address (op); ++ return; ++ } ++ break; ++ ++ case CODE_LABEL: ++ if (letter == 0) ++ { ++ output_addr_const (file, op); ++ return; ++ } ++ break; ++ ++ default: ++ break; ++ } ++ ++ fprintf (stderr, "Missing way to print (%c) ", letter); ++ debug_rtx (op); ++ gcc_unreachable (); ++} ++ ++static int gprel_constant (rtx); ++ ++static int ++gprel_constant (rtx op) ++{ ++ if (GET_CODE (op) == SYMBOL_REF ++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (op)) ++ return 1; ++ else if (GET_CODE (op) == CONST ++ && GET_CODE (XEXP (op, 0)) == PLUS) ++ return gprel_constant (XEXP (XEXP (op, 0), 0)); ++ else ++ return 0; ++} ++ ++void ++nios2_print_operand_address (FILE *file, rtx op) ++{ ++ switch (GET_CODE (op)) ++ { ++ case CONST: ++ case CONST_INT: ++ case LABEL_REF: ++ case CONST_DOUBLE: ++ case SYMBOL_REF: ++ if (gprel_constant (op)) ++ { ++ fprintf (file, "%%gprel("); ++ output_addr_const (file, op); ++ fprintf (file, ")(%s)", reg_names[GP_REGNO]); ++ return; ++ } ++ ++ break; ++ ++ case PLUS: ++ { ++ rtx op0 = XEXP (op, 0); ++ rtx op1 = XEXP (op, 1); ++ ++ if (REG_P (op0) && CONSTANT_P (op1)) ++ { ++ output_addr_const (file, op1); ++ fprintf (file, "(%s)", reg_names[REGNO (op0)]); ++ return; ++ } ++ else if (REG_P (op1) && CONSTANT_P (op0)) ++ { ++ output_addr_const (file, op0); ++ fprintf (file, "(%s)", reg_names[REGNO (op1)]); ++ return; ++ } ++ } ++ break; ++ ++ case REG: ++ fprintf (file, "0(%s)", reg_names[REGNO (op)]); ++ return; ++ ++ case MEM: ++ { ++ rtx base = XEXP (op, 0); ++ PRINT_OPERAND_ADDRESS (file, base); ++ return; ++ } ++ default: ++ break; ++ } ++ ++ fprintf (stderr, "Missing way to print address\n"); ++ debug_rtx (op); ++ gcc_unreachable (); ++} ++ ++ ++ ++/**************************** ++ * Debug information ++ ****************************/ ++ ++static void ++nios2_output_dwarf_dtprel (FILE *file, int size, rtx x) ++{ ++ gcc_assert (size == 4); ++ fputs ("\t.4byte\t%tls_ldo(", file); ++ output_addr_const (file, x); ++ fputs (")", file); ++} ++ ++ ++/**************************** ++ * Predicates ++ ****************************/ ++ ++/* An operand to a call or sibcall. This must be an immediate operand ++ or a register. */ ++int ++call_operand (rtx x, enum machine_mode mode) ++{ ++ return (immediate_operand (x, mode) ++ || register_operand (x, mode)); ++} ++ ++int ++arith_operand (rtx op, enum machine_mode mode) ++{ ++ if (GET_CODE (op) == CONST_INT && SMALL_INT (INTVAL (op))) ++ return 1; ++ ++ return register_operand (op, mode); ++} ++ ++int ++uns_arith_operand (rtx op, enum machine_mode mode) ++{ ++ if (GET_CODE (op) == CONST_INT && SMALL_INT_UNSIGNED (INTVAL (op))) ++ return 1; ++ ++ return register_operand (op, mode); ++} ++ ++int ++logical_operand (rtx op, enum machine_mode mode) ++{ ++ if (GET_CODE (op) == CONST_INT ++ && (SMALL_INT_UNSIGNED (INTVAL (op)) || UPPER16_INT (INTVAL (op)))) ++ return 1; ++ ++ return register_operand (op, mode); ++} ++ ++int ++shift_operand (rtx op, enum machine_mode mode) ++{ ++ if (GET_CODE (op) == CONST_INT && SHIFT_INT (INTVAL (op))) ++ return 1; ++ ++ return register_operand (op, mode); ++} ++ ++int ++rdwrctl_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) ++{ ++ return GET_CODE (op) == CONST_INT && RDWRCTL_INT (INTVAL (op)); ++} ++ ++/* Return truth value of whether OP is a register or the constant 0. */ ++ ++int ++reg_or_0_operand (rtx op, enum machine_mode mode) ++{ ++ switch (GET_CODE (op)) ++ { ++ case CONST_INT: ++ return INTVAL (op) == 0; ++ ++ case CONST_DOUBLE: ++ return op == CONST0_RTX (mode); ++ ++ default: ++ break; ++ } ++ ++ return register_operand (op, mode); ++} ++ ++ ++int ++equality_op (rtx op, enum machine_mode mode) ++{ ++ if (mode != GET_MODE (op)) ++ return 0; ++ ++ return GET_CODE (op) == EQ || GET_CODE (op) == NE; ++} ++ ++int ++custom_insn_opcode (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED) ++{ ++ return GET_CODE (op) == CONST_INT && CUSTOM_INSN_OPCODE (INTVAL (op)); ++} ++ ++ ++ ++ ++/***************************************************************************** ++** ++** custom fpu instruction output ++** ++*****************************************************************************/ ++ ++static const char *nios2_custom_fpu_insn_zdz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_zsz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_szz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_sss (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_ssz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_iss (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_ddd (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_ddz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_idd (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_siz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_suz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_diz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_duz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_isz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_usz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_idz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_udz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_dsz (rtx, int, const char *); ++static const char *nios2_custom_fpu_insn_sdz (rtx, int, const char *); ++ ++static const char * ++nios2_custom_fpu_insn_zdz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, zero, %%0, %%D0 # %s %%0", ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_zsz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, zero, %%0, zero # %s %%0", ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_szz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, %%0, zero, zero # %s %%0", ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_sss (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, %%0, %%1, %%2 # %s %%0, %%1, %%2", ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_ssz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, %%0, %%1, zero # %s %%0, %%1", ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_iss (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_sss (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_ddd (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0 ++ || nios2_fpu_insns[nios2_fpu_nios2_frdy].N < 0 ++ || nios2_fpu_insns[nios2_fpu_nios2_fwrx].N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, zero, %%1, %%D1 # fwrx %%1\n\t" ++ "custom\t%d, %%D0, %%2, %%D2 # %s %%0, %%1, %%2\n\t" ++ "custom\t%d, %%0, zero, zero # frdy %%0", ++ nios2_fpu_insns[nios2_fpu_nios2_fwrx].N, ++ N, opt, ++ nios2_fpu_insns[nios2_fpu_nios2_frdy].N) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_ddz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0 || nios2_fpu_insns[nios2_fpu_nios2_frdy].N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, %%D0, %%1, %%D1 # %s %%0, %%1\n\t" ++ "custom\t%d, %%0, zero, zero # frdy %%0", ++ N, opt, ++ nios2_fpu_insns[nios2_fpu_nios2_frdy].N) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_idd (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0 || nios2_fpu_insns[nios2_fpu_nios2_fwrx].N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, zero, %%1, %%D1 # fwrx %%1\n\t" ++ "custom\t%d, %%0, %%2, %%D2 # %s %%0, %%1, %%2", ++ nios2_fpu_insns[nios2_fpu_nios2_fwrx].N, ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_siz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_ssz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_suz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_ssz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_diz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_dsz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_duz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_dsz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_isz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_ssz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_usz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_ssz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_idz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_sdz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_udz (rtx insn, int N, const char *opt) ++{ ++ return nios2_custom_fpu_insn_sdz (insn, N, opt); ++} ++ ++static const char * ++nios2_custom_fpu_insn_dsz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0 || nios2_fpu_insns[nios2_fpu_nios2_frdy].N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, %%D0, %%1, zero # %s %%0, %%1\n\t" ++ "custom\t%d, %%0, zero, zero # frdy %%0", ++ N, opt, ++ nios2_fpu_insns[nios2_fpu_nios2_frdy].N) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++static const char * ++nios2_custom_fpu_insn_sdz (rtx insn, int N, const char *opt) ++{ ++ static char buf[1024]; ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ "custom\t%d, %%0, %%1, %%D1 # %s %%0, %%1", ++ N, opt) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++static const char * \ ++NIOS2_CONCAT (nios2_output_fpu_insn_, insn) (rtx i) \ ++{ \ ++ return NIOS2_CONCAT (nios2_custom_fpu_insn_, args) \ ++ (i, \ ++ nios2_fpu_insns[NIOS2_CONCAT (nios2_fpu_, insn)].N, \ ++ nios2_fpu_insns[NIOS2_CONCAT (nios2_fpu_, insn)].option); \ ++} ++NIOS2_FOR_ALL_FPU_INSNS ++ ++ ++ ++const char * ++nios2_output_fpu_insn_cmps (rtx insn, enum rtx_code cond) ++{ ++ static char buf[1024]; ++ int N; ++ const char *opt; ++ ++ int operandL = 2; ++ int operandR = 3; ++ ++ if (!have_nios2_fpu_cmp_insn(cond, CMP_SF) && ++ have_nios2_fpu_cmp_insn(get_reverse_cond(cond), CMP_SF) ) { ++ ++ int temp = operandL; ++ operandL = operandR; ++ operandR = temp; ++ ++ cond = get_reverse_cond(cond); ++ } ++ ++ switch (cond) ++ { ++ case EQ: ++ N = nios2_fpu_insns[nios2_fpu_nios2_seqsf].N; ++ opt = "fcmpeqs"; ++ break; ++ case NE: ++ N = nios2_fpu_insns[nios2_fpu_nios2_snesf].N; ++ opt = "fcmpnes"; ++ break; ++ case GT: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sgtsf].N; ++ opt = "fcmpgts"; ++ break; ++ case GE: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sgesf].N; ++ opt = "fcmpges"; ++ break; ++ case LT: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sltsf].N; ++ opt = "fcmplts"; ++ break; ++ case LE: ++ N = nios2_fpu_insns[nios2_fpu_nios2_slesf].N; ++ opt = "fcmples"; break; ++ default: ++ fatal_insn ("bad single compare", insn); ++ } ++ ++ if (N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ ++ /* ??? This raises the whole vexing issue of how to handle ++ out-of-range branches. Punt for now, seeing as how nios2-elf-as ++ doesn't even _try_ to handle out-of-range branches yet! */ ++ if (snprintf (buf, sizeof (buf), ++ ".set\tnoat\n\t" ++ "custom\t%d, at, %%%d, %%%d # %s at, %%%d, %%%d\n\t" ++ "bne\tat, zero, %%l1\n\t" ++ ".set\tat", ++ N, operandL, operandR, opt, operandL, operandR ++ ) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++const char * ++nios2_output_fpu_insn_cmpd (rtx insn, enum rtx_code cond) ++{ ++ static char buf[1024]; ++ int N; ++ const char *opt; ++ ++ int operandL = 2; ++ int operandR = 3; ++ ++ if ( !have_nios2_fpu_cmp_insn(cond, CMP_DF) && ++ have_nios2_fpu_cmp_insn(get_reverse_cond(cond), CMP_DF) ) ++ { ++ ++ int temp = operandL; ++ operandL = operandR; ++ operandR = temp; ++ ++ cond = get_reverse_cond(cond); ++ } ++ ++ switch (cond) ++ { ++ case EQ: ++ N = nios2_fpu_insns[nios2_fpu_nios2_seqdf].N; ++ opt = "fcmpeqd"; ++ break; ++ case NE: ++ N = nios2_fpu_insns[nios2_fpu_nios2_snedf].N; ++ opt = "fcmpned"; ++ break; ++ case GT: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sgtdf].N; ++ opt = "fcmpgtd"; ++ break; ++ case GE: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sgedf].N; ++ opt = "fcmpged"; ++ break; ++ case LT: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sltdf].N; ++ opt = "fcmpltd"; ++ break; ++ case LE: ++ N = nios2_fpu_insns[nios2_fpu_nios2_sledf].N; ++ opt = "fcmpled"; ++ break; ++ default: ++ fatal_insn ("bad double compare", insn); ++ } ++ ++ if (N < 0 || nios2_fpu_insns[nios2_fpu_nios2_fwrx].N < 0) ++ fatal_insn ("attempt to use disabled fpu instruction", insn); ++ if (snprintf (buf, sizeof (buf), ++ ".set\tnoat\n\t" ++ "custom\t%d, zero, %%%d, %%D%d # fwrx %%%d\n\t" ++ "custom\t%d, at, %%%d, %%D%d # %s at, %%%d, %%%d\n\t" ++ "bne\tat, zero, %%l1\n\t" ++ ".set\tat", ++ nios2_fpu_insns[nios2_fpu_nios2_fwrx].N, operandL, operandL, ++ operandL, N, operandR, operandR, opt, operandL, operandR ++ ) >= (int)sizeof (buf)) ++ fatal_insn ("buffer overflow", insn); ++ return buf; ++} ++ ++ ++ ++ ++/***************************************************************************** ++** ++** Instruction scheduler ++** ++*****************************************************************************/ ++static int ++nios2_issue_rate (void) ++{ ++#ifdef MAX_DFA_ISSUE_RATE ++ return MAX_DFA_ISSUE_RATE; ++#else ++ return 1; ++#endif ++} ++ ++ ++const char * ++asm_output_opcode (FILE *file ATTRIBUTE_UNUSED, ++ const char *ptr ATTRIBUTE_UNUSED) ++{ ++ const char *p; ++ ++ p = ptr; ++ return ptr; ++} ++ ++ ++ ++/***************************************************************************** ++** ++** Function arguments ++** ++*****************************************************************************/ ++ ++void ++init_cumulative_args (CUMULATIVE_ARGS *cum, ++ tree fntype ATTRIBUTE_UNUSED, ++ rtx libname ATTRIBUTE_UNUSED, ++ tree fndecl ATTRIBUTE_UNUSED, ++ int n_named_args ATTRIBUTE_UNUSED) ++{ ++ cum->regs_used = 0; ++} ++ ++ ++/* Define where to put the arguments to a function. Value is zero to ++ push the argument on the stack, or a hard register in which to ++ store the argument. ++ ++ MODE is the argument's machine mode. ++ TYPE is the data type of the argument (as a tree). ++ This is null for libcalls where that information may ++ not be available. ++ CUM is a variable of type CUMULATIVE_ARGS which gives info about ++ the preceding args and about the function being called. ++ NAMED is nonzero if this argument is a named parameter ++ (otherwise it is an extra parameter matching an ellipsis). */ ++rtx ++function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode mode, ++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED) ++{ ++ rtx return_rtx = NULL_RTX; ++ ++ if (cum->regs_used < NUM_ARG_REGS) ++ return_rtx = gen_rtx_REG (mode, FIRST_ARG_REGNO + cum->regs_used); ++ ++ return return_rtx; ++} ++ ++/* Return number of bytes, at the beginning of the argument, that must be ++ put in registers. 0 is the argument is entirely in registers or entirely ++ in memory. */ ++ ++static int ++nios2_arg_partial_bytes (CUMULATIVE_ARGS *cum, ++ enum machine_mode mode, tree type, ++ bool named ATTRIBUTE_UNUSED) ++{ ++ HOST_WIDE_INT param_size; ++ ++ if (mode == BLKmode) ++ { ++ param_size = int_size_in_bytes (type); ++ if (param_size < 0) ++ internal_error ++ ("Do not know how to handle large structs or variable length types"); ++ } ++ else ++ param_size = GET_MODE_SIZE (mode); ++ ++ /* Convert to words (round up). */ ++ param_size = (3 + param_size) / 4; ++ ++ if (cum->regs_used < NUM_ARG_REGS ++ && cum->regs_used + param_size > NUM_ARG_REGS) ++ return (NUM_ARG_REGS - cum->regs_used) * UNITS_PER_WORD; ++ else ++ return 0; ++} ++ ++static bool ++nios2_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ tree type ATTRIBUTE_UNUSED, ++ bool named ATTRIBUTE_UNUSED) ++{ ++ return false; ++} ++ ++ ++/* Update the data in CUM to advance over an argument ++ of mode MODE and data type TYPE. ++ (TYPE is null for libcalls where that information may not be available.) */ ++ ++void ++function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, ++ tree type ATTRIBUTE_UNUSED, int named ATTRIBUTE_UNUSED) ++{ ++ HOST_WIDE_INT param_size; ++ ++ if (mode == BLKmode) ++ { ++ param_size = int_size_in_bytes (type); ++ if (param_size < 0) ++ internal_error ++ ("Do not know how to handle large structs or variable length types"); ++ } ++ else ++ param_size = GET_MODE_SIZE (mode); ++ ++ /* Convert to words (round up). */ ++ param_size = (3 + param_size) / 4; ++ ++ if (cum->regs_used + param_size > NUM_ARG_REGS) ++ cum->regs_used = NUM_ARG_REGS; ++ else ++ cum->regs_used += param_size; ++ ++ return; ++} ++ ++int ++nios2_function_arg_padding_upward (enum machine_mode mode, tree type) ++{ ++ /* On little-endian targets, the first byte of every stack argument ++ is passed in the first byte of the stack slot. */ ++ if (!BYTES_BIG_ENDIAN) ++ return 1; ++ ++ /* Otherwise, integral types are padded downward: the last byte of a ++ stack argument is passed in the last byte of the stack slot. */ ++ if (type != 0 ++ ? INTEGRAL_TYPE_P (type) || POINTER_TYPE_P (type) ++ : GET_MODE_CLASS (mode) == MODE_INT) ++ return 0; ++ ++ /* Arguments smaller than a stack slot are padded downward. */ ++ if (mode != BLKmode) ++ return (GET_MODE_BITSIZE (mode) >= PARM_BOUNDARY) ? 1 : 0; ++ else ++ return ((int_size_in_bytes (type) >= (PARM_BOUNDARY / BITS_PER_UNIT)) ++ ? 1 : 0); ++} ++ ++int ++nios2_block_reg_padding_upward (enum machine_mode mode, tree type, ++ int first ATTRIBUTE_UNUSED) ++{ ++ /* ??? Do we need to treat floating point specially, ala MIPS? */ ++ return nios2_function_arg_padding_upward (mode, type); ++} ++ ++int ++nios2_return_in_memory (tree type) ++{ ++ int res = ((int_size_in_bytes (type) > (2 * UNITS_PER_WORD)) ++ || (int_size_in_bytes (type) == -1)); ++ ++ return res; ++} ++ ++/* ??? It may be possible to eliminate the copyback and implement ++ my own va_arg type, but that is more work for now. */ ++void ++nios2_setup_incoming_varargs (CUMULATIVE_ARGS *cum, ++ enum machine_mode mode, tree type, ++ int *pretend_size, int second_time) ++{ ++ CUMULATIVE_ARGS local_cum; ++ int regs_to_push; ++ int pret_size; ++ ++ local_cum = *cum; ++ FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1); ++ ++ regs_to_push = NUM_ARG_REGS - local_cum.regs_used; ++ ++ if (!second_time) ++ { ++ if (regs_to_push > 0) ++ { ++ rtx ptr, mem; ++ ++ ptr = virtual_incoming_args_rtx; ++ mem = gen_rtx_MEM (BLKmode, ptr); ++ ++ /* va_arg is an array access in this case, which causes ++ it to get MEM_IN_STRUCT_P set. We must set it here ++ so that the insn scheduler won't assume that these ++ stores can't possibly overlap with the va_arg loads. */ ++ MEM_SET_IN_STRUCT_P (mem, 1); ++ ++ emit_insn (gen_blockage ()); ++ move_block_from_reg (local_cum.regs_used + FIRST_ARG_REGNO, mem, ++ regs_to_push); ++ emit_insn (gen_blockage ()); ++ } ++ } ++ ++ pret_size = regs_to_push * UNITS_PER_WORD; ++ ++ if (pret_size) ++ *pretend_size = pret_size; ++} ++ ++ ++ ++/***************************************************************************** ++** ++** builtins ++** ++** This method for handling builtins is from CSP where _many_ more types of ++** expanders have already been written. Check there first before writing ++** new ones. ++** ++*****************************************************************************/ ++ ++enum nios2_builtins ++{ ++ NIOS2_BUILTIN_LDBIO, ++ NIOS2_BUILTIN_LDBUIO, ++ NIOS2_BUILTIN_LDHIO, ++ NIOS2_BUILTIN_LDHUIO, ++ NIOS2_BUILTIN_LDWIO, ++ NIOS2_BUILTIN_STBIO, ++ NIOS2_BUILTIN_STHIO, ++ NIOS2_BUILTIN_STWIO, ++ NIOS2_BUILTIN_SYNC, ++ NIOS2_BUILTIN_RDCTL, ++ NIOS2_BUILTIN_WRCTL, ++ ++#undef NIOS2_DO_BUILTIN ++#define NIOS2_DO_BUILTIN(upper, lower, handler) \ ++ NIOS2_CONCAT (NIOS2_BUILTIN_CUSTOM_, upper), ++NIOS2_FOR_ALL_CUSTOM_BUILTINS ++ ++ NIOS2_FIRST_FPU_INSN, ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ NIOS2_CONCAT (NIOS2_BUILTIN_FPU_, opt), ++NIOS2_FOR_ALL_FPU_INSNS ++ ++ NIOS2_LAST_FPU_INSN, ++ ++ LIM_NIOS2_BUILTINS ++}; ++ ++struct builtin_description ++{ ++ const enum insn_code icode; ++ const char *const name; ++ const enum nios2_builtins code; ++ const tree *type; ++ rtx (* expander) (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++}; ++ ++static rtx nios2_expand_STXIO (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_LDXIO (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_sync (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_rdctl (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_wrctl (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++ ++static rtx nios2_expand_custom_n (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_Xn (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_nX (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_XnX (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_nXX (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_XnXX (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++ ++static rtx nios2_expand_custom_zdz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_zsz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_szz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_sss (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_ssz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_iss (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_ddd (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_ddz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_idd (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_siz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_suz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_diz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_duz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_isz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_usz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_idz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_udz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_dsz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++static rtx nios2_expand_custom_sdz (const struct builtin_description *, ++ tree, rtx, rtx, enum machine_mode, int); ++ ++static tree endlink; ++ ++/* int fn (volatile const void *) ++ */ ++static tree int_ftype_volatile_const_void_p; ++ ++/* int fn (int) ++ */ ++static tree int_ftype_int; ++ ++/* void fn (int, int) ++ */ ++static tree void_ftype_int_int; ++ ++/* void fn (volatile void *, int) ++ */ ++static tree void_ftype_volatile_void_p_int; ++ ++/* void fn (void) ++ */ ++static tree void_ftype_void; ++ ++#undef NIOS2_DO_BUILTIN ++#define NIOS2_DO_BUILTIN(upper, lower, handler) \ ++ static tree NIOS2_CONCAT (custom_, lower); ++NIOS2_FOR_ALL_CUSTOM_BUILTINS ++ ++static tree custom_zdz; ++static tree custom_zsz; ++static tree custom_szz; ++static tree custom_sss; ++static tree custom_ssz; ++static tree custom_iss; ++static tree custom_ddd; ++static tree custom_ddz; ++static tree custom_idd; ++static tree custom_siz; ++static tree custom_suz; ++static tree custom_diz; ++static tree custom_duz; ++static tree custom_isz; ++static tree custom_usz; ++static tree custom_idz; ++static tree custom_udz; ++static tree custom_dsz; ++static tree custom_sdz; ++ ++static const struct builtin_description bdesc[] = { ++ {CODE_FOR_ldbio, "__builtin_ldbio", NIOS2_BUILTIN_LDBIO, ++ &int_ftype_volatile_const_void_p, nios2_expand_LDXIO}, ++ {CODE_FOR_ldbuio, "__builtin_ldbuio", NIOS2_BUILTIN_LDBUIO, ++ &int_ftype_volatile_const_void_p, nios2_expand_LDXIO}, ++ {CODE_FOR_ldhio, "__builtin_ldhio", NIOS2_BUILTIN_LDHIO, ++ &int_ftype_volatile_const_void_p, nios2_expand_LDXIO}, ++ {CODE_FOR_ldhuio, "__builtin_ldhuio", NIOS2_BUILTIN_LDHUIO, ++ &int_ftype_volatile_const_void_p, nios2_expand_LDXIO}, ++ {CODE_FOR_ldwio, "__builtin_ldwio", NIOS2_BUILTIN_LDWIO, ++ &int_ftype_volatile_const_void_p, nios2_expand_LDXIO}, ++ ++ {CODE_FOR_stbio, "__builtin_stbio", NIOS2_BUILTIN_STBIO, ++ &void_ftype_volatile_void_p_int, nios2_expand_STXIO}, ++ {CODE_FOR_sthio, "__builtin_sthio", NIOS2_BUILTIN_STHIO, ++ &void_ftype_volatile_void_p_int, nios2_expand_STXIO}, ++ {CODE_FOR_stwio, "__builtin_stwio", NIOS2_BUILTIN_STWIO, ++ &void_ftype_volatile_void_p_int, nios2_expand_STXIO}, ++ ++ {CODE_FOR_sync, "__builtin_sync", NIOS2_BUILTIN_SYNC, ++ &void_ftype_void, nios2_expand_sync}, ++ {CODE_FOR_rdctl, "__builtin_rdctl", NIOS2_BUILTIN_RDCTL, ++ &int_ftype_int, nios2_expand_rdctl}, ++ {CODE_FOR_wrctl, "__builtin_wrctl", NIOS2_BUILTIN_WRCTL, ++ &void_ftype_int_int, nios2_expand_wrctl}, ++ ++#undef NIOS2_DO_BUILTIN ++#define NIOS2_DO_BUILTIN(upper, lower, handler) \ ++ {NIOS2_CONCAT (CODE_FOR_custom_, lower), \ ++ "__builtin_custom_" NIOS2_STRINGIFY (lower), \ ++ NIOS2_CONCAT (NIOS2_BUILTIN_CUSTOM_, upper), \ ++ &NIOS2_CONCAT (custom_, lower), \ ++ NIOS2_CONCAT (nios2_expand_custom_, handler)}, ++NIOS2_FOR_ALL_CUSTOM_BUILTINS ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ {NIOS2_CONCAT (CODE_FOR_, insn), \ ++ "__builtin_custom_" NIOS2_STRINGIFY (opt), \ ++ NIOS2_CONCAT (NIOS2_BUILTIN_FPU_, opt), \ ++ &NIOS2_CONCAT (custom_, args), \ ++ NIOS2_CONCAT (nios2_expand_custom_, args)}, ++NIOS2_FOR_ALL_FPU_INSNS ++ ++ {0, 0, 0, 0, 0}, ++}; ++ ++static void ++nios2_init_builtins (void) ++{ ++ const struct builtin_description *d; ++ ++ ++ endlink = void_list_node; ++ ++ /* int fn (volatile const void *) ++ */ ++ int_ftype_volatile_const_void_p = build_function_type ( ++ integer_type_node, ++ tree_cons (NULL_TREE, ++ build_qualified_type (ptr_type_node, ++ TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE), ++ endlink)); ++ ++ /* void fn (volatile void *, int) ++ */ ++ void_ftype_volatile_void_p_int = build_function_type ( ++ void_type_node, ++ tree_cons (NULL_TREE, ++ build_qualified_type (ptr_type_node, TYPE_QUAL_VOLATILE), ++ tree_cons (NULL_TREE, integer_type_node, endlink))); ++ ++ /* void fn (void) ++ */ ++ void_ftype_void ++ = build_function_type (void_type_node, ++ endlink); ++ ++ /* int fn (int) ++ */ ++ int_ftype_int ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ ++ /* void fn (int, int) ++ */ ++ void_ftype_int_int ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink))); ++ ++ custom_n ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ custom_ni ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink))); ++ custom_nf ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink))); ++ custom_np ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink))); ++ custom_nii ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_nif ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_nip ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_nfi ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_nff ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_nfp ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_npi ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_npf ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_npp ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ ++ custom_in ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ custom_ini ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink))); ++ custom_inf ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink))); ++ custom_inp ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink))); ++ custom_inii ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_inif ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_inip ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_infi ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_inff ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_infp ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_inpi ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_inpf ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_inpp ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ ++ custom_fn ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ custom_fni ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink))); ++ custom_fnf ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink))); ++ custom_fnp ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink))); ++ custom_fnii ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_fnif ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_fnip ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_fnfi ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_fnff ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_fnfp ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_fnpi ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_fnpf ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_fnpp ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ ++ ++ custom_pn ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ custom_pni ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink))); ++ custom_pnf ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink))); ++ custom_pnp ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink))); ++ custom_pnii ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_pnif ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_pnip ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_pnfi ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_pnff ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_pnfp ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ custom_pnpi ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)))); ++ custom_pnpf ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)))); ++ custom_pnpp ++ = build_function_type (ptr_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ tree_cons (NULL_TREE, ptr_type_node, ++ endlink)))); ++ ++ custom_zdz ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink)); ++ ++ custom_zsz ++ = build_function_type (void_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)); ++ ++ custom_szz ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, void_type_node, ++ endlink)); ++ ++ custom_sss ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink))); ++ ++ custom_ssz ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)); ++ ++ custom_iss ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink))); ++ ++ custom_ddd ++ = build_function_type (double_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink))); ++ ++ custom_ddz ++ = build_function_type (double_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink)); ++ ++ custom_idd ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink))); ++ ++ custom_siz ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ ++ custom_suz ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, unsigned_type_node, ++ endlink)); ++ ++ custom_diz ++ = build_function_type (double_type_node, ++ tree_cons (NULL_TREE, integer_type_node, ++ endlink)); ++ ++ custom_duz ++ = build_function_type (double_type_node, ++ tree_cons (NULL_TREE, unsigned_type_node, ++ endlink)); ++ ++ custom_isz ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)); ++ ++ custom_usz ++ = build_function_type (unsigned_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)); ++ ++ custom_idz ++ = build_function_type (integer_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink)); ++ ++ custom_udz ++ = build_function_type (unsigned_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink)); ++ ++ custom_dsz ++ = build_function_type (double_type_node, ++ tree_cons (NULL_TREE, float_type_node, ++ endlink)); ++ ++ custom_sdz ++ = build_function_type (float_type_node, ++ tree_cons (NULL_TREE, double_type_node, ++ endlink)); ++ ++ ++ for (d = bdesc; d->name; d++) ++ builtin_function (d->name, *d->type, d->code, ++ BUILT_IN_MD, NULL, NULL); ++} ++/* Expand an expression EXP that calls a built-in function, ++ with result going to TARGET if that's convenient ++ (and in mode MODE if that's convenient). ++ SUBTARGET may be used as the target for computing one of EXP's operands. ++ IGNORE is nonzero if the value is to be ignored. */ ++ ++static rtx ++nios2_expand_builtin (tree exp, rtx target, rtx subtarget, ++ enum machine_mode mode, int ignore) ++{ ++ const struct builtin_description *d; ++ tree fndecl = TREE_OPERAND (TREE_OPERAND (exp, 0), 0); ++ unsigned int fcode = DECL_FUNCTION_CODE (fndecl); ++ ++ for (d = bdesc; d->name; d++) ++ if (d->code == fcode) ++ { ++ if (d->code > NIOS2_FIRST_FPU_INSN && d->code < NIOS2_LAST_FPU_INSN) ++ { ++ nios2_fpu_info *inf = &nios2_fpu_insns[d->code - ++ (NIOS2_FIRST_FPU_INSN + 1)]; ++ const struct insn_data *idata = &insn_data[d->icode]; ++ if (inf->N < 0) ++ fatal_error ("Cannot call `%s' without specifying switch" ++ " `-mcustom-%s'", ++ d->name, ++ inf->option); ++ if (inf->args[0] != 'z' ++ && (!target ++ || !(idata->operand[0].predicate) (target, ++ idata->operand[0].mode))) ++ target = gen_reg_rtx (idata->operand[0].mode); ++ } ++ return (d->expander) (d, exp, target, subtarget, mode, ignore); ++ } ++ ++ /* We should have seen one of the functins we registered. */ ++ gcc_unreachable (); ++} ++ ++static rtx nios2_create_target (const struct builtin_description *, rtx); ++ ++ ++static rtx ++nios2_create_target (const struct builtin_description *d, rtx target) ++{ ++ if (!target ++ || !(*insn_data[d->icode].operand[0].predicate) ( ++ target, insn_data[d->icode].operand[0].mode)) ++ { ++ target = gen_reg_rtx (insn_data[d->icode].operand[0].mode); ++ } ++ ++ return target; ++} ++ ++ ++static rtx nios2_extract_opcode (const struct builtin_description *, int, tree); ++static rtx nios2_extract_operand (const struct builtin_description *, int, int, ++ tree); ++ ++static rtx ++nios2_extract_opcode (const struct builtin_description *d, int op, tree arglist) ++{ ++ enum machine_mode mode = insn_data[d->icode].operand[op].mode; ++ tree arg = TREE_VALUE (arglist); ++ rtx opcode = expand_expr (arg, NULL_RTX, mode, 0); ++ ++ if (!(*insn_data[d->icode].operand[op].predicate) (opcode, mode)) ++ error ("Custom instruction opcode must be compile time constant in the " ++ "range 0-255 for %s", d->name); ++ ++ builtin_custom_seen[INTVAL (opcode)] = d->name; ++ nios2_custom_check_insns (0); ++ return opcode; ++} ++ ++static rtx ++nios2_extract_operand (const struct builtin_description *d, int op, int argnum, ++ tree arglist) ++{ ++ enum machine_mode mode = insn_data[d->icode].operand[op].mode; ++ tree arg = TREE_VALUE (arglist); ++ rtx operand = expand_expr (arg, NULL_RTX, mode, 0); ++ ++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode)) ++ operand = copy_to_mode_reg (mode, operand); ++ ++ /* ??? Better errors would be nice. */ ++ if (!(*insn_data[d->icode].operand[op].predicate) (operand, mode)) ++ error ("Invalid argument %d to %s", argnum, d->name); ++ ++ return operand; ++} ++ ++ ++static rtx ++nios2_expand_custom_n (const struct builtin_description *d, tree exp, ++ rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx opcode; ++ ++ /* custom_n should have exactly one operand. */ ++ gcc_assert (insn_data[d->icode].n_operands == 1); ++ ++ opcode = nios2_extract_opcode (d, 0, arglist); ++ ++ pat = GEN_FCN (d->icode) (opcode); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return 0; ++} ++ ++static rtx ++nios2_expand_custom_Xn (const struct builtin_description *d, tree exp, ++ rtx target, rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx opcode; ++ ++ /* custom_Xn should have exactly two operands. */ ++ gcc_assert (insn_data[d->icode].n_operands == 2); ++ ++ target = nios2_create_target (d, target); ++ opcode = nios2_extract_opcode (d, 1, arglist); ++ ++ pat = GEN_FCN (d->icode) (target, opcode); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_nX (const struct builtin_description *d, tree exp, ++ rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx opcode; ++ rtx operands[1]; ++ int i; ++ ++ ++ /* custom_nX should have exactly two operands. */ ++ gcc_assert (insn_data[d->icode].n_operands == 2); ++ ++ opcode = nios2_extract_opcode (d, 0, arglist); ++ for (i = 0; i < 1; i++) ++ { ++ arglist = TREE_CHAIN (arglist); ++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist); ++ } ++ ++ pat = GEN_FCN (d->icode) (opcode, operands[0]); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return 0; ++} ++ ++static rtx ++nios2_expand_custom_XnX (const struct builtin_description *d, tree exp, ++ rtx target, rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx opcode; ++ rtx operands[1]; ++ int i; ++ ++ /* custom_Xn should have exactly three operands. */ ++ gcc_assert (insn_data[d->icode].n_operands == 3); ++ ++ target = nios2_create_target (d, target); ++ opcode = nios2_extract_opcode (d, 1, arglist); ++ ++ for (i = 0; i < 1; i++) ++ { ++ arglist = TREE_CHAIN (arglist); ++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist); ++ } ++ ++ pat = GEN_FCN (d->icode) (target, opcode, operands[0]); ++ ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_nXX (const struct builtin_description *d, tree exp, ++ rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx opcode; ++ rtx operands[2]; ++ int i; ++ ++ ++ /* custom_nX should have exactly three operands. */ ++ gcc_assert (insn_data[d->icode].n_operands == 3); ++ ++ opcode = nios2_extract_opcode (d, 0, arglist); ++ for (i = 0; i < 2; i++) ++ { ++ arglist = TREE_CHAIN (arglist); ++ operands[i] = nios2_extract_operand (d, i + 1, i + 1, arglist); ++ } ++ ++ pat = GEN_FCN (d->icode) (opcode, operands[0], operands[1]); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return 0; ++} ++ ++static rtx ++nios2_expand_custom_XnXX (const struct builtin_description *d, tree exp, ++ rtx target, rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx opcode; ++ rtx operands[2]; ++ int i; ++ ++ ++ /* custom_XnX should have exactly four operands. */ ++ gcc_assert (insn_data[d->icode].n_operands == 4); ++ ++ target = nios2_create_target (d, target); ++ opcode = nios2_extract_opcode (d, 1, arglist); ++ for (i = 0; i < 2; i++) ++ { ++ arglist = TREE_CHAIN (arglist); ++ operands[i] = nios2_extract_operand (d, i + 2, i + 1, arglist); ++ } ++ ++ pat = GEN_FCN (d->icode) (target, opcode, operands[0], operands[1]); ++ ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return target; ++} ++ ++ ++ ++static rtx ++nios2_expand_STXIO (const struct builtin_description *d, tree exp, ++ rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx store_dest, store_val; ++ enum insn_code icode = d->icode; ++ ++ /* Stores should have exactly two operands. */ ++ gcc_assert (insn_data[icode].n_operands == 2); ++ ++ /* Process the destination of the store. */ ++ { ++ enum machine_mode mode = insn_data[icode].operand[0].mode; ++ tree arg = TREE_VALUE (arglist); ++ store_dest = expand_expr (arg, NULL_RTX, VOIDmode, 0); ++ ++ store_dest = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, store_dest)); ++ ++ /* ??? Better errors would be nice. */ ++ if (!(*insn_data[icode].operand[0].predicate) (store_dest, mode)) ++ error ("Invalid argument 1 to %s", d->name); ++ } ++ ++ ++ /* Process the value to store. */ ++ { ++ enum machine_mode mode = insn_data[icode].operand[1].mode; ++ tree arg = TREE_VALUE (TREE_CHAIN (arglist)); ++ store_val = expand_expr (arg, NULL_RTX, mode, 0); ++ ++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode)) ++ store_val = copy_to_mode_reg (mode, store_val); ++ ++ /* ??? Better errors would be nice. */ ++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode)) ++ error ("Invalid argument 2 to %s", d->name); ++ } ++ ++ pat = GEN_FCN (d->icode) (store_dest, store_val); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return 0; ++} ++ ++ ++static rtx ++nios2_expand_LDXIO (const struct builtin_description * d, tree exp, rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx ld_src; ++ enum insn_code icode = d->icode; ++ ++ /* Loads should have exactly two operands. */ ++ gcc_assert (insn_data[icode].n_operands == 2); ++ ++ target = nios2_create_target (d, target); ++ ++ { ++ enum machine_mode mode = insn_data[icode].operand[1].mode; ++ tree arg = TREE_VALUE (arglist); ++ ld_src = expand_expr (arg, NULL_RTX, VOIDmode, 0); ++ ++ ld_src = gen_rtx_MEM (mode, copy_to_mode_reg (Pmode, ld_src)); ++ ++ /* ??? Better errors would be nice. */ ++ if (!(*insn_data[icode].operand[1].predicate) (ld_src, mode)) ++ error ("Invalid argument 1 to %s", d->name); ++ } ++ ++ pat = GEN_FCN (d->icode) (target, ld_src); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return target; ++} ++ ++ ++static rtx ++nios2_expand_sync (const struct builtin_description * d ATTRIBUTE_UNUSED, ++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ emit_insn (gen_sync ()); ++ return 0; ++} ++ ++static rtx ++nios2_expand_rdctl (const struct builtin_description * d ATTRIBUTE_UNUSED, ++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx rdctl_reg; ++ enum insn_code icode = d->icode; ++ ++ /* rdctl should have exactly two operands. */ ++ gcc_assert (insn_data[icode].n_operands == 2); ++ ++ target = nios2_create_target (d, target); ++ ++ { ++ enum machine_mode mode = insn_data[icode].operand[1].mode; ++ tree arg = TREE_VALUE (arglist); ++ rdctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0); ++ ++ if (!(*insn_data[icode].operand[1].predicate) (rdctl_reg, mode)) ++ error ("Control register number must be in range 0-31 for %s", d->name); ++ } ++ ++ pat = GEN_FCN (d->icode) (target, rdctl_reg); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_wrctl (const struct builtin_description * d ATTRIBUTE_UNUSED, ++ tree exp ATTRIBUTE_UNUSED, rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat; ++ rtx wrctl_reg, store_val; ++ enum insn_code icode = d->icode; ++ ++ /* Stores should have exactly two operands. */ ++ gcc_assert (insn_data[icode].n_operands == 2); ++ ++ /* Process the destination of the store. */ ++ { ++ enum machine_mode mode = insn_data[icode].operand[0].mode; ++ tree arg = TREE_VALUE (arglist); ++ wrctl_reg = expand_expr (arg, NULL_RTX, VOIDmode, 0); ++ ++ if (!(*insn_data[icode].operand[0].predicate) (wrctl_reg, mode)) ++ error ("Control register number must be in range 0-31 for %s", d->name); ++ } ++ ++ ++ /* Process the value to store. */ ++ { ++ enum machine_mode mode = insn_data[icode].operand[1].mode; ++ tree arg = TREE_VALUE (TREE_CHAIN (arglist)); ++ store_val = expand_expr (arg, NULL_RTX, mode, 0); ++ ++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode)) ++ store_val = copy_to_mode_reg (mode, store_val); ++ ++ /* ??? Better errors would be nice. */ ++ if (!(*insn_data[icode].operand[1].predicate) (store_val, mode)) ++ error ("Invalid argument 2 to %s", d->name); ++ } ++ ++ pat = GEN_FCN (d->icode) (wrctl_reg, store_val); ++ if (!pat) ++ return 0; ++ emit_insn (pat); ++ return 0; ++} ++ ++static rtx ++nios2_extract_double (const struct insn_data *idata, tree arglist, int index) ++{ ++ rtx arg; ++ ++ while (index--) ++ arglist = TREE_CHAIN (arglist); ++ arg = expand_expr (TREE_VALUE (arglist), NULL_RTX, DFmode, 0); ++ if (!(*(idata->operand[index+1].predicate)) (arg, DFmode)) ++ arg = copy_to_mode_reg (DFmode, arg); ++ return arg; ++} ++ ++static rtx ++nios2_extract_float (const struct insn_data *idata, tree arglist, int index) ++{ ++ rtx arg; ++ ++ while (index--) ++ arglist = TREE_CHAIN (arglist); ++ arg = expand_expr (TREE_VALUE (arglist), NULL_RTX, SFmode, 0); ++ if (!(*(idata->operand[index+1].predicate)) (arg, SFmode)) ++ arg = copy_to_mode_reg (SFmode, arg); ++ return arg; ++} ++ ++static rtx ++nios2_extract_integer (const struct insn_data *idata, tree arglist, int index) ++{ ++ rtx arg; ++ ++ while (index--) ++ arglist = TREE_CHAIN (arglist); ++ arg = expand_expr (TREE_VALUE (arglist), NULL_RTX, SImode, 0); ++ if (!(*(idata->operand[index+1].predicate)) (arg, SImode)) ++ arg = copy_to_mode_reg (SImode, arg); ++ return arg; ++} ++ ++static rtx ++nios2_expand_custom_zdz (const struct builtin_description *d, ++ tree exp, ++ rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (nios2_extract_double (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return 0; ++} ++ ++static rtx ++nios2_expand_custom_zsz (const struct builtin_description *d, ++ tree exp, ++ rtx target ATTRIBUTE_UNUSED, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (nios2_extract_float (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return 0; ++} ++ ++static rtx ++nios2_expand_custom_szz (const struct builtin_description *d, ++ tree exp ATTRIBUTE_UNUSED, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ rtx pat = GEN_FCN (d->icode) (target); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_sss (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 0), ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 1)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_ssz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_iss (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 0), ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 1)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_ddd (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 0), ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 1)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_ddz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_idd (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 0), ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 1)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_siz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_integer (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_suz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_integer (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_diz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_integer (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_duz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_integer (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_isz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_usz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_idz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_udz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_dsz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_float (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++static rtx ++nios2_expand_custom_sdz (const struct builtin_description *d, ++ tree exp, ++ rtx target, ++ rtx subtarget ATTRIBUTE_UNUSED, ++ enum machine_mode mode ATTRIBUTE_UNUSED, ++ int ignore ATTRIBUTE_UNUSED) ++{ ++ tree arglist = TREE_OPERAND (exp, 1); ++ rtx pat = GEN_FCN (d->icode) (target, ++ nios2_extract_double (&insn_data[d->icode], ++ arglist, 0)); ++ if (pat) ++ emit_insn (pat); ++ return target; ++} ++ ++#include "gt-nios2.h" ++ +Index: gcc-4.1.2/gcc/config/nios2/nios2.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/nios2.h 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,1064 @@ ++/* NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. */ ++/* Definitions of target machine for Altera NIOS 2G NIOS2 version. ++ Copyright (C) 2007 Altera ++ Contributed by Jonah Graham (jgraham@altera.com), ++ Will Reece (wreece@altera.com), and Jeff DaSilva (jdasilva@altera.com). ++ ++This file is part of GNU CC. ++ ++GNU CC 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. ++ ++GNU CC 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 GNU CC; see the file COPYING. If not, write to ++the Free Software Foundation, 59 Temple Place - Suite 330, ++Boston, MA 02111-1307, USA. */ ++ ++ ++ ++#define TARGET_CPU_CPP_BUILTINS() \ ++ do \ ++ { \ ++ builtin_define_std ("NIOS2"); \ ++ builtin_define_std ("nios2"); \ ++ if (TARGET_BIG_ENDIAN) \ ++ builtin_define_std ("nios2_big_endian"); \ ++ else \ ++ builtin_define_std ("nios2_little_endian"); \ ++ } \ ++ while (0) ++#define TARGET_VERSION fprintf (stderr, " (Altera Nios II)") ++ ++ ++ ++ ++ ++/********************************* ++ * Run-time Target Specification ++ *********************************/ ++ ++extern int target_flags; ++ ++/* ++ * There's a lot of error-prone tedium with all the different ++ * custom floating point instructions. Try to automate it a bit ++ * to make it easier to deal with. ++ */ ++#define NIOS2_STRINGIFY_INNER(x) #x ++#define NIOS2_STRINGIFY(x) NIOS2_STRINGIFY_INNER(x) ++#define NIOS2_CONCAT_INNER(x, y) x ## y ++#define NIOS2_CONCAT(x, y) NIOS2_CONCAT_INNER (x, y) ++ ++#define NIOS2_FOR_ALL_FPU_INSNS \ ++ NIOS2_FPU_INSN (fwrx, nios2_fwrx, zdz) \ ++ NIOS2_FPU_INSN (fwry, nios2_fwry, zsz) \ ++ NIOS2_FPU_INSN (frdxlo, nios2_frdxlo, szz) \ ++ NIOS2_FPU_INSN (frdxhi, nios2_frdxhi, szz) \ ++ NIOS2_FPU_INSN (frdy, nios2_frdy, szz) \ ++\ ++ NIOS2_FPU_INSN (fadds, addsf3, sss) \ ++ NIOS2_FPU_INSN (fsubs, subsf3, sss) \ ++ NIOS2_FPU_INSN (fmuls, mulsf3, sss) \ ++ NIOS2_FPU_INSN (fdivs, divsf3, sss) \ ++ NIOS2_FPU_INSN (fmins, minsf3, sss) \ ++ NIOS2_FPU_INSN (fmaxs, maxsf3, sss) \ ++ NIOS2_FPU_INSN (fnegs, negsf2, ssz) \ ++ NIOS2_FPU_INSN (fabss, abssf2, ssz) \ ++ NIOS2_FPU_INSN (fsqrts, sqrtsf2, ssz) \ ++ NIOS2_FPU_INSN (fcoss, cossf2, ssz) \ ++ NIOS2_FPU_INSN (fsins, sinsf2, ssz) \ ++ NIOS2_FPU_INSN (ftans, tansf2, ssz) \ ++ NIOS2_FPU_INSN (fatans, atansf2, ssz) \ ++ NIOS2_FPU_INSN (fexps, expsf2, ssz) \ ++ NIOS2_FPU_INSN (flogs, logsf2, ssz) \ ++ NIOS2_FPU_INSN (fcmplts, nios2_sltsf, iss) \ ++ NIOS2_FPU_INSN (fcmples, nios2_slesf, iss) \ ++ NIOS2_FPU_INSN (fcmpgts, nios2_sgtsf, iss) \ ++ NIOS2_FPU_INSN (fcmpges, nios2_sgesf, iss) \ ++ NIOS2_FPU_INSN (fcmpeqs, nios2_seqsf, iss) \ ++ NIOS2_FPU_INSN (fcmpnes, nios2_snesf, iss) \ ++\ ++ NIOS2_FPU_INSN (faddd, adddf3, ddd) \ ++ NIOS2_FPU_INSN (fsubd, subdf3, ddd) \ ++ NIOS2_FPU_INSN (fmuld, muldf3, ddd) \ ++ NIOS2_FPU_INSN (fdivd, divdf3, ddd) \ ++ NIOS2_FPU_INSN (fmind, mindf3, ddd) \ ++ NIOS2_FPU_INSN (fmaxd, maxdf3, ddd) \ ++ NIOS2_FPU_INSN (fnegd, negdf2, ddz) \ ++ NIOS2_FPU_INSN (fabsd, absdf2, ddz) \ ++ NIOS2_FPU_INSN (fsqrtd, sqrtdf2, ddz) \ ++ NIOS2_FPU_INSN (fcosd, cosdf2, ddz) \ ++ NIOS2_FPU_INSN (fsind, sindf2, ddz) \ ++ NIOS2_FPU_INSN (ftand, tandf2, ddz) \ ++ NIOS2_FPU_INSN (fatand, atandf2, ddz) \ ++ NIOS2_FPU_INSN (fexpd, expdf2, ddz) \ ++ NIOS2_FPU_INSN (flogd, logdf2, ddz) \ ++ NIOS2_FPU_INSN (fcmpltd, nios2_sltdf, idd) \ ++ NIOS2_FPU_INSN (fcmpled, nios2_sledf, idd) \ ++ NIOS2_FPU_INSN (fcmpgtd, nios2_sgtdf, idd) \ ++ NIOS2_FPU_INSN (fcmpged, nios2_sgedf, idd) \ ++ NIOS2_FPU_INSN (fcmpeqd, nios2_seqdf, idd) \ ++ NIOS2_FPU_INSN (fcmpned, nios2_snedf, idd) \ ++\ ++ NIOS2_FPU_INSN (floatis, floatsisf2, siz) \ ++ NIOS2_FPU_INSN (floatus, floatunssisf2, suz) \ ++ NIOS2_FPU_INSN (floatid, floatsidf2, diz) \ ++ NIOS2_FPU_INSN (floatud, floatunssidf2, duz) \ ++ NIOS2_FPU_INSN (fixsi, fixsfsi2, isz) \ ++ NIOS2_FPU_INSN (fixsu, fixunssfsi2, usz) \ ++ NIOS2_FPU_INSN (fixdi, fixdfsi2, idz) \ ++ NIOS2_FPU_INSN (fixdu, fixunsdfsi2, udz) \ ++ NIOS2_FPU_INSN (fextsd, extendsfdf2, dsz) \ ++ NIOS2_FPU_INSN (ftruncds, truncdfsf2, sdz) ++ ++enum ++{ ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ NIOS2_CONCAT (nios2_fpu_, insn), ++NIOS2_FOR_ALL_FPU_INSNS ++ nios2_fpu_max_insn ++}; ++ ++struct cpp_reader; ++typedef const char * (*nios2_outputfn) (rtx); ++typedef void (*nios2_pragmafn) (struct cpp_reader *); ++ ++typedef struct ++{ ++ const char *option; /* name of switch, e.g. fadds */ ++ const char *insnnm; /* name of gcc insn, e.g. addsf3 */ ++ const char *args; /* args to gcc insn, e.g. sss */ ++ int N; /* value of switch as an integer, -1 = not used */ ++ nios2_outputfn output; /* output function for use in .md file */ ++ const char *pname; /* name of corresponding #pragma custom- */ ++ nios2_pragmafn pragma; /* pragma function for register_target_pragmas */ ++ const char *nopname; /* name of corresponding #pragma no-custom- */ ++ nios2_pragmafn nopragma; /* pragma function for register_target_pragmas */ ++ int is_double; /* does this insn have any double operands */ ++ int needed_by_double; /* is this insn needed if doubles are used? */ ++ int needs_unsafe; /* does this insn require ++ -funsafe-math-optimizations to work? */ ++ int needs_finite; /* does this insn require ++ -ffinite-math-only to work? */ ++ int pragma_seen; /* have we seen the corresponding #pragma? */ ++ int* pN; /* pointer to the value as set by the option ++ parser. */ ++} nios2_fpu_info; ++ ++extern nios2_fpu_info nios2_fpu_insns[nios2_fpu_max_insn]; ++extern const char *nios2_custom_fpu_cfg_string; ++ ++#undef NIOS2_FPU_INSN ++#define NIOS2_FPU_INSN(opt, insn, args) \ ++ extern int NIOS2_CONCAT (nios2_custom_, opt); ++NIOS2_FOR_ALL_FPU_INSNS ++ ++/* We're little endian, unless otherwise specified by defining BIG_ENDIAN_FLAG ++*/ ++#ifndef TARGET_ENDIAN_DEFAULT ++# define TARGET_ENDIAN_DEFAULT 0 ++#endif ++ ++/* Default target_flags if no switches specified. */ ++#ifndef TARGET_DEFAULT ++# define TARGET_DEFAULT (MASK_HAS_MUL | \ ++ TARGET_ENDIAN_DEFAULT) ++#endif ++ ++/* Switch Recognition by gcc.c. Add -G xx support */ ++#undef SWITCH_TAKES_ARG ++#define SWITCH_TAKES_ARG(CHAR) \ ++ (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G') ++ ++#define OVERRIDE_OPTIONS override_options () ++#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) optimization_options (LEVEL, SIZE) ++#define CAN_DEBUG_WITHOUT_FP ++ ++#define CC1_SPEC "\ ++%{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}}" ++ ++#if TARGET_ENDIAN_DEFAULT == 0 ++# define ASM_SPEC "\ ++%{!EB:%{!meb:-EL}} %{EB|meb:-EB}" ++# define LINK_SPEC_ENDIAN "\ ++%{!EB:%{!meb:-EL}} %{EB|meb:-EB}" ++# define MULTILIB_DEFAULTS { "EL" } ++#else ++# define ASM_SPEC "\ ++%{!EL:%{!mel:-EB}} %{EL|mel:-EL}" ++# define LINK_SPEC_ENDIAN "\ ++%{!EL:%{!mel:-EB}} %{EL|mel:-EL}" ++# define MULTILIB_DEFAULTS { "EB" } ++#endif ++ ++#define LINK_SPEC LINK_SPEC_ENDIAN \ ++ " %{shared:-shared} \ ++ %{static:-Bstatic}" ++ ++#undef LIB_SPEC ++#define LIB_SPEC \ ++"--start-group -lc -lgcc \ ++ -lnosys -lstack \ ++ --end-group \ ++" ++ ++ ++#undef STARTFILE_SPEC ++#define STARTFILE_SPEC \ ++"crt0%O%s" ++ ++#undef ENDFILE_SPEC ++#define ENDFILE_SPEC \ ++ "" ++ ++ ++/*********************** ++ * Storage Layout ++ ***********************/ ++ ++#define DEFAULT_SIGNED_CHAR 1 ++#define BITS_BIG_ENDIAN 0 ++#define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) ++#define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN != 0) ++#if defined(__nios2_big_endian__) ++#define LIBGCC2_WORDS_BIG_ENDIAN 1 ++#else ++#define LIBGCC2_WORDS_BIG_ENDIAN 0 ++#endif ++#define BITS_PER_UNIT 8 ++#define BITS_PER_WORD 32 ++#define UNITS_PER_WORD 4 ++#define POINTER_SIZE 32 ++#define BIGGEST_ALIGNMENT 32 ++#define STRICT_ALIGNMENT 1 ++#define FUNCTION_BOUNDARY 32 ++#define PARM_BOUNDARY 32 ++#define STACK_BOUNDARY 32 ++#define PREFERRED_STACK_BOUNDARY 32 ++#define MAX_FIXED_MODE_SIZE 64 ++ ++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ++ ((TREE_CODE (EXP) == STRING_CST) \ ++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) ++ ++ ++/********************** ++ * Layout of Source Language Data Types ++ **********************/ ++ ++#define INT_TYPE_SIZE 32 ++#define SHORT_TYPE_SIZE 16 ++#define LONG_TYPE_SIZE 32 ++#define LONG_LONG_TYPE_SIZE 64 ++#define FLOAT_TYPE_SIZE 32 ++#define DOUBLE_TYPE_SIZE 64 ++#define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE ++ ++ ++/************************* ++ * Condition Code Status ++ ************************/ ++ ++/* comparison type */ ++/* ??? Currently CMP_DI is unused. CMP_SF and CMP_DF are only used if ++ the corresponding -mcustom-<opcode> switches are present. */ ++enum cmp_type { ++ CMP_SI, /* compare four byte integers */ ++ CMP_DI, /* compare eight byte integers */ ++ CMP_SF, /* compare single precision floats */ ++ CMP_DF, /* compare double precision floats */ ++ CMP_MAX /* max comparison type */ ++}; ++ ++extern GTY(()) rtx branch_cmp[2]; /* operands for compare */ ++extern enum cmp_type branch_type; /* what type of branch to use */ ++ ++/********************** ++ * Register Usage ++ **********************/ ++ ++/* ---------------------------------- * ++ * Basic Characteristics of Registers ++ * ---------------------------------- */ ++ ++/* ++Register Number ++ Register Name ++ Alternate Name ++ Purpose ++0 r0 zero always zero ++1 r1 at Assembler Temporary ++2-3 r2-r3 Return Location ++4-7 r4-r7 Register Arguments ++8-15 r8-r15 Caller Saved Registers ++16-22 r16-r22 Callee Saved Registers ++21 r21 sc Static Chain (Callee Saved) ++ ??? Does $sc want to be caller or callee ++ saved. If caller, 15, else 21. ++22 r22 Global Offset Table pointer ++23 r23 Thread pointer ++24 r24 et Exception Temporary ++25 r25 bt Breakpoint Temporary ++26 r26 gp Global Pointer ++27 r27 sp Stack Pointer ++28 r28 fp Frame Pointer ++29 r29 ea Exception Return Address ++30 r30 ba Breakpoint Return Address ++31 r31 ra Return Address ++ ++32 ctl0 status ++33 ctl1 estatus STATUS saved by exception ? ++34 ctl2 bstatus STATUS saved by break ? ++35 ctl3 ipri Interrupt Priority Mask ? ++36 ctl4 ecause Exception Cause ? ++ ++37 pc Not an actual register ++ ++38 fake_fp Fake Frame Pointer which will always be eliminated. ++39 fake_ap Fake Argument Pointer which will always be eliminated. ++ ++40 First Pseudo Register ++ ++ ++The definitions for all the hard register numbers ++are located in nios2.md. ++*/ ++ ++#define ET_REGNO (24) ++#define GP_REGNO (26) ++#define SP_REGNO (27) ++#define FP_REGNO (28) ++#define EA_REGNO (29) ++#define RA_REGNO (31) ++#define FIRST_RETVAL_REGNO (2) ++#define LAST_RETVAL_REGNO (3) ++#define FIRST_ARG_REGNO (4) ++#define LAST_ARG_REGNO (7) ++#define SC_REGNO (21) ++#define PC_REGNO (37) ++#define FAKE_FP_REGNO (38) ++#define FAKE_AP_REGNO (39) ++ ++#define FIRST_PSEUDO_REGISTER 40 ++#define NUM_ARG_REGS (LAST_ARG_REGNO - FIRST_ARG_REGNO + 1) ++ ++ ++ ++#define FIXED_REGISTERS \ ++ { \ ++/* +0 1 2 3 4 5 6 7 8 9 */ \ ++/* 0 */ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, \ ++/* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ ++/* 20 */ 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, \ ++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \ ++ } ++ ++/* call used is the same as caller saved ++ + fixed regs + args + ret vals */ ++#define CALL_USED_REGISTERS \ ++ { \ ++/* +0 1 2 3 4 5 6 7 8 9 */ \ ++/* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ ++/* 10 */ 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, \ ++/* 20 */ 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, \ ++/* 30 */ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, \ ++ } ++ ++#define THREAD_POINTER_REGNUM 23 ++ ++#define HARD_REGNO_NREGS(REGNO, MODE) \ ++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ ++ / UNITS_PER_WORD) ++ ++/* --------------------------- * ++ * How Values Fit in Registers ++ * --------------------------- */ ++ ++#define HARD_REGNO_MODE_OK(REGNO, MODE) 1 ++ ++#define MODES_TIEABLE_P(MODE1, MODE2) 1 ++ ++ ++/************************* ++ * Register Classes ++ *************************/ ++ ++enum reg_class ++{ ++ NO_REGS, ++ D00_REG, ++ D01_REG, ++ D02_REG, ++ D03_REG, ++ D04_REG, ++ D05_REG, ++ D06_REG, ++ D07_REG, ++ D08_REG, ++ D09_REG, ++ D10_REG, ++ D11_REG, ++ D12_REG, ++ D13_REG, ++ D14_REG, ++ D15_REG, ++ D16_REG, ++ D17_REG, ++ D18_REG, ++ D19_REG, ++ D20_REG, ++ D21_REG, ++ D22_REG, ++ D23_REG, ++ D24_REG, ++ D25_REG, ++ D26_REG, ++ D27_REG, ++ D28_REG, ++ D29_REG, ++ D30_REG, ++ D31_REG, ++ SIB_REGS, ++ GP_REGS, ++ ALL_REGS, ++ LIM_REG_CLASSES ++}; ++ ++#define N_REG_CLASSES (int) LIM_REG_CLASSES ++ ++#define REG_CLASS_NAMES \ ++ {"NO_REGS", \ ++ "D00_REG", \ ++ "D01_REG", \ ++ "D02_REG", \ ++ "D03_REG", \ ++ "D04_REG", \ ++ "D05_REG", \ ++ "D06_REG", \ ++ "D07_REG", \ ++ "D08_REG", \ ++ "D09_REG", \ ++ "D10_REG", \ ++ "D11_REG", \ ++ "D12_REG", \ ++ "D13_REG", \ ++ "D14_REG", \ ++ "D15_REG", \ ++ "D16_REG", \ ++ "D17_REG", \ ++ "D18_REG", \ ++ "D19_REG", \ ++ "D20_REG", \ ++ "D21_REG", \ ++ "D22_REG", \ ++ "D23_REG", \ ++ "D24_REG", \ ++ "D25_REG", \ ++ "D26_REG", \ ++ "D27_REG", \ ++ "D28_REG", \ ++ "D29_REG", \ ++ "D30_REG", \ ++ "D31_REG", \ ++ "SIB_REGS", \ ++ "GP_REGS", \ ++ "ALL_REGS"} ++ ++#define GENERAL_REGS ALL_REGS ++ ++#define REG_CLASS_CONTENTS \ ++/* NO_REGS */ {{ 0, 0}, \ ++/* D00_REG */ { 1 << 0, 0}, \ ++/* D01_REG */ { 1 << 1, 0}, \ ++/* D02_REG */ { 1 << 2, 0}, \ ++/* D03_REG */ { 1 << 3, 0}, \ ++/* D04_REG */ { 1 << 4, 0}, \ ++/* D05_REG */ { 1 << 5, 0}, \ ++/* D06_REG */ { 1 << 6, 0}, \ ++/* D07_REG */ { 1 << 7, 0}, \ ++/* D08_REG */ { 1 << 8, 0}, \ ++/* D09_REG */ { 1 << 9, 0}, \ ++/* D10_REG */ { 1 << 10, 0}, \ ++/* D11_REG */ { 1 << 11, 0}, \ ++/* D12_REG */ { 1 << 12, 0}, \ ++/* D13_REG */ { 1 << 13, 0}, \ ++/* D14_REG */ { 1 << 14, 0}, \ ++/* D15_REG */ { 1 << 15, 0}, \ ++/* D16_REG */ { 1 << 16, 0}, \ ++/* D17_REG */ { 1 << 17, 0}, \ ++/* D18_REG */ { 1 << 18, 0}, \ ++/* D19_REG */ { 1 << 19, 0}, \ ++/* D20_REG */ { 1 << 20, 0}, \ ++/* D21_REG */ { 1 << 21, 0}, \ ++/* D22_REG */ { 1 << 22, 0}, \ ++/* D23_REG */ { 1 << 23, 0}, \ ++/* D24_REG */ { 1 << 24, 0}, \ ++/* D25_REG */ { 1 << 25, 0}, \ ++/* D26_REG */ { 1 << 26, 0}, \ ++/* D27_REG */ { 1 << 27, 0}, \ ++/* D28_REG */ { 1 << 28, 0}, \ ++/* D29_REG */ { 1 << 29, 0}, \ ++/* D30_REG */ { 1 << 30, 0}, \ ++/* D31_REG */ { 1 << 31, 0}, \ ++/* SIB_REGS */ { 0xfe0c, 0}, \ ++/* GP_REGS */ {~0, 0}, \ ++/* ALL_REGS */ {~0,~0}} \ ++ ++#define GP_REGNO_P(REGNO) ((REGNO) < 32) ++#define REGNO_REG_CLASS(REGNO) (GP_REGNO_P (REGNO) ? GP_REGS : ALL_REGS) ++ ++#define BASE_REG_CLASS ALL_REGS ++#define INDEX_REG_CLASS ALL_REGS ++ ++/* 'r', is handled automatically */ ++#define REG_CLASS_FROM_LETTER(C) ((C) == 'j' ? SIB_REGS : NO_REGS) ++ ++#define REG_CLASS_FROM_CONSTRAINT(CHAR, STR) \ ++ ((CHAR) == 'j' ? SIB_REGS : \ ++ reg_class_from_constraint ((CHAR), (STR))) ++ ++ ++#define REGNO_OK_FOR_BASE_P2(REGNO, STRICT) \ ++ ((STRICT) \ ++ ? (REGNO) < FIRST_PSEUDO_REGISTER \ ++ : (REGNO) < FIRST_PSEUDO_REGISTER || \ ++ (reg_renumber && reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER)) ++ ++#define REGNO_OK_FOR_INDEX_P2(REGNO, STRICT) \ ++ (REGNO_OK_FOR_BASE_P2 (REGNO, STRICT)) ++ ++#define REGNO_OK_FOR_BASE_P(REGNO) \ ++ (REGNO_OK_FOR_BASE_P2 (REGNO, 1)) ++ ++#define REGNO_OK_FOR_INDEX_P(REGNO) \ ++ (REGNO_OK_FOR_INDEX_P2 (REGNO, 1)) ++ ++#define REG_OK_FOR_BASE_P2(X, STRICT) \ ++ (STRICT \ ++ ? REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) \ ++ : REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) || \ ++ REGNO(X) >= FIRST_PSEUDO_REGISTER) ++ ++#define REG_OK_FOR_INDEX_P2(X, STRICT) \ ++ (STRICT \ ++ ? REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) \ ++ : REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) || \ ++ REGNO(X) >= FIRST_PSEUDO_REGISTER) ++ ++#define CLASS_MAX_NREGS(CLASS, MODE) \ ++ ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \ ++ / UNITS_PER_WORD) ++ ++ ++#define SMALL_INT(X) ((unsigned HOST_WIDE_INT) ((X) + 0x8000) < 0x10000) ++#define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (X) < 0x10000) ++#define UPPER16_INT(X) (((X) & 0xffff) == 0) ++#define SHIFT_INT(X) ((X) >= 0 && (X) <= 31) ++#define RDWRCTL_INT(X) ((X) >= 0 && (X) <= 31) ++#define CUSTOM_INSN_OPCODE(X) ((X) >= 0 && (X) <= 255) ++ ++#define CONST_OK_FOR_LETTER_P(VALUE, C) \ ++ ( \ ++ (C) == 'I' ? SMALL_INT (VALUE) : \ ++ (C) == 'J' ? SMALL_INT_UNSIGNED (VALUE) : \ ++ (C) == 'K' ? UPPER16_INT (VALUE) : \ ++ (C) == 'L' ? SHIFT_INT (VALUE) : \ ++ (C) == 'M' ? (VALUE) == 0 : \ ++ (C) == 'N' ? CUSTOM_INSN_OPCODE (VALUE) : \ ++ (C) == 'O' ? RDWRCTL_INT (VALUE) : \ ++ 0) ++ ++#define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0 ++ ++#define PREFERRED_RELOAD_CLASS(X, CLASS) \ ++ ((CLASS) == NO_REGS ? GENERAL_REGS : (CLASS)) ++ ++#define CONSTRAINT_LEN(C, STR) \ ++ ((C) == 'D' ? 3 : DEFAULT_CONSTRAINT_LEN ((C), (STR))) ++ ++/* 'S' matches immediates which are in small data ++ and therefore can be added to gp to create a ++ 32-bit value. */ ++#define EXTRA_CONSTRAINT(VALUE, C) \ ++ ((C) == 'S' \ ++ && (GET_CODE (VALUE) == SYMBOL_REF) \ ++ && SYMBOL_REF_IN_NIOS2_SMALL_DATA_P (VALUE)) ++ ++ ++ ++ ++/* Say that the epilogue uses the return address register. Note that ++ in the case of sibcalls, the values "used by the epilogue" are ++ considered live at the start of the called function. */ ++#define EPILOGUE_USES(REGNO) ((REGNO) == RA_REGNO) ++ ++ ++/********************************** ++ * Trampolines for Nested Functions ++ ***********************************/ ++ ++#define TRAMPOLINE_TEMPLATE(FILE) \ ++ error ("trampolines not yet implemented") ++#define TRAMPOLINE_SIZE 20 ++#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ ++ error ("trampolines not yet implemented") ++ ++/*************************** ++ * Stack Layout and Calling Conventions ++ ***************************/ ++ ++/* ------------------ * ++ * Basic Stack Layout ++ * ------------------ */ ++ ++/* The downward variants are used by the compiler, ++ the upward ones serve as documentation */ ++#define STACK_GROWS_DOWNWARD ++#define FRAME_GROWS_UPWARD ++#define ARGS_GROW_UPWARD ++ ++#define STARTING_FRAME_OFFSET 0 ++#define FIRST_PARM_OFFSET(FUNDECL) 0 ++ ++/* Before the prologue, RA lives in r31. */ ++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (VOIDmode, RA_REGNO) ++#define RETURN_ADDR_RTX(C,F) nios2_get_return_address (C) ++ ++/* -------------------------------------- * ++ * Registers That Address the Stack Frame ++ * -------------------------------------- */ ++ ++#define STACK_POINTER_REGNUM SP_REGNO ++#define STATIC_CHAIN_REGNUM SC_REGNO ++#define PC_REGNUM PC_REGNO ++#define DWARF_FRAME_RETURN_COLUMN RA_REGNO ++ ++/* The DWARF 2 CFA column which tracks the return address from a ++ signal handler context. */ ++#define SIGNAL_UNWIND_RETURN_COLUMN EA_REGNO ++ ++/* Base register for access to local variables of the function. We ++ pretend that the frame pointer is a non-existent hard register, and ++ then eliminate it to HARD_FRAME_POINTER_REGNUM. */ ++#define FRAME_POINTER_REGNUM FAKE_FP_REGNO ++ ++#define HARD_FRAME_POINTER_REGNUM FP_REGNO ++/* the argumnet pointer needs to always be eliminated ++ so it is set to a fake hard register. */ ++#define ARG_POINTER_REGNUM FAKE_AP_REGNO ++ ++/* The CFA includes the pretend args */ ++#define ARG_POINTER_CFA_OFFSET(FNDECL) \ ++ (gcc_assert ((FNDECL) == current_function_decl), \ ++ FIRST_PARM_OFFSET (FNDECL) + current_function_pretend_args_size) ++ ++/* ----------------------------------------- * ++ * Eliminating Frame Pointer and Arg Pointer ++ * ----------------------------------------- */ ++ ++#define FRAME_POINTER_REQUIRED 0 ++ ++#define ELIMINABLE_REGS \ ++{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ ++ { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ ++ { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ ++ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} ++ ++#define CAN_ELIMINATE(FROM, TO) \ ++ ((TO) == STACK_POINTER_REGNUM ? ! frame_pointer_needed : 1) ++ ++#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ++ (OFFSET) = nios2_initial_elimination_offset ((FROM), (TO)) ++ ++/* Treat LOC as a byte offset from the stack pointer and round it up ++ to the next fully-aligned offset. */ ++#define STACK_ALIGN(LOC) \ ++ (((LOC) + ((PREFERRED_STACK_BOUNDARY / 8) - 1)) & \ ++ ~((PREFERRED_STACK_BOUNDARY / 8) - 1)) ++ ++ ++/* ------------------------------ * ++ * Passing Arguments in Registers ++ * ------------------------------ */ ++ ++/* see nios2.c */ ++#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ ++ (function_arg (&CUM, MODE, TYPE, NAMED)) ++ ++#define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 0 ++ ++typedef struct nios2_args ++{ ++ int regs_used; ++} CUMULATIVE_ARGS; ++ ++/* This is to initialize the above unused CUM data type */ ++#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ ++ (init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS)) ++ ++#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ ++ (function_arg_advance (&CUM, MODE, TYPE, NAMED)) ++ ++#define FUNCTION_ARG_PADDING(MODE, TYPE) \ ++ (nios2_function_arg_padding_upward ((MODE), (TYPE)) ? upward : downward) ++ ++#define PAD_VARARGS_DOWN \ ++ (FUNCTION_ARG_PADDING (TYPE_MODE (type), type) == downward) ++ ++#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \ ++ (nios2_block_reg_padding_upward ((MODE), (TYPE), (FIRST)) ? upward : \ ++ downward) ++ ++#define FUNCTION_ARG_REGNO_P(REGNO) \ ++ ((REGNO) >= FIRST_ARG_REGNO && (REGNO) <= LAST_ARG_REGNO) ++ ++/* ----------------------------- * ++ * Generating Code for Profiling ++ * ----------------------------- */ ++ ++ ++#define PROFILE_BEFORE_PROLOGUE ++#define NO_PROFILE_COUNTERS 1 ++#define FUNCTION_PROFILER(FILE, LABELNO) \ ++ function_profiler ((FILE), (LABELNO)) ++ ++/* --------------------------------------- * ++ * Passing Function Arguments on the Stack ++ * --------------------------------------- */ ++ ++#define PUSH_ARGS 0 ++#define ACCUMULATE_OUTGOING_ARGS 1 ++ ++#define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACKSIZE) 0 ++ ++/* --------------------------------------- * ++ * How Scalar Function Values Are Returned ++ * --------------------------------------- */ ++ ++#define FUNCTION_VALUE(VALTYPE, FUNC) \ ++ gen_rtx_REG(TYPE_MODE(VALTYPE), FIRST_RETVAL_REGNO) ++ ++#define LIBCALL_VALUE(MODE) \ ++ gen_rtx_REG(MODE, FIRST_RETVAL_REGNO) ++ ++#define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == FIRST_RETVAL_REGNO) ++ ++/* ----------------------------- * ++ * How Large Values Are Returned ++ * ----------------------------- */ ++ ++ ++#define RETURN_IN_MEMORY(TYPE) \ ++ nios2_return_in_memory (TYPE) ++ ++ ++#define STRUCT_VALUE 0 ++ ++#define DEFAULT_PCC_STRUCT_RETURN 0 ++ ++/******************* ++ * Addressing Modes ++ *******************/ ++ ++ ++#define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ ++ do \ ++ { \ ++ X = nios2_legitimize_address (X, OLDX, MODE); \ ++ if (memory_address_p (MODE, X)) \ ++ goto WIN; \ ++ } \ ++ while (0) ++ ++#define CONSTANT_ADDRESS_P(X) \ ++ (CONSTANT_P (X) && nios2_legitimate_address (X, Pmode, 0)) ++ ++#define MAX_REGS_PER_ADDRESS 1 ++ ++/* Go to ADDR if X is a valid address. */ ++#ifndef REG_OK_STRICT ++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ ++ { \ ++ if (nios2_legitimate_address ((X), (MODE), 0)) \ ++ goto ADDR; \ ++ } ++#else ++#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ ++ { \ ++ if (nios2_legitimate_address ((X), (MODE), 1)) \ ++ goto ADDR; \ ++ } ++#endif ++ ++#ifndef REG_OK_STRICT ++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 0) ++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 0) ++#else ++#define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P2 (REGNO (X), 1) ++#define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P2 (REGNO (X), 1) ++#endif ++ ++#define LEGITIMATE_CONSTANT_P(X) nios2_legitimate_constant (X) ++ ++/* Nios II has no mode dependent addresses. */ ++#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) ++ ++/* Set if this has a weak declaration */ ++#define SYMBOL_FLAG_WEAK_DECL (1 << SYMBOL_FLAG_MACH_DEP_SHIFT) ++#define SYMBOL_REF_WEAK_DECL_P(RTX) \ ++ ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_WEAK_DECL) != 0) ++ ++ ++/* true if a symbol is both small and not weak. In this case, gp ++ relative access can be used. gp relative access cannot be used in ++ position independent code. gp relative access cannot be used for externally ++ defined symbols, because the compilation unit which defines the symbol may ++ place it in a section that cannot be reached from gp. */ ++#define SYMBOL_REF_IN_NIOS2_SMALL_DATA_P(RTX) \ ++ (!flag_pic && SYMBOL_REF_SMALL_P(RTX) && !SYMBOL_REF_WEAK_DECL_P(RTX) && \ ++ !SYMBOL_REF_EXTERNAL_P(RTX) && SYMBOL_REF_TLS_MODEL(RTX)==0) ++ ++/***************** ++ * Describing Relative Costs of Operations ++ *****************/ ++ ++#define SLOW_BYTE_ACCESS 1 ++ ++/* It is as good to call a constant function address as to call an address ++ kept in a register. ++ ??? Not true anymore really. Now that call cannot address full range ++ of memory callr may need to be used */ ++ ++#define NO_FUNCTION_CSE ++ ++/*************************** ++ * Position Independent Code ++ ***************************/ ++ ++#define PIC_OFFSET_TABLE_REGNUM 22 ++ ++#define LEGITIMATE_PIC_OPERAND_P(X) nios2_legitimate_pic_operand_p (X) ++ ++/***************************************** ++ * Defining the Output Assembler Language ++ *****************************************/ ++ ++/* ------------------------------------------ * ++ * The Overall Framework of an Assembler File ++ * ------------------------------------------ */ ++ ++#define ASM_APP_ON "#APP\n" ++#define ASM_APP_OFF "#NO_APP\n" ++ ++#define ASM_COMMENT_START "# " ++ ++/* ------------------------------- * ++ * Output and Generation of Labels ++ * ------------------------------- */ ++ ++#define GLOBAL_ASM_OP "\t.global\t" ++ ++ ++/* -------------- * ++ * Output of Data ++ * -------------- */ ++ ++/* -------------------------------- * ++ * Assembler Commands for Alignment ++ * -------------------------------- */ ++ ++#define ASM_OUTPUT_ALIGN(FILE, LOG) \ ++ do { \ ++ fprintf ((FILE), "%s%d\n", ALIGN_ASM_OP, (LOG)); \ ++ } while (0) ++ ++ ++/* -------------------------------- * ++ * Output of Assembler Instructions ++ * -------------------------------- */ ++ ++#define REGISTER_NAMES \ ++{ \ ++ "zero", \ ++ "at", \ ++ "r2", \ ++ "r3", \ ++ "r4", \ ++ "r5", \ ++ "r6", \ ++ "r7", \ ++ "r8", \ ++ "r9", \ ++ "r10", \ ++ "r11", \ ++ "r12", \ ++ "r13", \ ++ "r14", \ ++ "r15", \ ++ "r16", \ ++ "r17", \ ++ "r18", \ ++ "r19", \ ++ "r20", \ ++ "r21", \ ++ "r22", \ ++ "r23", \ ++ "et", \ ++ "bt", \ ++ "gp", \ ++ "sp", \ ++ "fp", \ ++ "ta", \ ++ "ba", \ ++ "ra", \ ++ "status", \ ++ "estatus", \ ++ "bstatus", \ ++ "ipri", \ ++ "ecause", \ ++ "pc", \ ++ "fake_fp", \ ++ "fake_ap", \ ++} ++ ++#define ADDITIONAL_REGISTER_NAMES \ ++{ \ ++ {"r0", 0}, \ ++ {"r1", 1}, \ ++ {"r24", 24}, \ ++ {"r25", 25}, \ ++ {"r26", 26}, \ ++ {"r27", 27}, \ ++ {"r28", 28}, \ ++ {"r29", 29}, \ ++ {"r30", 30}, \ ++ {"r31", 31} \ ++} ++ ++ ++#define ASM_OUTPUT_OPCODE(STREAM, PTR)\ ++ (PTR) = asm_output_opcode (STREAM, PTR) ++ ++#define PRINT_OPERAND(STREAM, X, CODE) \ ++ nios2_print_operand (STREAM, X, CODE) ++ ++#define PRINT_OPERAND_ADDRESS(STREAM, X) \ ++ nios2_print_operand_address (STREAM, X) ++ ++#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ ++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), FILE); \ ++ fprintf (FILE, ".L%u\n", (unsigned) (VALUE)); \ ++ } while (0) ++ ++#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)\ ++do { fputs (integer_asm_op (POINTER_SIZE / BITS_PER_UNIT, TRUE), STREAM); \ ++ fprintf (STREAM, ".L%u-.L%u\n", (unsigned) (VALUE), (unsigned) (REL)); \ ++ } while (0) ++ ++ ++/* ------------ * ++ * Label Output ++ * ------------ */ ++ ++ ++/* ---------------------------------------------------- * ++ * Dividing the Output into Sections (Texts, Data, ...) ++ * ---------------------------------------------------- */ ++ ++/* Output before read-only data. */ ++#define TEXT_SECTION_ASM_OP "\t.section\t.text" ++ ++/* Output before writable data. */ ++#define DATA_SECTION_ASM_OP "\t.section\t.data" ++ ++ ++/* Default the definition of "small data" to 8 bytes. */ ++/* ??? How come I can't use HOST_WIDE_INT here? */ ++extern unsigned long nios2_section_threshold; ++#define NIOS2_DEFAULT_GVALUE 8 ++ ++ ++ ++/* This says how to output assembler code to declare an ++ uninitialized external linkage data object. Under SVR4, ++ the linker seems to want the alignment of data objects ++ to depend on their types. We do exactly that here. */ ++ ++#undef COMMON_ASM_OP ++#define COMMON_ASM_OP "\t.comm\t" ++ ++#undef ASM_OUTPUT_ALIGNED_COMMON ++#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ ++do \ ++{ \ ++ fprintf ((FILE), "%s", COMMON_ASM_OP); \ ++ assemble_name ((FILE), (NAME)); \ ++ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), \ ++ (ALIGN) / BITS_PER_UNIT); \ ++} \ ++while (0) ++ ++ ++/* This says how to output assembler code to declare an ++ uninitialized internal linkage data object. Under SVR4, ++ the linker seems to want the alignment of data objects ++ to depend on their types. We do exactly that here. */ ++ ++#undef ASM_OUTPUT_ALIGNED_LOCAL ++#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ ++do { \ ++ if ((SIZE) <= nios2_section_threshold) \ ++ named_section (0, ".sbss", 0); \ ++ else \ ++ named_section (0, ".bss", 0); \ ++ ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object"); \ ++ if (!flag_inhibit_size_directive) \ ++ ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ ++ ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \ ++ ASM_OUTPUT_LABEL(FILE, NAME); \ ++ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \ ++} while (0) ++ ++/* Put the jump tables in .text because when using position independent code, ++ Nios II elf has no relocation that can represent arbitrary differences ++ between symbols in different sections. */ ++#define JUMP_TABLES_IN_TEXT_SECTION 1 ++ ++/* Exception Handling */ ++ ++/* Describe __builtin_eh_return */ ++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, LAST_RETVAL_REGNO) ++#define EH_RETURN_DATA_REGNO(N) ((N) <= (LAST_ARG_REGNO - FIRST_ARG_REGNO) \ ++ ? (N) + FIRST_ARG_REGNO : INVALID_REGNUM) ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \ ++ (!flag_pic ? DW_EH_PE_sdata4 \ ++ /* FIXME: These get expanded to dynamic relocs, which is wrong */ \ ++ /* : !(GLOBAL) ? DW_EH_PE_pcrel | DW_EH_PE_sdata4 */ \ ++ : DW_EH_PE_aligned) ++ ++/*************************** ++ * Miscellaneous Parameters ++ ***************************/ ++ ++#define MOVE_MAX 4 ++ ++#define STORE_FLAG_VALUE 1 ++#define Pmode SImode ++#define FUNCTION_MODE QImode ++ ++#define REGISTER_TARGET_PRAGMAS() nios2_register_target_pragmas () ++ ++#define CASE_VECTOR_MODE Pmode ++ ++#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 ++ ++#define LOAD_EXTEND_OP(MODE) (ZERO_EXTEND) ++ ++#define WORD_REGISTER_OPERATIONS +Index: gcc-4.1.2/gcc/config/nios2/nios2.md +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/nios2.md 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,3012 @@ ++;; NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. ++;; ++;; Machine Description for Altera NIOS 2G NIOS2 version. ++;; Copyright (C) 2005 Altera ++;; Contributed by Jonah Graham (jgraham@altera.com) and ++;; Will Reece (wreece@altera.com). ++;; ++;; This file is part of GNU CC. ++;; ++;; GNU CC 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. ++;; ++;; GNU CC 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 GNU CC; see the file COPYING. If not, write to ++;; the Free Software Foundation, 59 Temple Place - Suite 330, ++;; Boston, MA 02111-1307, USA. */ ++ ++ ++ ++ ++;***************************************************************************** ++;* ++;* constraint strings ++;* ++;***************************************************************************** ++; ++; We use the following constraint letters for constants ++; ++; I: -32768 to -32767 ++; J: 0 to 65535 ++; K: $nnnn0000 for some nnnn ++; L: 0 to 31 (for shift counts) ++; M: 0 ++; N: 0 to 255 (for custom instruction numbers) ++; O: 0 to 31 (for control register numbers) ++; ++; We use the following built-in register classes: ++; ++; r: general purpose register (r0..r31) ++; m: memory operand ++; ++; Plus, we define the following constraint strings: ++; ++; S: symbol that is in the "small data" area ++; Dnn: Dnn_REG (just rnn) ++; ++ ++ ++ ++;***************************************************************************** ++;* ++;* constants ++;* ++;***************************************************************************** ++(define_constants [ ++ (UNSPEC_BLOCKAGE 0) ++ (UNSPEC_LDBIO 1) ++ (UNSPEC_LDBUIO 2) ++ (UNSPEC_LDHIO 3) ++ (UNSPEC_LDHUIO 4) ++ (UNSPEC_LDWIO 5) ++ (UNSPEC_STBIO 6) ++ (UNSPEC_STHIO 7) ++ (UNSPEC_STWIO 8) ++ (UNSPEC_SYNC 9) ++ (UNSPEC_WRCTL 10) ++ (UNSPEC_RDCTL 11) ++ (UNSPEC_TRAP 12) ++ (UNSPEC_STACK_OVERFLOW_DETECT_AND_TRAP 13) ++ (UNSPEC_FCOSS 14) ++ (UNSPEC_FCOSD 15) ++ (UNSPEC_FSINS 16) ++ (UNSPEC_FSIND 17) ++ (UNSPEC_FTANS 18) ++ (UNSPEC_FTAND 19) ++ (UNSPEC_FATANS 20) ++ (UNSPEC_FATAND 21) ++ (UNSPEC_FEXPS 22) ++ (UNSPEC_FEXPD 23) ++ (UNSPEC_FLOGS 24) ++ (UNSPEC_FLOGD 25) ++ (UNSPEC_FWRX 26) ++ (UNSPEC_FWRY 27) ++ (UNSPEC_FRDXLO 28) ++ (UNSPEC_FRDXHI 29) ++ (UNSPEC_FRDY 30) ++ (UNSPEC_LOAD_GOT_REGISTER 31) ++ (UNSPEC_PIC_SYM 32) ++ (UNSPEC_PIC_CALL_SYM 33) ++ (UNSPEC_TLS 34) ++ (UNSPEC_TLS_LDM 35) ++ (UNSPEC_LOAD_TLS_IE 36) ++ (UNSPEC_ADD_TLS_LE 37) ++ (UNSPEC_ADD_TLS_GD 38) ++ (UNSPEC_ADD_TLS_LDM 39) ++ (UNSPEC_ADD_TLS_LDO 40) ++ ++ (UNSPEC_EH_RETURN 41) ++ ++ ;; Note that values 100..151 are used by custom instructions, see below. ++]) ++ ++ ++ ++;***************************************************************************** ++;* ++;* instruction scheduler ++;* ++;***************************************************************************** ++ ++; No schedule info is currently available, using an assumption that no ++; instruction can use the results of the previous instruction without ++; incuring a stall. ++ ++; length of an instruction (in bytes) ++(define_attr "length" "" (const_int 4)) ++(define_attr "type" ++ "unknown,complex,control,alu,cond_alu,st,ld,shift,mul,div,custom" ++ (const_string "complex")) ++ ++(define_asm_attributes ++ [(set_attr "length" "4") ++ (set_attr "type" "complex")]) ++ ++(define_automaton "nios2") ++(automata_option "v") ++;(automata_option "no-minimization") ++(automata_option "ndfa") ++ ++; The nios2 pipeline is fairly straightforward for the fast model. ++; Every alu operation is pipelined so that an instruction can ++; be issued every cycle. However, there are still potential ++; stalls which this description tries to deal with. ++ ++(define_cpu_unit "cpu" "nios2") ++ ++(define_insn_reservation "complex" 1 ++ (eq_attr "type" "complex") ++ "cpu") ++ ++(define_insn_reservation "control" 1 ++ (eq_attr "type" "control") ++ "cpu") ++ ++(define_insn_reservation "alu" 1 ++ (eq_attr "type" "alu") ++ "cpu") ++ ++(define_insn_reservation "cond_alu" 1 ++ (eq_attr "type" "cond_alu") ++ "cpu") ++ ++(define_insn_reservation "st" 1 ++ (eq_attr "type" "st") ++ "cpu") ++ ++(define_insn_reservation "custom" 1 ++ (eq_attr "type" "custom") ++ "cpu") ++ ++; shifts, muls and lds have three cycle latency ++(define_insn_reservation "ld" 3 ++ (eq_attr "type" "ld") ++ "cpu") ++ ++(define_insn_reservation "shift" 3 ++ (eq_attr "type" "shift") ++ "cpu") ++ ++(define_insn_reservation "mul" 3 ++ (eq_attr "type" "mul") ++ "cpu") ++ ++(define_insn_reservation "div" 1 ++ (eq_attr "type" "div") ++ "cpu") ++ ++ ++;***************************************************************************** ++;* ++;* MOV Instructions ++;* ++;***************************************************************************** ++ ++(define_expand "movqi" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "") ++ (match_operand:QI 1 "general_operand" ""))] ++ "" ++{ ++ if (nios2_emit_move_sequence (operands, QImode)) ++ DONE; ++}) ++ ++(define_insn "movqi_internal" ++ [(set (match_operand:QI 0 "nonimmediate_operand" "=m, r,r, r") ++ (match_operand:QI 1 "general_operand" "rM,m,rM,I"))] ++ "(register_operand (operands[0], QImode) ++ || reg_or_0_operand (operands[1], QImode))" ++ "@ ++ stb%o0\\t%z1, %0 ++ ldbu%o1\\t%0, %1 ++ mov\\t%0, %z1 ++ movi\\t%0, %1" ++ [(set_attr "type" "st,ld,alu,alu")]) ++ ++(define_insn "ldbio" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBIO)) ++ (use (match_operand:SI 1 "memory_operand" "m"))] ++ "" ++ "ldbio\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++(define_insn "ldbuio" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDBUIO)) ++ (use (match_operand:SI 1 "memory_operand" "m"))] ++ "" ++ "ldbuio\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++(define_insn "stbio" ++ [(set (match_operand:SI 0 "memory_operand" "=m") ++ (match_operand:SI 1 "reg_or_0_operand" "rM")) ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STBIO)] ++ "" ++ "stbio\\t%z1, %0" ++ [(set_attr "type" "st")]) ++ ++ ++(define_expand "movhi" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "") ++ (match_operand:HI 1 "general_operand" ""))] ++ "" ++{ ++ if (nios2_emit_move_sequence (operands, HImode)) ++ DONE; ++}) ++ ++(define_insn "movhi_internal" ++ [(set (match_operand:HI 0 "nonimmediate_operand" "=m, r,r, r,r") ++ (match_operand:HI 1 "general_operand" "rM,m,rM,I,J"))] ++ "(register_operand (operands[0], HImode) ++ || reg_or_0_operand (operands[1], HImode))" ++ "@ ++ sth%o0\\t%z1, %0 ++ ldhu%o1\\t%0, %1 ++ mov\\t%0, %z1 ++ movi\\t%0, %1 ++ movui\\t%0, %1" ++ [(set_attr "type" "st,ld,alu,alu,alu")]) ++ ++(define_insn "ldhio" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHIO)) ++ (use (match_operand:SI 1 "memory_operand" "m"))] ++ "" ++ "ldhio\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++(define_insn "ldhuio" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDHUIO)) ++ (use (match_operand:SI 1 "memory_operand" "m"))] ++ "" ++ "ldhuio\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++(define_insn "sthio" ++ [(set (match_operand:SI 0 "memory_operand" "=m") ++ (match_operand:SI 1 "reg_or_0_operand" "rM")) ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STHIO)] ++ "" ++ "sthio\\t%z1, %0" ++ [(set_attr "type" "st")]) ++ ++(define_expand "movsi" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "") ++ (match_operand:SI 1 "general_operand" ""))] ++ "" ++{ ++ if (nios2_emit_move_sequence (operands, SImode)) ++ DONE; ++}) ++ ++(define_insn "movsi_internal" ++ [(set (match_operand:SI 0 "nonimmediate_operand" "=m, r,r, r,r,r,r") ++ (match_operand:SI 1 "general_operand" "rM,m,rM,I,J,S,i"))] ++ "(register_operand (operands[0], SImode) ++ || reg_or_0_operand (operands[1], SImode))" ++ "@ ++ stw%o0\\t%z1, %0 ++ ldw%o1\\t%0, %1 ++ mov\\t%0, %z1 ++ movi\\t%0, %1 ++ movui\\t%0, %1 ++ addi\\t%0, gp, %%gprel(%1) ++ movhi\\t%0, %H1\;addi\\t%0, %0, %L1" ++ [(set_attr "type" "st,ld,alu,alu,alu,alu,alu")]) ++ ++(define_insn "ldwio" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_LDWIO)) ++ (use (match_operand:SI 1 "memory_operand" "m"))] ++ "" ++ "ldwio\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++(define_insn "stwio" ++ [(set (match_operand:SI 0 "memory_operand" "=m") ++ (match_operand:SI 1 "reg_or_0_operand" "rM")) ++ (unspec_volatile:SI [(const_int 0)] UNSPEC_STWIO)] ++ "" ++ "stwio\\t%z1, %0" ++ [(set_attr "type" "st")]) ++ ++ ++ ++;***************************************************************************** ++;* ++;* zero extension ++;* ++;***************************************************************************** ++ ++ ++(define_insn "zero_extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (zero_extend:SI (match_operand:HI 1 "nonimmediate_operand" "r,m")))] ++ "" ++ "@ ++ andi\\t%0, %1, 0xffff ++ ldhu%o1\\t%0, %1" ++ [(set_attr "type" "alu,ld")]) ++ ++(define_insn "zero_extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "=r,r") ++ (zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] ++ "" ++ "@ ++ andi\\t%0, %1, 0xff ++ ldbu%o1\\t%0, %1" ++ [(set_attr "type" "alu,ld")]) ++ ++(define_insn "zero_extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (zero_extend:SI (match_operand:QI 1 "nonimmediate_operand" "r,m")))] ++ "" ++ "@ ++ andi\\t%0, %1, 0xff ++ ldbu%o1\\t%0, %1" ++ [(set_attr "type" "alu,ld")]) ++ ++ ++ ++;***************************************************************************** ++;* ++;* sign extension ++;* ++;***************************************************************************** ++(define_expand "extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "") ++ (sign_extend:SI (match_operand:HI 1 "nonimmediate_operand" "")))] ++ "" ++{ ++}) ++ ++(define_insn "*extendhisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (sign_extend:SI (match_operand:HI 1 "register_operand" "r")))] ++ "" ++ "#") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (sign_extend:SI (match_operand:HI 1 "register_operand" "")))] ++ "reload_completed" ++ [(set (match_dup 0) ++ (and:SI (match_dup 1) (const_int 65535))) ++ (set (match_dup 0) ++ (xor:SI (match_dup 0) (const_int 32768))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) (const_int -32768)))] ++ "operands[1] = gen_lowpart (SImode, operands[1]);") ++ ++(define_insn "extendhisi2_internal" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))] ++ "" ++ "ldh%o1\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++ ++(define_expand "extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "") ++ (sign_extend:HI (match_operand:QI 1 "nonimmediate_operand" "")))] ++ "" ++{ ++}) ++ ++(define_insn "*extendqihi2" ++ [(set (match_operand:HI 0 "register_operand" "=r") ++ (sign_extend:HI (match_operand:QI 1 "register_operand" "r")))] ++ "" ++ "#") ++ ++(define_split ++ [(set (match_operand:HI 0 "register_operand" "") ++ (sign_extend:HI (match_operand:QI 1 "register_operand" "")))] ++ "reload_completed" ++ [(set (match_dup 0) ++ (and:SI (match_dup 1) (const_int 255))) ++ (set (match_dup 0) ++ (xor:SI (match_dup 0) (const_int 128))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) (const_int -128)))] ++ "operands[0] = gen_lowpart (SImode, operands[0]); ++ operands[1] = gen_lowpart (SImode, operands[1]);") ++ ++ ++ ++(define_insn "extendqihi2_internal" ++ [(set (match_operand:HI 0 "register_operand" "=r") ++ (sign_extend:HI (match_operand:QI 1 "memory_operand" "m")))] ++ "" ++ "ldb%o1\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++ ++(define_expand "extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "") ++ (sign_extend:SI (match_operand:QI 1 "nonimmediate_operand" "")))] ++ "" ++{ ++}) ++ ++(define_insn "*extendqisi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (sign_extend:SI (match_operand:QI 1 "register_operand" "r")))] ++ "" ++ "#") ++ ++(define_split ++ [(set (match_operand:SI 0 "register_operand" "") ++ (sign_extend:SI (match_operand:QI 1 "register_operand" "")))] ++ "reload_completed" ++ [(set (match_dup 0) ++ (and:SI (match_dup 1) (const_int 255))) ++ (set (match_dup 0) ++ (xor:SI (match_dup 0) (const_int 128))) ++ (set (match_dup 0) ++ (plus:SI (match_dup 0) (const_int -128)))] ++ "operands[1] = gen_lowpart (SImode, operands[1]);") ++ ++(define_insn "extendqisi2_insn" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (sign_extend:SI (match_operand:QI 1 "memory_operand" "m")))] ++ "" ++ "ldb%o1\\t%0, %1" ++ [(set_attr "type" "ld")]) ++ ++ ++ ++ ++;***************************************************************************** ++;* ++;* Arithmetic Operations ++;* ++;***************************************************************************** ++ ++(define_insn "addsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (plus:SI (match_operand:SI 1 "register_operand" "%r,r") ++ (match_operand:SI 2 "arith_operand" "r,I")))] ++ "" ++ "add%i2\\t%0, %1, %z2" ++ [(set_attr "type" "alu")]) ++ ++(define_insn "addsf3" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (plus:SF (match_operand:SF 1 "register_operand" "%r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_addsf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_addsf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "adddf3" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (plus:DF (match_operand:DF 1 "register_operand" "%r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_adddf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_adddf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "subsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (minus:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "register_operand" "r")))] ++ "" ++ "sub\\t%0, %z1, %2" ++ [(set_attr "type" "alu")]) ++ ++(define_insn "subsf3" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (minus:SF (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_subsf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_subsf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "subdf3" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (minus:DF (match_operand:DF 1 "register_operand" "r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_subdf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_subdf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "mulsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (mult:SI (match_operand:SI 1 "register_operand" "r,r") ++ (match_operand:SI 2 "arith_operand" "r,I")))] ++ "TARGET_HAS_MUL" ++ "mul%i2\\t%0, %1, %z2" ++ [(set_attr "type" "mul")]) ++ ++(define_insn "mulsf3" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (mult:SF (match_operand:SF 1 "register_operand" "%r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_mulsf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_mulsf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "muldf3" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (mult:DF (match_operand:DF 1 "register_operand" "%r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_muldf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_muldf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_expand "divsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (div:SI (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")))] ++ "" ++{ ++ if (!TARGET_HAS_DIV) ++ { ++ if (!TARGET_FAST_SW_DIV) ++ FAIL; ++ else ++ { ++ if (nios2_emit_expensive_div (operands, SImode)) ++ DONE; ++ } ++ } ++}) ++ ++(define_insn "divsi3_insn" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (div:SI (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")))] ++ "TARGET_HAS_DIV" ++ "div\\t%0, %1, %2" ++ [(set_attr "type" "div")]) ++ ++(define_insn "divsf3" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (div:SF (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_divsf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_divsf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "divdf3" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (div:DF (match_operand:DF 1 "register_operand" "r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_divdf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_divdf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "udivsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (udiv:SI (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")))] ++ "TARGET_HAS_DIV" ++ "divu\\t%0, %1, %2" ++ [(set_attr "type" "div")]) ++ ++(define_insn "smulsi3_highpart" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (truncate:SI ++ (lshiftrt:DI ++ (mult:DI (sign_extend:DI (match_operand:SI 1 "register_operand" "r")) ++ (sign_extend:DI (match_operand:SI 2 "register_operand" "r"))) ++ (const_int 32))))] ++ "TARGET_HAS_MULX" ++ "mulxss\\t%0, %1, %2" ++ [(set_attr "type" "mul")]) ++ ++(define_insn "umulsi3_highpart" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (truncate:SI ++ (lshiftrt:DI ++ (mult:DI (zero_extend:DI (match_operand:SI 1 "register_operand" "r")) ++ (zero_extend:DI (match_operand:SI 2 "register_operand" "r"))) ++ (const_int 32))))] ++ "TARGET_HAS_MULX" ++ "mulxuu\\t%0, %1, %2" ++ [(set_attr "type" "mul")]) ++ ++ ++(define_expand "mulsidi3_little_endian" ++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0) ++ (mult:SI (match_operand:SI 1 "register_operand" "") ++ (match_operand:SI 2 "register_operand" ""))) ++ (set (subreg:SI (match_dup 0) 4) ++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1)) ++ (sign_extend:DI (match_dup 2))) ++ (const_int 32))))] ++ "TARGET_HAS_MULX && !WORDS_BIG_ENDIAN" ++ "") ++ ++(define_expand "mulsidi3_big_endian" ++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4) ++ (mult:SI (match_operand:SI 1 "register_operand" "") ++ (match_operand:SI 2 "register_operand" ""))) ++ (set (subreg:SI (match_dup 0) 0) ++ (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (match_dup 1)) ++ (sign_extend:DI (match_dup 2))) ++ (const_int 32))))] ++ "TARGET_HAS_MULX && WORDS_BIG_ENDIAN" ++ "") ++ ++(define_expand "mulsidi3" ++ [(match_operand:DI 0 "register_operand" "") ++ (match_operand:SI 1 "register_operand" "") ++ (match_operand:SI 2 "register_operand" "")] ++ "TARGET_HAS_MULX" ++ { ++ if (WORDS_BIG_ENDIAN) ++ { ++ emit_insn (gen_mulsidi3_big_endian (operands[0], ++ operands[1], ++ operands[2])); ++ } ++ else ++ { ++ emit_insn (gen_mulsidi3_little_endian (operands[0], ++ operands[1], ++ operands[2])); ++ } ++ DONE; ++ }) ++ ++(define_expand "umulsidi3_little_endian" ++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 0) ++ (mult:SI (match_operand:SI 1 "register_operand" "") ++ (match_operand:SI 2 "register_operand" ""))) ++ (set (subreg:SI (match_dup 0) 4) ++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1)) ++ (zero_extend:DI (match_dup 2))) ++ (const_int 32))))] ++ "TARGET_HAS_MULX && !WORDS_BIG_ENDIAN" ++ "") ++ ++(define_expand "umulsidi3_big_endian" ++ [(set (subreg:SI (match_operand:DI 0 "register_operand" "") 4) ++ (mult:SI (match_operand:SI 1 "register_operand" "") ++ (match_operand:SI 2 "register_operand" ""))) ++ (set (subreg:SI (match_dup 0) 0) ++ (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (match_dup 1)) ++ (zero_extend:DI (match_dup 2))) ++ (const_int 32))))] ++ "TARGET_HAS_MULX && WORDS_BIG_ENDIAN" ++ "") ++ ++(define_expand "umulsidi3" ++ [(match_operand:DI 0 "register_operand" "") ++ (match_operand:SI 1 "register_operand" "") ++ (match_operand:SI 2 "register_operand" "")] ++ "TARGET_HAS_MULX" ++ { ++ if (WORDS_BIG_ENDIAN) ++ { ++ emit_insn (gen_umulsidi3_big_endian (operands[0], ++ operands[1], ++ operands[2])); ++ } ++ else ++ { ++ emit_insn (gen_umulsidi3_little_endian (operands[0], ++ operands[1], ++ operands[2])); ++ } ++ DONE; ++ }) ++ ++ ++;***************************************************************************** ++;* ++;* Negate and ones complement ++;* ++;***************************************************************************** ++ ++(define_insn "negsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (neg:SI (match_operand:SI 1 "register_operand" "r")))] ++ "" ++{ ++ operands[2] = const0_rtx; ++ return "sub\\t%0, %z2, %1"; ++} ++ [(set_attr "type" "alu")]) ++ ++(define_insn "negsf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (neg:SF (match_operand:SF 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_negsf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_negsf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "negdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (neg:DF (match_operand:DF 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_negdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_negdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "one_cmplsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (not:SI (match_operand:SI 1 "register_operand" "r")))] ++ "" ++{ ++ operands[2] = const0_rtx; ++ return "nor\\t%0, %z2, %1"; ++} ++ [(set_attr "type" "alu")]) ++ ++ ++;***************************************************************************** ++;* ++;* Miscellaneous floating point ++;* ++;***************************************************************************** ++(define_insn "nios2_fwrx" ++ [(unspec_volatile [(match_operand:DF 0 "register_operand" "r")] UNSPEC_FWRX)] ++ "nios2_fpu_insns[nios2_fpu_nios2_fwrx].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_fwrx].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "nios2_fwry" ++ [(unspec_volatile [(match_operand:SF 0 "register_operand" "r")] UNSPEC_FWRY)] ++ "nios2_fpu_insns[nios2_fpu_nios2_fwry].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_fwry].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "nios2_frdxlo" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(const_int 0)] UNSPEC_FRDXLO))] ++ "nios2_fpu_insns[nios2_fpu_nios2_frdxlo].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_frdxlo].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "nios2_frdxhi" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(const_int 0)] UNSPEC_FRDXHI))] ++ "nios2_fpu_insns[nios2_fpu_nios2_frdxhi].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_frdxhi].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "nios2_frdy" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(const_int 0)] UNSPEC_FRDY))] ++ "nios2_fpu_insns[nios2_fpu_nios2_frdy].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_frdy].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "minsf3" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (if_then_else:SF (lt:SF (match_operand:SF 1 "register_operand" "%r") ++ (match_operand:SF 2 "register_operand" "r")) ++ (match_dup 1) ++ (match_dup 2)))] ++ "nios2_fpu_insns[nios2_fpu_minsf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_minsf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "mindf3" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (if_then_else:DF (lt:DF (match_operand:DF 1 "register_operand" "%r") ++ (match_operand:DF 2 "register_operand" "r")) ++ (match_dup 1) ++ (match_dup 2)))] ++ "nios2_fpu_insns[nios2_fpu_mindf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_mindf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "maxsf3" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (if_then_else:SF (lt:SF (match_operand:SF 1 "register_operand" "%r") ++ (match_operand:SF 2 "register_operand" "r")) ++ (match_dup 2) ++ (match_dup 1)))] ++ "nios2_fpu_insns[nios2_fpu_maxsf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_maxsf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "maxdf3" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (if_then_else:DF (lt:DF (match_operand:DF 1 "register_operand" "%r") ++ (match_operand:DF 2 "register_operand" "r")) ++ (match_dup 2) ++ (match_dup 1)))] ++ "nios2_fpu_insns[nios2_fpu_maxdf3].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_maxdf3].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "abssf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (abs:SF (match_operand:SF 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_abssf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_abssf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "absdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (abs:DF (match_operand:DF 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_absdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_absdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "sqrtsf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (sqrt:SF (match_operand:SF 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_sqrtsf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_sqrtsf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "sqrtdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (sqrt:DF (match_operand:DF 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_sqrtdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_sqrtdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "cossf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_FCOSS))] ++ "nios2_fpu_insns[nios2_fpu_cossf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_cossf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "cosdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "r")] UNSPEC_FCOSD))] ++ "nios2_fpu_insns[nios2_fpu_cosdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_cosdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "sinsf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_FSINS))] ++ "nios2_fpu_insns[nios2_fpu_sinsf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_sinsf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "sindf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "r")] UNSPEC_FSIND))] ++ "nios2_fpu_insns[nios2_fpu_sindf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_sindf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "tansf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_FTANS))] ++ "nios2_fpu_insns[nios2_fpu_tansf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_tansf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "tandf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "r")] UNSPEC_FTAND))] ++ "nios2_fpu_insns[nios2_fpu_tandf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_tandf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "atansf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_FATANS))] ++ "nios2_fpu_insns[nios2_fpu_atansf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_atansf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "atandf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "r")] UNSPEC_FATAND))] ++ "nios2_fpu_insns[nios2_fpu_atandf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_atandf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "expsf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_FEXPS))] ++ "nios2_fpu_insns[nios2_fpu_expsf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_expsf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "expdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "r")] UNSPEC_FEXPD))] ++ "nios2_fpu_insns[nios2_fpu_expdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_expdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "logsf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec:SF [(match_operand:SF 1 "register_operand" "r")] UNSPEC_FLOGS))] ++ "nios2_fpu_insns[nios2_fpu_logsf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_logsf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "logdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unspec:DF [(match_operand:DF 1 "register_operand" "r")] UNSPEC_FLOGD))] ++ "nios2_fpu_insns[nios2_fpu_logdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_logdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++;***************************************************************************** ++;* ++;* Logical Operantions ++;* ++;***************************************************************************** ++ ++(define_insn "andsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r, r,r") ++ (and:SI (match_operand:SI 1 "register_operand" "%r, r,r") ++ (match_operand:SI 2 "logical_operand" "rM,J,K")))] ++ "" ++ "@ ++ and\\t%0, %1, %z2 ++ and%i2\\t%0, %1, %2 ++ andh%i2\\t%0, %1, %U2" ++ [(set_attr "type" "alu")]) ++ ++(define_insn "iorsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r, r,r") ++ (ior:SI (match_operand:SI 1 "register_operand" "%r, r,r") ++ (match_operand:SI 2 "logical_operand" "rM,J,K")))] ++ "" ++ "@ ++ or\\t%0, %1, %z2 ++ or%i2\\t%0, %1, %2 ++ orh%i2\\t%0, %1, %U2" ++ [(set_attr "type" "alu")]) ++ ++(define_insn "*norsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (and:SI (not:SI (match_operand:SI 1 "register_operand" "%r")) ++ (not:SI (match_operand:SI 2 "reg_or_0_operand" "rM"))))] ++ "" ++ "nor\\t%0, %1, %z2" ++ [(set_attr "type" "alu")]) ++ ++(define_insn "xorsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r, r,r") ++ (xor:SI (match_operand:SI 1 "register_operand" "%r, r,r") ++ (match_operand:SI 2 "logical_operand" "rM,J,K")))] ++ "" ++ "@ ++ xor\\t%0, %1, %z2 ++ xor%i2\\t%0, %1, %2 ++ xorh%i2\\t%0, %1, %U2" ++ [(set_attr "type" "alu")]) ++ ++ ++ ++;***************************************************************************** ++;* ++;* Shifts ++;* ++;***************************************************************************** ++ ++(define_insn "ashlsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ashift:SI (match_operand:SI 1 "register_operand" "r,r") ++ (match_operand:SI 2 "shift_operand" "r,L")))] ++ "" ++ ++{ ++ if( GET_CODE ( operands[2] ) == CONST_INT && INTVAL( operands[2] ) == 1 ) ++ return "add\t%0,%1,%1"; ++ return "sll%i2\t%0,%1,%z2"; ++} ++ [(set_attr "type" "shift")]) ++ ++(define_insn "ashrsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r,r") ++ (match_operand:SI 2 "shift_operand" "r,L")))] ++ "" ++ "sra%i2\\t%0, %1, %z2" ++ [(set_attr "type" "shift")]) ++ ++(define_insn "lshrsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r,r") ++ (match_operand:SI 2 "shift_operand" "r,L")))] ++ "" ++ "srl%i2\\t%0, %1, %z2" ++ [(set_attr "type" "shift")]) ++ ++(define_insn "rotlsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (rotate:SI (match_operand:SI 1 "register_operand" "r,r") ++ (match_operand:SI 2 "shift_operand" "r,L")))] ++ "" ++ "rol%i2\\t%0, %1, %z2" ++ [(set_attr "type" "shift")]) ++ ++(define_insn "rotrsi3" ++ [(set (match_operand:SI 0 "register_operand" "=r,r") ++ (rotatert:SI (match_operand:SI 1 "register_operand" "r,r") ++ (match_operand:SI 2 "register_operand" "r,r")))] ++ "" ++ "ror\\t%0, %1, %2" ++ [(set_attr "type" "shift")]) ++ ++(define_insn "*shift_mul_constants" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ashift:SI (mult:SI (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "const_int_operand" "I")) ++ (match_operand:SI 3 "const_int_operand" "I")))] ++ "TARGET_HAS_MUL && SMALL_INT (INTVAL (operands[2]) << INTVAL (operands[3]))" ++{ ++ HOST_WIDE_INT mul = INTVAL (operands[2]) << INTVAL (operands[3]); ++ rtx ops[3]; ++ ++ ops[0] = operands[0]; ++ ops[1] = operands[1]; ++ ops[2] = GEN_INT (mul); ++ ++ output_asm_insn ("muli\t%0, %1, %2", ops); ++ return ""; ++} ++ [(set_attr "type" "mul")]) ++ ++ ++ ++ ++;***************************************************************************** ++;* ++;* Converting between floating point and fixed point ++;* ++;***************************************************************************** ++(define_insn "floatsisf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (float:SF (match_operand:SI 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_floatsisf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_floatsisf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "floatsidf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (float:DF (match_operand:SI 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_floatsidf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_floatsidf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "floatunssisf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unsigned_float:SF (match_operand:SI 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_floatunssisf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_floatunssisf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "floatunssidf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (unsigned_float:DF (match_operand:SI 1 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_floatunssidf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_floatunssidf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "fixsfsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (fix:SI (match_operand:SF 1 "general_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_fixsfsi2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_fixsfsi2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "fixdfsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (fix:SI (match_operand:DF 1 "general_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_fixdfsi2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_fixdfsi2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "fixunssfsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unsigned_fix:SI (match_operand:SF 1 "general_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_fixunssfsi2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_fixunssfsi2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "fixunsdfsi2" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unsigned_fix:SI (match_operand:DF 1 "general_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_fixunsdfsi2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_fixunsdfsi2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "extendsfdf2" ++ [(set (match_operand:DF 0 "register_operand" "=r") ++ (float_extend:DF (match_operand:SF 1 "general_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_extendsfdf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_extendsfdf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++(define_insn "truncdfsf2" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (float_truncate:SF (match_operand:DF 1 "general_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_truncdfsf2].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_truncdfsf2].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++ ++ ++ ++ ++ ++ ++;***************************************************************************** ++;* ++;* Prologue, Epilogue and Return ++;* ++;***************************************************************************** ++ ++(define_expand "prologue" ++ [(const_int 1)] ++ "" ++{ ++ expand_prologue (); ++ DONE; ++}) ++ ++(define_expand "epilogue" ++ [(return)] ++ "" ++{ ++ expand_epilogue (false); ++ DONE; ++}) ++ ++(define_expand "sibcall_epilogue" ++ [(return)] ++ "" ++{ ++ expand_epilogue (true); ++ DONE; ++}) ++ ++(define_insn "return" ++ [(return)] ++ "reload_completed && nios2_can_use_return_insn ()" ++ "ret\\t" ++) ++ ++(define_insn "return_from_epilogue" ++ [(use (match_operand 0 "pmode_register_operand" "")) ++ (return)] ++ "reload_completed" ++ "ret\\t" ++) ++ ++;; Block any insns from being moved before this point, since the ++;; profiling call to mcount can use various registers that aren't ++;; saved or used to pass arguments. ++ ++(define_insn "blockage" ++ [(unspec_volatile [(const_int 0)] UNSPEC_BLOCKAGE)] ++ "" ++ "" ++ [(set_attr "type" "unknown") ++ (set_attr "length" "0")]) ++ ++;; This is used in compiling the unwind routines. ++(define_expand "eh_return" ++ [(use (match_operand 0 "general_operand"))] ++ "" ++{ ++ if (GET_MODE (operands[0]) != Pmode) ++ operands[0] = convert_to_mode (Pmode, operands[0], 0); ++ emit_insn (gen_eh_set_ra (operands[0])); ++ ++ DONE; ++}) ++ ++;; Clobber the return address on the stack. We can't expand this ++;; until we know where it will be put in the stack frame. ++ ++(define_insn "eh_set_ra" ++ [(unspec [(match_operand:SI 0 "register_operand" "r")] UNSPEC_EH_RETURN) ++ (clobber (match_scratch:SI 1 "=&r"))] ++ "" ++ "#") ++ ++(define_split ++ [(unspec [(match_operand 0 "register_operand")] UNSPEC_EH_RETURN) ++ (clobber (match_scratch 1))] ++ "reload_completed" ++ [(const_int 0)] ++{ ++ nios2_set_return_address (operands[0], operands[1]); ++ DONE; ++}) ++ ++ ++;***************************************************************************** ++;* ++;* Jumps and Calls ++;* ++;***************************************************************************** ++ ++(define_insn "indirect_jump" ++ [(set (pc) (match_operand:SI 0 "register_operand" "r"))] ++ "" ++ "jmp\\t%0" ++ [(set_attr "type" "control")]) ++ ++(define_insn "jump" ++ [(set (pc) ++ (label_ref (match_operand 0 "" "")))] ++ "" ++ "br\\t%0" ++ [(set_attr "type" "control")]) ++ ++ ++(define_expand "call" ++ [(parallel [(call (match_operand 0 "" "") ++ (match_operand 1 "" "")) ++ (clobber (reg:SI 31))])] ++ "" ++ { ++ nios2_adjust_call_address (&XEXP (operands[0], 0)); ++ } ++) ++ ++(define_expand "call_value" ++ [(parallel [(set (match_operand 0 "" "") ++ (call (match_operand 1 "" "") ++ (match_operand 2 "" ""))) ++ (clobber (reg:SI 31))])] ++ "" ++ { ++ nios2_adjust_call_address (&XEXP (operands[1], 0)); ++ } ++) ++ ++(define_insn "*call" ++ [(call (mem:QI (match_operand:SI 0 "call_operand" "i,r")) ++ (match_operand 1 "" "")) ++ (clobber (reg:SI 31))] ++ "" ++ "@ ++ call\\t%0 ++ callr\\t%0" ++ [(set_attr "type" "control,control")]) ++ ++(define_insn "*call_value" ++ [(set (match_operand 0 "" "") ++ (call (mem:QI (match_operand:SI 1 "call_operand" "i,r")) ++ (match_operand 2 "" ""))) ++ (clobber (reg:SI 31))] ++ "" ++ "@ ++ call\\t%1 ++ callr\\t%1" ++ [(set_attr "type" "control,control")]) ++ ++(define_expand "sibcall" ++ [(parallel [(call (match_operand 0 "" "") ++ (match_operand 1 "" "")) ++ (return)])] ++ "" ++ { ++ nios2_adjust_call_address (&XEXP (operands[0], 0)); ++ } ++) ++ ++(define_expand "sibcall_value" ++ [(parallel [(set (match_operand 0 "" "") ++ (call (match_operand 1 "" "") ++ (match_operand 2 "" ""))) ++ (return)])] ++ "" ++ { ++ nios2_adjust_call_address (&XEXP (operands[1], 0)); ++ } ++) ++ ++(define_insn "*sibcall" ++ [(call (mem:QI (match_operand:SI 0 "call_operand" "i,j")) ++ (match_operand 1 "" "")) ++ (return)] ++ "" ++ "@ ++ jmpi\\t%0 ++ jmp\\t%0" ++) ++ ++(define_insn "*sibcall_value" ++ [(set (match_operand 0 "register_operand" "") ++ (call (mem:QI (match_operand:SI 1 "call_operand" "i,j")) ++ (match_operand 2 "" ""))) ++ (return)] ++ "" ++ "@ ++ jmpi\\t%1 ++ jmp\\t%1" ++) ++ ++ ++ ++ ++(define_expand "tablejump" ++ [(parallel [(set (pc) (match_operand 0 "register_operand" "r")) ++ (use (label_ref (match_operand 1 "" "")))])] ++ "" ++ { ++ if (flag_pic) ++ { ++ /* Hopefully, CSE will eliminate this copy. */ ++ rtx reg1 = copy_addr_to_reg (gen_rtx_LABEL_REF (Pmode, operands[1])); ++ rtx reg2 = gen_reg_rtx (SImode); ++ ++ emit_insn (gen_addsi3 (reg2, operands[0], reg1)); ++ operands[0] = reg2; ++ } ++ } ++) ++ ++(define_insn "*tablejump" ++ [(set (pc) ++ (match_operand:SI 0 "register_operand" "r")) ++ (use (label_ref (match_operand 1 "" "")))] ++ "" ++ "jmp\\t%0" ++ [(set_attr "type" "control")]) ++ ++ ++ ++;***************************************************************************** ++;* ++;* Comparisons ++;* ++;***************************************************************************** ++;; Flow here is rather complex (based on MIPS): ++;; ++;; 1) The cmp{si,di,sf,df} routine is called. It deposits the ++;; arguments into the branch_cmp array, and the type into ++;; branch_type. No RTL is generated. ++;; ++;; 2) The appropriate branch define_expand is called, which then ++;; creates the appropriate RTL for the comparison and branch. ++;; Different CC modes are used, based on what type of branch is ++;; done, so that we can constrain things appropriately. There ++;; are assumptions in the rest of GCC that break if we fold the ++;; operands into the branchs for integer operations, and use cc0 ++;; for floating point, so we use the fp status register instead. ++;; If needed, an appropriate temporary is created to hold the ++;; of the integer compare. ++ ++(define_expand "cmpsi" ++ [(set (cc0) ++ (compare:CC (match_operand:SI 0 "register_operand" "") ++ (match_operand:SI 1 "arith_operand" "")))] ++ "" ++{ ++ branch_cmp[0] = operands[0]; ++ branch_cmp[1] = operands[1]; ++ branch_type = CMP_SI; ++ DONE; ++}) ++ ++(define_expand "tstsi" ++ [(set (cc0) ++ (match_operand:SI 0 "register_operand" ""))] ++ "" ++{ ++ branch_cmp[0] = operands[0]; ++ branch_cmp[1] = const0_rtx; ++ branch_type = CMP_SI; ++ DONE; ++}) ++ ++(define_expand "cmpsf" ++ [(set (cc0) ++ (compare:CC (match_operand:SF 0 "register_operand" "") ++ (match_operand:SF 1 "register_operand" "")))] ++ "(nios2_fpu_insns[nios2_fpu_nios2_sltsf].N >= 0 ++ || nios2_fpu_insns[nios2_fpu_nios2_sgtsf].N >= 0) ++ && (nios2_fpu_insns[nios2_fpu_nios2_sgesf].N >= 0 ++ || nios2_fpu_insns[nios2_fpu_nios2_slesf].N >= 0) ++ && nios2_fpu_insns[nios2_fpu_nios2_seqsf].N >= 0 ++ && nios2_fpu_insns[nios2_fpu_nios2_snesf].N >= 0" ++{ ++ branch_cmp[0] = operands[0]; ++ branch_cmp[1] = operands[1]; ++ branch_type = CMP_SF; ++ DONE; ++}) ++ ++(define_expand "cmpdf" ++ [(set (cc0) ++ (compare:CC (match_operand:DF 0 "register_operand" "") ++ (match_operand:DF 1 "register_operand" "")))] ++ "(nios2_fpu_insns[nios2_fpu_nios2_sltdf].N >= 0 ++ || nios2_fpu_insns[nios2_fpu_nios2_sgtdf].N >= 0) ++ && (nios2_fpu_insns[nios2_fpu_nios2_sgedf].N >= 0 ++ || nios2_fpu_insns[nios2_fpu_nios2_sledf].N >= 0) ++ && nios2_fpu_insns[nios2_fpu_nios2_seqdf].N >= 0 ++ && nios2_fpu_insns[nios2_fpu_nios2_snedf].N >= 0" ++{ ++ branch_cmp[0] = operands[0]; ++ branch_cmp[1] = operands[1]; ++ branch_type = CMP_DF; ++ DONE; ++}) ++ ++ ++;***************************************************************************** ++;* ++;* setting a register from a comparison ++;* ++;***************************************************************************** ++ ++(define_expand "seq" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (eq:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI && branch_type != CMP_SF && branch_type != CMP_DF) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (EQ, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*seq" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (eq:SI (match_operand:SI 1 "reg_or_0_operand" "%rM") ++ (match_operand:SI 2 "arith_operand" "rI")))] ++ "" ++ "cmpeq%i2\\t%0, %z1, %z2" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_insn "nios2_seqsf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (eq:SI (match_operand:SF 1 "register_operand" "%r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_seqsf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_seqsf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_seqdf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (eq:SI (match_operand:DF 1 "register_operand" "%r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_seqdf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_seqdf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "sne" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ne:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI && branch_type != CMP_SF && branch_type != CMP_DF) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (NE, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sne" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ne:SI (match_operand:SI 1 "reg_or_0_operand" "%rM") ++ (match_operand:SI 2 "arith_operand" "rI")))] ++ "" ++ "cmpne%i2\\t%0, %z1, %z2" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_insn "nios2_snesf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ne:SI (match_operand:SF 1 "register_operand" "%r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_snesf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_snesf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_snedf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ne:SI (match_operand:DF 1 "register_operand" "%r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_snedf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_snedf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "sgt" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gt:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI && branch_type != CMP_SF && branch_type != CMP_DF) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (GT, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sgt" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gt:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "reg_or_0_operand" "rM")))] ++ "" ++ "cmplt\\t%0, %z2, %z1" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_insn "nios2_sgtsf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gt:SI (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sgtsf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sgtsf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_sgtdf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gt:SI (match_operand:DF 1 "register_operand" "r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sgtdf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sgtdf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "sge" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ge:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI && branch_type != CMP_SF && branch_type != CMP_DF) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (GE, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sge" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ge:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "arith_operand" "rI")))] ++ "" ++ "cmpge%i2\\t%0, %z1, %z2" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_insn "nios2_sgesf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ge:SI (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sgesf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sgesf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_sgedf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ge:SI (match_operand:DF 1 "register_operand" "r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sgedf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sgedf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "sle" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (le:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI && branch_type != CMP_SF && branch_type != CMP_DF) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (LE, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sle" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (le:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "reg_or_0_operand" "rM")))] ++ "" ++ "cmpge\\t%0, %z2, %z1" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_insn "nios2_slesf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (le:SI (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_slesf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_slesf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_sledf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (le:SI (match_operand:DF 1 "register_operand" "r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sledf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sledf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "slt" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lt:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI && branch_type != CMP_SF && branch_type != CMP_DF) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (LT, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*slt" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lt:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "arith_operand" "rI")))] ++ "" ++ "cmplt%i2\\t%0, %z1, %z2" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_insn "nios2_sltsf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lt:SI (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sltsf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sltsf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_sltdf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (lt:SI (match_operand:DF 1 "register_operand" "r") ++ (match_operand:DF 2 "register_operand" "r")))] ++ "nios2_fpu_insns[nios2_fpu_nios2_sltdf].N >= 0" ++ { ++ return (*nios2_fpu_insns[nios2_fpu_nios2_sltdf].output) (insn); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "sgtu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gtu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (GTU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sgtu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (gtu:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "reg_or_0_operand" "rM")))] ++ "" ++ "cmpltu\\t%0, %z2, %z1" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_expand "sgeu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (geu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (GEU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sgeu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (geu:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "uns_arith_operand" "rJ")))] ++ "" ++ "cmpgeu%i2\\t%0, %z1, %z2" ++ [(set_attr "type" "alu")]) ++ ++(define_expand "sleu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (leu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (LEU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sleu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (leu:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "reg_or_0_operand" "rM")))] ++ "" ++ "cmpgeu\\t%0, %z2, %z1" ++ [(set_attr "type" "alu")]) ++ ++ ++(define_expand "sltu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ltu:SI (match_dup 1) ++ (match_dup 2)))] ++ "" ++{ ++ if (branch_type != CMP_SI) ++ FAIL; ++ ++ /* set up operands from compare. */ ++ operands[1] = branch_cmp[0]; ++ operands[2] = branch_cmp[1]; ++ ++ gen_int_relational (LTU, operands[0], operands[1], operands[2], NULL_RTX); ++ DONE; ++}) ++ ++ ++(define_insn "*sltu" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (ltu:SI (match_operand:SI 1 "reg_or_0_operand" "rM") ++ (match_operand:SI 2 "uns_arith_operand" "rJ")))] ++ "" ++ "cmpltu%i2\\t%0, %z1, %z2" ++ [(set_attr "type" "alu")]) ++ ++ ++ ++ ++;***************************************************************************** ++;* ++;* branches ++;* ++;***************************************************************************** ++ ++(define_insn "*cbranch" ++ [(set (pc) ++ (if_then_else ++ (match_operator:SI 0 "comparison_operator" ++ [(match_operand:SI 2 "reg_or_0_operand" "rM") ++ (match_operand:SI 3 "reg_or_0_operand" "rM")]) ++ (label_ref (match_operand 1 "" "")) ++ (pc)))] ++ "" ++ "b%0\\t%z2, %z3, %l1" ++ [(set_attr "type" "control")]) ++ ++ ++(define_insn "nios2_cbranch_sf" ++ [(set (pc) ++ (if_then_else ++ (match_operator:SI 0 "comparison_operator" ++ [(match_operand:SF 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")]) ++ (label_ref (match_operand 1 "" "")) ++ (pc)))] ++ "" ++ { ++ return nios2_output_fpu_insn_cmps (insn, GET_CODE (operands[0])); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_insn "nios2_cbranch_df" ++ [(set (pc) ++ (if_then_else ++ (match_operator:SI 0 "comparison_operator" ++ [(match_operand:DF 2 "register_operand" "r") ++ (match_operand:DF 3 "register_operand" "r")]) ++ (label_ref (match_operand 1 "" "")) ++ (pc)))] ++ "" ++ { ++ return nios2_output_fpu_insn_cmpd (insn, GET_CODE (operands[0])); ++ } ++ [(set_attr "type" "custom")]) ++ ++ ++(define_expand "beq" ++ [(set (pc) ++ (if_then_else (eq:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (EQ, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++ ++(define_expand "bne" ++ [(set (pc) ++ (if_then_else (ne:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (NE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++ ++(define_expand "bgt" ++ [(set (pc) ++ (if_then_else (gt:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (GT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++(define_expand "bge" ++ [(set (pc) ++ (if_then_else (ge:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (GE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++(define_expand "ble" ++ [(set (pc) ++ (if_then_else (le:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (LE, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++(define_expand "blt" ++ [(set (pc) ++ (if_then_else (lt:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (LT, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++ ++(define_expand "bgtu" ++ [(set (pc) ++ (if_then_else (gtu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (GTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++(define_expand "bgeu" ++ [(set (pc) ++ (if_then_else (geu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (GEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++(define_expand "bleu" ++ [(set (pc) ++ (if_then_else (leu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (LEU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++(define_expand "bltu" ++ [(set (pc) ++ (if_then_else (ltu:CC (cc0) ++ (const_int 0)) ++ (label_ref (match_operand 0 "" "")) ++ (pc)))] ++ "" ++{ ++ gen_int_relational (LTU, NULL_RTX, branch_cmp[0], branch_cmp[1], operands[0]); ++ DONE; ++}) ++ ++ ++;***************************************************************************** ++;* ++;* String and Block Operations ++;* ++;***************************************************************************** ++ ++; ??? This is all really a hack to get Dhrystone to work as fast as possible ++; things to be fixed: ++; * let the compiler core handle all of this, for that to work the extra ++; aliasing needs to be addressed. ++; * we use three temporary registers for loading and storing to ensure no ++; ld use stalls, this is excessive, because after the first ld/st only ++; two are needed. Only two would be needed all the way through if ++; we could schedule with other code. Consider: ++; 1 ld $1, 0($src) ++; 2 ld $2, 4($src) ++; 3 ld $3, 8($src) ++; 4 st $1, 0($dest) ++; 5 ld $1, 12($src) ++; 6 st $2, 4($src) ++; 7 etc. ++; The first store has to wait until 4. If it does not there will be one ++; cycle of stalling. However, if any other instruction could be placed ++; between 1 and 4, $3 would not be needed. ++; * In small we probably don't want to ever do this ourself because there ++; is no ld use stall. ++ ++(define_expand "movstrsi" ++ [(parallel [(set (match_operand:BLK 0 "general_operand" "") ++ (match_operand:BLK 1 "general_operand" "")) ++ (use (match_operand:SI 2 "const_int_operand" "")) ++ (use (match_operand:SI 3 "const_int_operand" "")) ++ (clobber (match_scratch:SI 4 "=&r")) ++ (clobber (match_scratch:SI 5 "=&r")) ++ (clobber (match_scratch:SI 6 "=&r"))])] ++ "TARGET_INLINE_MEMCPY" ++{ ++ rtx ld_addr_reg, st_addr_reg; ++ ++ /* If the predicate for op2 fails in expr.c:emit_block_move_via_movstr ++ it trys to copy to a register, but does not re-try the predicate. ++ ??? Intead of fixing expr.c, I fix it here. */ ++ if (!const_int_operand (operands[2], SImode)) ++ FAIL; ++ ++ /* ??? there are some magic numbers which need to be sorted out here. ++ the basis for them is not increasing code size hugely or going ++ out of range of offset addressing */ ++ if (INTVAL (operands[3]) < 4) ++ FAIL; ++ if (!optimize ++ || (optimize_size && INTVAL (operands[2]) > 12) ++ || (optimize < 3 && INTVAL (operands[2]) > 100) ++ || INTVAL (operands[2]) > 200) ++ FAIL; ++ ++ st_addr_reg ++ = replace_equiv_address (operands[0], ++ copy_to_mode_reg (Pmode, XEXP (operands[0], 0))); ++ ld_addr_reg ++ = replace_equiv_address (operands[1], ++ copy_to_mode_reg (Pmode, XEXP (operands[1], 0))); ++ emit_insn (gen_movstrsi_internal (st_addr_reg, ld_addr_reg, ++ operands[2], operands[3])); ++ ++ DONE; ++}) ++ ++ ++(define_insn "movstrsi_internal" ++ [(set (match_operand:BLK 0 "memory_operand" "=o") ++ (match_operand:BLK 1 "memory_operand" "o")) ++ (use (match_operand:SI 2 "const_int_operand" "i")) ++ (use (match_operand:SI 3 "const_int_operand" "i")) ++ (clobber (match_scratch:SI 4 "=&r")) ++ (clobber (match_scratch:SI 5 "=&r")) ++ (clobber (match_scratch:SI 6 "=&r"))] ++ "TARGET_INLINE_MEMCPY" ++{ ++ int ld_offset = INTVAL (operands[2]); ++ int ld_len = INTVAL (operands[2]); ++ int ld_reg = 0; ++ rtx ld_addr_reg = XEXP (operands[1], 0); ++ int st_offset = INTVAL (operands[2]); ++ int st_len = INTVAL (operands[2]); ++ int st_reg = 0; ++ rtx st_addr_reg = XEXP (operands[0], 0); ++ int delay_count = 0; ++ ++ /* ops[0] is the address used by the insn ++ ops[1] is the register being loaded or stored */ ++ rtx ops[2]; ++ ++ gcc_assert (INTVAL (operands[3]) >= 4); ++ ++ while (ld_offset >= 4) ++ { ++ /* if the load use delay has been met, I can start ++ storing */ ++ if (delay_count >= 3) ++ { ++ ops[0] = gen_rtx_MEM (SImode, ++ plus_constant (st_addr_reg, st_len - st_offset)); ++ ops[1] = operands[st_reg + 4]; ++ output_asm_insn ("stw\t%1, %0", ops); ++ ++ st_reg = (st_reg + 1) % 3; ++ st_offset -= 4; ++ } ++ ++ ops[0] = gen_rtx_MEM (SImode, ++ plus_constant (ld_addr_reg, ld_len - ld_offset)); ++ ops[1] = operands[ld_reg + 4]; ++ output_asm_insn ("ldw\t%1, %0", ops); ++ ++ ld_reg = (ld_reg + 1) % 3; ++ ld_offset -= 4; ++ delay_count++; ++ } ++ ++ if (ld_offset >= 2) ++ { ++ /* if the load use delay has been met, I can start ++ storing */ ++ if (delay_count >= 3) ++ { ++ ops[0] = gen_rtx_MEM (SImode, ++ plus_constant (st_addr_reg, st_len - st_offset)); ++ ops[1] = operands[st_reg + 4]; ++ output_asm_insn ("stw\t%1, %0", ops); ++ ++ st_reg = (st_reg + 1) % 3; ++ st_offset -= 4; ++ } ++ ++ ops[0] = gen_rtx_MEM (HImode, ++ plus_constant (ld_addr_reg, ld_len - ld_offset)); ++ ops[1] = operands[ld_reg + 4]; ++ output_asm_insn ("ldh\t%1, %0", ops); ++ ++ ld_reg = (ld_reg + 1) % 3; ++ ld_offset -= 2; ++ delay_count++; ++ } ++ ++ if (ld_offset >= 1) ++ { ++ /* if the load use delay has been met, I can start ++ storing */ ++ if (delay_count >= 3) ++ { ++ ops[0] = gen_rtx_MEM (SImode, ++ plus_constant (st_addr_reg, st_len - st_offset)); ++ ops[1] = operands[st_reg + 4]; ++ output_asm_insn ("stw\t%1, %0", ops); ++ ++ st_reg = (st_reg + 1) % 3; ++ st_offset -= 4; ++ } ++ ++ ops[0] = gen_rtx_MEM (QImode, ++ plus_constant (ld_addr_reg, ld_len - ld_offset)); ++ ops[1] = operands[ld_reg + 4]; ++ output_asm_insn ("ldb\t%1, %0", ops); ++ ++ ld_reg = (ld_reg + 1) % 3; ++ ld_offset -= 1; ++ delay_count++; ++ } ++ ++ while (st_offset >= 4) ++ { ++ ops[0] = gen_rtx_MEM (SImode, ++ plus_constant (st_addr_reg, st_len - st_offset)); ++ ops[1] = operands[st_reg + 4]; ++ output_asm_insn ("stw\t%1, %0", ops); ++ ++ st_reg = (st_reg + 1) % 3; ++ st_offset -= 4; ++ } ++ ++ while (st_offset >= 2) ++ { ++ ops[0] = gen_rtx_MEM (HImode, ++ plus_constant (st_addr_reg, st_len - st_offset)); ++ ops[1] = operands[st_reg + 4]; ++ output_asm_insn ("sth\t%1, %0", ops); ++ ++ st_reg = (st_reg + 1) % 3; ++ st_offset -= 2; ++ } ++ ++ while (st_offset >= 1) ++ { ++ ops[0] = gen_rtx_MEM (QImode, ++ plus_constant (st_addr_reg, st_len - st_offset)); ++ ops[1] = operands[st_reg + 4]; ++ output_asm_insn ("stb\t%1, %0", ops); ++ ++ st_reg = (st_reg + 1) % 3; ++ st_offset -= 1; ++ } ++ ++ return ""; ++} ++; ??? lengths are not being used yet, but I will probably forget ++; to update this once I am using lengths, so set it to something ++; definetely big enough to cover it. 400 allows for 200 bytes ++; of motion. ++ [(set_attr "length" "400")]) ++ ++ ++ ++;***************************************************************************** ++;* ++;* Custom instructions ++;* ++;***************************************************************************** ++ ++(define_constants [ ++ (CUSTOM_N 100) ++ (CUSTOM_NI 101) ++ (CUSTOM_NF 102) ++ (CUSTOM_NP 103) ++ (CUSTOM_NII 104) ++ (CUSTOM_NIF 105) ++ (CUSTOM_NIP 106) ++ (CUSTOM_NFI 107) ++ (CUSTOM_NFF 108) ++ (CUSTOM_NFP 109) ++ (CUSTOM_NPI 110) ++ (CUSTOM_NPF 111) ++ (CUSTOM_NPP 112) ++ (CUSTOM_IN 113) ++ (CUSTOM_INI 114) ++ (CUSTOM_INF 115) ++ (CUSTOM_INP 116) ++ (CUSTOM_INII 117) ++ (CUSTOM_INIF 118) ++ (CUSTOM_INIP 119) ++ (CUSTOM_INFI 120) ++ (CUSTOM_INFF 121) ++ (CUSTOM_INFP 122) ++ (CUSTOM_INPI 123) ++ (CUSTOM_INPF 124) ++ (CUSTOM_INPP 125) ++ (CUSTOM_FN 126) ++ (CUSTOM_FNI 127) ++ (CUSTOM_FNF 128) ++ (CUSTOM_FNP 129) ++ (CUSTOM_FNII 130) ++ (CUSTOM_FNIF 131) ++ (CUSTOM_FNIP 132) ++ (CUSTOM_FNFI 133) ++ (CUSTOM_FNFF 134) ++ (CUSTOM_FNFP 135) ++ (CUSTOM_FNPI 136) ++ (CUSTOM_FNPF 137) ++ (CUSTOM_FNPP 138) ++ (CUSTOM_PN 139) ++ (CUSTOM_PNI 140) ++ (CUSTOM_PNF 141) ++ (CUSTOM_PNP 142) ++ (CUSTOM_PNII 143) ++ (CUSTOM_PNIF 144) ++ (CUSTOM_PNIP 145) ++ (CUSTOM_PNFI 146) ++ (CUSTOM_PNFF 147) ++ (CUSTOM_PNFP 148) ++ (CUSTOM_PNPI 149) ++ (CUSTOM_PNPF 150) ++ (CUSTOM_PNPP 151) ++]) ++ ++ ++(define_insn "custom_n" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N")] CUSTOM_N)] ++ "" ++ "custom\\t%0, zero, zero, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_ni" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NI)] ++ "" ++ "custom\\t%0, zero, %1, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nf" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SF 1 "register_operand" "r")] CUSTOM_NF)] ++ "" ++ "custom\\t%0, zero, %1, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_np" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r")] CUSTOM_NP)] ++ "" ++ "custom\\t%0, zero, %1, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nii" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NII)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nif" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NIF)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nip" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NIP)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nfi" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFI)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nff" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NFF)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_nfp" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SF 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NFP)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_npi" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPI)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_npf" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SF 2 "register_operand" "r")] CUSTOM_NPF)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_npp" ++ [(unspec_volatile [(match_operand:SI 0 "custom_insn_opcode" "N") ++ (match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "register_operand" "r")] CUSTOM_NPP)] ++ "" ++ "custom\\t%0, zero, %1, %2" ++ [(set_attr "type" "custom")]) ++ ++ ++ ++(define_insn "custom_in" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] ++ CUSTOM_IN))] ++ "" ++ "custom\\t%1, %0, zero, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_ini" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r")] ++ CUSTOM_INI))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r")] ++ CUSTOM_INF))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inp" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r")] ++ CUSTOM_INP))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inii" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_INII))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inif" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_INIF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inip" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_INIP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_infi" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_INFI))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inff" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_INFF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_infp" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_INFP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inpi" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_INPI))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inpf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_INPF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_inpp" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_INPP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++ ++ ++ ++ ++(define_insn "custom_fn" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N")] ++ CUSTOM_FN))] ++ "" ++ "custom\\t%1, %0, zero, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fni" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r")] ++ CUSTOM_FNI))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnf" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r")] ++ CUSTOM_FNF))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnp" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r")] ++ CUSTOM_FNP))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnii" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_FNII))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnif" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_FNIF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnip" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_FNIP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnfi" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_FNFI))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnff" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_FNFF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnfp" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_FNFP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnpi" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_FNPI))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnpf" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_FNPF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_fnpp" ++ [(set (match_operand:SF 0 "register_operand" "=r") ++ (unspec_volatile:SF [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_FNPP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++ ++ ++(define_insn "custom_pn" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N")] ++ CUSTOM_PN))] ++ "" ++ "custom\\t%1, %0, zero, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pni" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r")] ++ CUSTOM_PNI))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r")] ++ CUSTOM_PNF))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnp" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r")] ++ CUSTOM_PNP))] ++ "" ++ "custom\\t%1, %0, %2, zero" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnii" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_PNII))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnif" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_PNIF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnip" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_PNIP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnfi" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_PNFI))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnff" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_PNFF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnfp" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SF 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_PNFP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnpi" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_PNPI))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnpf" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SF 3 "register_operand" "r")] ++ CUSTOM_PNPF))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++(define_insn "custom_pnpp" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "custom_insn_opcode" "N") ++ (match_operand:SI 2 "register_operand" "r") ++ (match_operand:SI 3 "register_operand" "r")] ++ CUSTOM_PNPP))] ++ "" ++ "custom\\t%1, %0, %2, %3" ++ [(set_attr "type" "custom")]) ++ ++ ++ ++ ++ ++ ++;***************************************************************************** ++;* ++;* Misc ++;* ++;***************************************************************************** ++ ++(define_insn "nop" ++ [(const_int 0)] ++ "" ++ "nop\\t" ++ [(set_attr "type" "alu")]) ++ ++(define_insn "sync" ++ [(unspec_volatile [(const_int 0)] UNSPEC_SYNC)] ++ "" ++ "sync\\t" ++ [(set_attr "type" "control")]) ++ ++ ++(define_insn "rdctl" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec_volatile:SI [(match_operand:SI 1 "rdwrctl_operand" "O")] ++ UNSPEC_RDCTL))] ++ "" ++ "rdctl\\t%0, ctl%1" ++ [(set_attr "type" "control")]) ++ ++(define_insn "wrctl" ++ [(unspec_volatile:SI [(match_operand:SI 0 "rdwrctl_operand" "O") ++ (match_operand:SI 1 "reg_or_0_operand" "rM")] ++ UNSPEC_WRCTL)] ++ "" ++ "wrctl\\tctl%0, %z1" ++ [(set_attr "type" "control")]) ++ ++;Used to signal a stack overflow ++(define_insn "trap" ++ [(unspec_volatile [(const_int 0)] UNSPEC_TRAP)] ++ "" ++ "break\\t3" ++ [(set_attr "type" "control")]) ++ ++(define_insn "stack_overflow_detect_and_trap" ++ [(unspec_volatile [(const_int 0)] UNSPEC_STACK_OVERFLOW_DETECT_AND_TRAP)] ++ "" ++ "bgeu\\tsp, et, 1f\;break\\t3\;1:" ++ [(set_attr "type" "control")]) ++ ++;Load the GOT register. ++(define_insn "load_got_register" ++ [(set (match_operand:SI 0 "register_operand" "=&r") ++ (unspec:SI [(const_int 0)] UNSPEC_LOAD_GOT_REGISTER)) ++ (set (match_operand:SI 1 "register_operand" "=r") ++ (unspec:SI [(const_int 0)] UNSPEC_LOAD_GOT_REGISTER))] ++ "" ++ "nextpc\\t%0 ++\\t1: ++\\tmovhi\\t%1, %%hiadj(_GLOBAL_OFFSET_TABLE_ - 1b) ++\\taddi\\t%1, %1, %%lo(_GLOBAL_OFFSET_TABLE_ - 1b)" ++ [(set_attr "length" "12")]) ++ ++;; When generating pic, we need to load the symbol offset into a register. ++;; So that the optimizer does not confuse this with a normal symbol load ++;; we use an unspec. The offset will be loaded from a constant pool entry, ++;; since that is the only type of relocation we can use. ++ ++;; The rather odd constraints on the following are to force reload to leave ++;; the insn alone, and to force the minipool generation pass to then move ++;; the GOT symbol to memory. ++ ++;; FIXME:these uses look unnecessary. ++(define_insn "pic_load_addr" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_PIC_SYM)) ++ (use (match_dup 1))] ++ "flag_pic" ++ "ldw\\t%0, %%got(%2)(%1)") ++ ++(define_insn "pic_load_call_addr" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_PIC_CALL_SYM)) ++ (use (match_dup 1))] ++ "flag_pic" ++ "ldw\\t%0, %%call(%2)(%1)") ++ ++;; TLS support ++ ++(define_insn "add_tls_gd" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_ADD_TLS_GD))] ++ "" ++ "addi\t%0, %1, %%tls_gd(%2)") ++ ++(define_insn "load_tls_ie" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_LOAD_TLS_IE))] ++ "" ++ "ldw\t%0, %%tls_ie(%2)(%1)") ++ ++(define_insn "add_tls_ldm" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_ADD_TLS_LDM))] ++ "" ++ "addi\t%0, %1, %%tls_ldm(%2)") ++ ++(define_insn "add_tls_ldo" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_ADD_TLS_LDO))] ++ "" ++ "addi\t%0, %1, %%tls_ldo(%2)") ++ ++(define_insn "add_tls_le" ++ [(set (match_operand:SI 0 "register_operand" "=r") ++ (unspec:SI [(match_operand:SI 1 "register_operand" "r") ++ (match_operand:SI 2 "" "mX")] UNSPEC_ADD_TLS_LE))] ++ "" ++ "addi\t%0, %1, %%tls_le(%2)") ++ ++ ++;***************************************************************************** ++;* ++;* Peepholes ++;* ++;***************************************************************************** ++ ++ ++;; Local Variables: ++;; mode: lisp ++;; End: +Index: gcc-4.1.2/gcc/config/nios2/nios2.opt +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/nios2.opt 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,519 @@ ++; NOT ASSIGNED TO FSF. COPYRIGHT ALTERA. ++; Options for the Nios II port of the compiler. ++ ++; This file is part of GCC. ++; ++; GCC 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. ++; ++; 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, 51 Franklin Street, Fifth Floor, Boston, MA ++; 02110-1301, USA. ++ ++mhw-div ++Target Report Mask(HAS_DIV) ++Enable DIV, DIVU ++ ++mhw-mul ++Target Report Mask(HAS_MUL) ++Enable MUL instructions ++ ++mhw-mulx ++Target Report Mask(HAS_MULX) ++Enable MULX instructions, assume fast shifter ++ ++mfast-sw-div ++Target Report Mask(FAST_SW_DIV) ++Use table based fast divide (default at -O3) ++ ++minline-memory ++Target Report Mask(INLINE_MEMCPY) ++Inline small memcpy (default when optimizing) ++ ++mbypass-cache ++Target Report Mask(BYPASS_CACHE) ++All ld/st instructions use io variants ++ ++mstack-check ++Target Report Mask(STACK_CHECK) ++Enable stack limit checking ++ ++mreverse-bitfields ++Target Report Mask(REVERSE_BITFIELDS) ++Reverse the order of bitfields in a struct ++ ++meb ++Target Report RejectNegative Mask(BIG_ENDIAN) ++Use big-endian byte order ++ ++mel ++Target Report RejectNegative InverseMask(BIG_ENDIAN) ++Use little-endian byte order ++ ++mcustom-fpu-cfg= ++Target RejectNegative Joined Var(nios2_custom_fpu_cfg_string) VarExists ++Floating point custom instruction configuration name ++ ++mno-custom-ftruncds ++Target Report RejectNegative Var(nios2_custom_ftruncds, -1) VarExists ++Do not use the ftruncds custom instruction ++ ++mcustom-ftruncds= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_ftruncds) VarExists ++Integer id (N) of ftruncds custom instruction ++ ++mno-custom-fextsd ++Target Report RejectNegative Var(nios2_custom_fextsd, -1) VarExists ++Do not use the fextsd custom instruction ++ ++mcustom-fextsd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fextsd) VarExists ++Integer id (N) of fextsd custom instruction ++ ++mno-custom-fixdu ++Target Report RejectNegative Var(nios2_custom_fixdu, -1) VarExists ++Do not use the fixdu custom instruction ++ ++mcustom-fixdu= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fixdu) VarExists ++Integer id (N) of fixdu custom instruction ++ ++mno-custom-fixdi ++Target Report RejectNegative Var(nios2_custom_fixdi, -1) VarExists ++Do not use the fixdi custom instruction ++ ++mcustom-fixdi= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fixdi) VarExists ++Integer id (N) of fixdi custom instruction ++ ++mno-custom-fixsu ++Target Report RejectNegative Var(nios2_custom_fixsu, -1) VarExists ++Do not use the fixsu custom instruction ++ ++mcustom-fixsu= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fixsu) VarExists ++Integer id (N) of fixsu custom instruction ++ ++mno-custom-fixsi ++Target Report RejectNegative Var(nios2_custom_fixsi, -1) VarExists ++Do not use the fixsi custom instruction ++ ++mcustom-fixsi= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fixsi) VarExists ++Integer id (N) of fixsi custom instruction ++ ++mno-custom-floatud ++Target Report RejectNegative Var(nios2_custom_floatud, -1) VarExists ++Do not use the floatud custom instruction ++ ++mcustom-floatud= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_floatud) VarExists ++Integer id (N) of floatud custom instruction ++ ++mno-custom-floatid ++Target Report RejectNegative Var(nios2_custom_floatid, -1) VarExists ++Do not use the floatid custom instruction ++ ++mcustom-floatid= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_floatid) VarExists ++Integer id (N) of floatid custom instruction ++ ++mno-custom-floatus ++Target Report RejectNegative Var(nios2_custom_floatus, -1) VarExists ++Do not use the floatus custom instruction ++ ++mcustom-floatus= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_floatus) VarExists ++Integer id (N) of floatus custom instruction ++ ++mno-custom-floatis ++Target Report RejectNegative Var(nios2_custom_floatis, -1) VarExists ++Do not use the floatis custom instruction ++ ++mcustom-floatis= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_floatis) VarExists ++Integer id (N) of floatis custom instruction ++ ++mno-custom-fcmpned ++Target Report RejectNegative Var(nios2_custom_fcmpned, -1) VarExists ++Do not use the fcmpned custom instruction ++ ++mcustom-fcmpned= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpned) VarExists ++Integer id (N) of fcmpned custom instruction ++ ++mno-custom-fcmpeqd ++Target Report RejectNegative Var(nios2_custom_fcmpeqd, -1) VarExists ++Do not use the fcmpeqd custom instruction ++ ++mcustom-fcmpeqd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpeqd) VarExists ++Integer id (N) of fcmpeqd custom instruction ++ ++mno-custom-fcmpged ++Target Report RejectNegative Var(nios2_custom_fcmpged, -1) VarExists ++Do not use the fcmpged custom instruction ++ ++mcustom-fcmpged= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpged) VarExists ++Integer id (N) of fcmpged custom instruction ++ ++mno-custom-fcmpgtd ++Target Report RejectNegative Var(nios2_custom_fcmpgtd, -1) VarExists ++Do not use the fcmpgtd custom instruction ++ ++mcustom-fcmpgtd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpgtd) VarExists ++Integer id (N) of fcmpgtd custom instruction ++ ++mno-custom-fcmpled ++Target Report RejectNegative Var(nios2_custom_fcmpled, -1) VarExists ++Do not use the fcmpled custom instruction ++ ++mcustom-fcmpled= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpled) VarExists ++Integer id (N) of fcmpled custom instruction ++ ++mno-custom-fcmpltd ++Target Report RejectNegative Var(nios2_custom_fcmpltd, -1) VarExists ++Do not use the fcmpltd custom instruction ++ ++mcustom-fcmpltd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpltd) VarExists ++Integer id (N) of fcmpltd custom instruction ++ ++mno-custom-flogd ++Target Report RejectNegative Var(nios2_custom_flogd, -1) VarExists ++Do not use the flogd custom instruction ++ ++mcustom-flogd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_flogd) VarExists ++Integer id (N) of flogd custom instruction ++ ++mno-custom-fexpd ++Target Report RejectNegative Var(nios2_custom_fexpd, -1) VarExists ++Do not use the fexpd custom instruction ++ ++mcustom-fexpd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fexpd) VarExists ++Integer id (N) of fexpd custom instruction ++ ++mno-custom-fatand ++Target Report RejectNegative Var(nios2_custom_fatand, -1) VarExists ++Do not use the fatand custom instruction ++ ++mcustom-fatand= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fatand) VarExists ++Integer id (N) of fatand custom instruction ++ ++mno-custom-ftand ++Target Report RejectNegative Var(nios2_custom_ftand, -1) VarExists ++Do not use the ftand custom instruction ++ ++mcustom-ftand= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_ftand) VarExists ++Integer id (N) of ftand custom instruction ++ ++mno-custom-fsind ++Target Report RejectNegative Var(nios2_custom_fsind, -1) VarExists ++Do not use the fsind custom instruction ++ ++mcustom-fsind= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fsind) VarExists ++Integer id (N) of fsind custom instruction ++ ++mno-custom-fcosd ++Target Report RejectNegative Var(nios2_custom_fcosd, -1) VarExists ++Do not use the fcosd custom instruction ++ ++mcustom-fcosd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcosd) VarExists ++Integer id (N) of fcosd custom instruction ++ ++mno-custom-fsqrtd ++Target Report RejectNegative Var(nios2_custom_fsqrtd, -1) VarExists ++Do not use the fsqrtd custom instruction ++ ++mcustom-fsqrtd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fsqrtd) VarExists ++Integer id (N) of fsqrtd custom instruction ++ ++mno-custom-fabsd ++Target Report RejectNegative Var(nios2_custom_fabsd, -1) VarExists ++Do not use the fabsd custom instruction ++ ++mcustom-fabsd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fabsd) VarExists ++Integer id (N) of fabsd custom instruction ++ ++mno-custom-fnegd ++Target Report RejectNegative Var(nios2_custom_fnegd, -1) VarExists ++Do not use the fnegd custom instruction ++ ++mcustom-fnegd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fnegd) VarExists ++Integer id (N) of fnegd custom instruction ++ ++mno-custom-fmaxd ++Target Report RejectNegative Var(nios2_custom_fmaxd, -1) VarExists ++Do not use the fmaxd custom instruction ++ ++mcustom-fmaxd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fmaxd) VarExists ++Integer id (N) of fmaxd custom instruction ++ ++mno-custom-fmind ++Target Report RejectNegative Var(nios2_custom_fmind, -1) VarExists ++Do not use the fmind custom instruction ++ ++mcustom-fmind= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fmind) VarExists ++Integer id (N) of fmind custom instruction ++ ++mno-custom-fdivd ++Target Report RejectNegative Var(nios2_custom_fdivd, -1) VarExists ++Do not use the fdivd custom instruction ++ ++mcustom-fdivd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fdivd) VarExists ++Integer id (N) of fdivd custom instruction ++ ++mno-custom-fmuld ++Target Report RejectNegative Var(nios2_custom_fmuld, -1) VarExists ++Do not use the fmuld custom instruction ++ ++mcustom-fmuld= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fmuld) VarExists ++Integer id (N) of fmuld custom instruction ++ ++mno-custom-fsubd ++Target Report RejectNegative Var(nios2_custom_fsubd, -1) VarExists ++Do not use the fsubd custom instruction ++ ++mcustom-fsubd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fsubd) VarExists ++Integer id (N) of fsubd custom instruction ++ ++mno-custom-faddd ++Target Report RejectNegative Var(nios2_custom_faddd, -1) VarExists ++Do not use the faddd custom instruction ++ ++mcustom-faddd= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_faddd) VarExists ++Integer id (N) of faddd custom instruction ++ ++mno-custom-fcmpnes ++Target Report RejectNegative Var(nios2_custom_fcmpnes, -1) VarExists ++Do not use the fcmpnes custom instruction ++ ++mcustom-fcmpnes= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpnes) VarExists ++Integer id (N) of fcmpnes custom instruction ++ ++mno-custom-fcmpeqs ++Target Report RejectNegative Var(nios2_custom_fcmpeqs, -1) VarExists ++Do not use the fcmpeqs custom instruction ++ ++mcustom-fcmpeqs= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpeqs) VarExists ++Integer id (N) of fcmpeqs custom instruction ++ ++mno-custom-fcmpges ++Target Report RejectNegative Var(nios2_custom_fcmpges, -1) VarExists ++Do not use the fcmpges custom instruction ++ ++mcustom-fcmpges= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpges) VarExists ++Integer id (N) of fcmpges custom instruction ++ ++mno-custom-fcmpgts ++Target Report RejectNegative Var(nios2_custom_fcmpgts, -1) VarExists ++Do not use the fcmpgts custom instruction ++ ++mcustom-fcmpgts= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmpgts) VarExists ++Integer id (N) of fcmpgts custom instruction ++ ++mno-custom-fcmples ++Target Report RejectNegative Var(nios2_custom_fcmples, -1) VarExists ++Do not use the fcmples custom instruction ++ ++mcustom-fcmples= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmples) VarExists ++Integer id (N) of fcmples custom instruction ++ ++mno-custom-fcmplts ++Target Report RejectNegative Var(nios2_custom_fcmplts, -1) VarExists ++Do not use the fcmplts custom instruction ++ ++mcustom-fcmplts= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcmplts) VarExists ++Integer id (N) of fcmplts custom instruction ++ ++mno-custom-flogs ++Target Report RejectNegative Var(nios2_custom_flogs, -1) VarExists ++Do not use the flogs custom instruction ++ ++mcustom-flogs= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_flogs) VarExists ++Integer id (N) of flogs custom instruction ++ ++mno-custom-fexps ++Target Report RejectNegative Var(nios2_custom_fexps, -1) VarExists ++Do not use the fexps custom instruction ++ ++mcustom-fexps= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fexps) VarExists ++Integer id (N) of fexps custom instruction ++ ++mno-custom-fatans ++Target Report RejectNegative Var(nios2_custom_fatans, -1) VarExists ++Do not use the fatans custom instruction ++ ++mcustom-fatans= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fatans) VarExists ++Integer id (N) of fatans custom instruction ++ ++mno-custom-ftans ++Target Report RejectNegative Var(nios2_custom_ftans, -1) VarExists ++Do not use the ftans custom instruction ++ ++mcustom-ftans= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_ftans) VarExists ++Integer id (N) of ftans custom instruction ++ ++mno-custom-fsins ++Target Report RejectNegative Var(nios2_custom_fsins, -1) VarExists ++Do not use the fsins custom instruction ++ ++mcustom-fsins= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fsins) VarExists ++Integer id (N) of fsins custom instruction ++ ++mno-custom-fcoss ++Target Report RejectNegative Var(nios2_custom_fcoss, -1) VarExists ++Do not use the fcoss custom instruction ++ ++mcustom-fcoss= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fcoss) VarExists ++Integer id (N) of fcoss custom instruction ++ ++mno-custom-fsqrts ++Target Report RejectNegative Var(nios2_custom_fsqrts, -1) VarExists ++Do not use the fsqrts custom instruction ++ ++mcustom-fsqrts= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fsqrts) VarExists ++Integer id (N) of fsqrts custom instruction ++ ++mno-custom-fabss ++Target Report RejectNegative Var(nios2_custom_fabss, -1) VarExists ++Do not use the fabss custom instr ++ ++mcustom-fabss= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fabss) VarExists ++Integer id (N) of fabss custom instruction ++ ++mno-custom-fnegs ++Target Report RejectNegative Var(nios2_custom_fnegs, -1) VarExists ++Do not use the fnegs custom instruction ++ ++mcustom-fnegs= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fnegs) VarExists ++Integer id (N) of fnegs custom instruction ++ ++mno-custom-fmaxs ++Target Report RejectNegative Var(nios2_custom_fmaxs, -1) VarExists ++Do not use the fmaxs custom instruction ++ ++mcustom-fmaxs= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fmaxs) VarExists ++Integer id (N) of fmaxs custom instruction ++ ++mno-custom-fmins ++Target Report RejectNegative Var(nios2_custom_fmins, -1) VarExists ++Do not use the fmins custom instruction ++ ++mcustom-fmins= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fmins) VarExists ++Integer id (N) of fmins custom instruction ++ ++mno-custom-fdivs ++Target Report RejectNegative Var(nios2_custom_fdivs, -1) VarExists ++Do not use the fdivs custom instruction ++ ++mcustom-fdivs= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fdivs) VarExists ++Integer id (N) of fdivs custom instruction ++ ++mno-custom-fmuls ++Target Report RejectNegative Var(nios2_custom_fmuls, -1) VarExists ++Do not use the fmuls custom instruction ++ ++mcustom-fmuls= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fmuls) VarExists ++Integer id (N) of fmuls custom instruction ++ ++mno-custom-fsubs ++Target Report RejectNegative Var(nios2_custom_fsubs, -1) VarExists ++Do not use the fsubs custom instruction ++ ++mcustom-fsubs= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fsubs) VarExists ++Integer id (N) of fsubs custom instruction ++ ++mno-custom-fadds ++Target Report RejectNegative Var(nios2_custom_fadds, -1) VarExists ++Do not use the fadds custom instruction ++ ++mcustom-fadds= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fadds) VarExists ++Integer id (N) of fadds custom instruction ++ ++mno-custom-frdy ++Target Report RejectNegative Var(nios2_custom_frdy, -1) VarExists ++Do not use the frdy custom instruction ++ ++mcustom-frdy= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_frdy) VarExists ++Integer id (N) of frdy custom instruction ++ ++mno-custom-frdxhi ++Target Report RejectNegative Var(nios2_custom_frdxhi, -1) VarExists ++Do not use the frdxhi custom instruction ++ ++mcustom-frdxhi= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_frdxhi) VarExists ++Integer id (N) of frdxhi custom instruction ++ ++mno-custom-frdxlo ++Target Report RejectNegative Var(nios2_custom_frdxlo, -1) VarExists ++Do not use the frdxlo custom instruction ++ ++mcustom-frdxlo= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_frdxlo) VarExists ++Integer id (N) of frdxlo custom instruction ++ ++mno-custom-fwry ++Target Report RejectNegative Var(nios2_custom_fwry, -1) VarExists ++Do not use the fwry custom instruction ++ ++mcustom-fwry= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fwry) VarExists ++Integer id (N) of fwry custom instruction ++ ++mno-custom-fwrx ++Target Report RejectNegative Var(nios2_custom_fwrx, -1) VarExists ++Do not use the fwrx custom instruction ++ ++mcustom-fwrx= ++Target Report RejectNegative Joined UInteger Var(nios2_custom_fwrx) VarExists ++Integer id (N) of fwrx custom instruction +Index: gcc-4.1.2/gcc/config/nios2/t-linux +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/t-linux 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,9 @@ ++# Soft-float functions go in glibc only, to facilitate the possible ++# future addition of exception and rounding mode support integrated ++# with <fenv.h>. ++ ++FPBIT= ++DPBIT= ++LIB2FUNCS_EXCLUDE = _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \ ++ _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _floatundidf _floatundisf ++LIB2FUNCS_EXTRA += $(srcdir)/config/nios2/linux-atomic.c +Index: gcc-4.1.2/gcc/config/nios2/t-nios2 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.1.2/gcc/config/nios2/t-nios2 2010-06-30 08:50:26.000000000 +0200 +@@ -0,0 +1,176 @@ ++## ++## Compiler flags to use when compiling libgcc2.c. ++## ++## LIB2FUNCS_EXTRA ++## A list of source file names to be compiled or assembled and inserted into ++## libgcc.a. ++ ++LIB2FUNCS_EXTRA=$(srcdir)/config/nios2/lib2-divmod.c \ ++ $(srcdir)/config/nios2/lib2-divmod-hi.c \ ++ $(srcdir)/config/nios2/lib2-divtable.c \ ++ $(srcdir)/config/nios2/lib2-mul.c ++ ++## ++## Floating Point Emulation ++## To have GCC include software floating point libraries in libgcc.a define FPBIT ++## and DPBIT along with a few rules as follows: ++## ++## # We want fine grained libraries, so use the new code ++## # to build the floating point emulation libraries. ++FPBIT=fp-bit.c ++DPBIT=dp-bit.c ++ ++TARGET_LIBGCC2_CFLAGS = -O2 -fpic ++ ++# FLOAT_ONLY - no doubles ++# SMALL_MACHINE - QI/HI is faster than SI ++# Actually SMALL_MACHINE uses chars and shorts instead of ints ++# since ints (16-bit ones as they are today) are at least as fast ++# as chars and shorts, don't define SMALL_MACHINE ++# CMPtype - type returned by FP compare, i.e. INT (hard coded in fp-bit - see code ) ++ ++$(FPBIT): $(srcdir)/config/fp-bit.c Makefile ++ echo '#define FLOAT' > ${FPBIT} ++ echo '#ifndef __nios2_big_endian__' >> ${FPBIT} ++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> ${FPBIT} ++ echo '#endif' >> ${FPBIT} ++ cat $(srcdir)/config/fp-bit.c >> ${FPBIT} ++ ++$(DPBIT): $(srcdir)/config/fp-bit.c Makefile ++ echo '' > ${DPBIT} ++ echo '#ifndef __nios2_big_endian__' >> ${DPBIT} ++ echo '#define FLOAT_BIT_ORDER_MISMATCH' >> ${DPBIT} ++ echo '#endif' >> ${DPBIT} ++ cat $(srcdir)/config/fp-bit.c >> ${DPBIT} ++ ++EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o crtbeginS.o \ ++ crtbeginT.o crtendS.o ++ ++# Assemble startup files. ++$(T)crti.o: $(srcdir)/config/nios2/crti.asm $(GCC_PASSES) ++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ ++ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/nios2/crti.asm ++ ++$(T)crtn.o: $(srcdir)/config/nios2/crtn.asm $(GCC_PASSES) ++ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ ++ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/nios2/crtn.asm ++ ++ ++## You may need to provide additional #defines at the beginning of ++## fp-bit.c and dp-bit.c to control target endianness and other options ++## ++## CRTSTUFF_T_CFLAGS ++## Special flags used when compiling crtstuff.c. See Initialization. ++## ++## CRTSTUFF_T_CFLAGS_S ++## Special flags used when compiling crtstuff.c for shared linking. Used ++## if you use crtbeginS.o and crtendS.o in EXTRA-PARTS. See Initialization. ++## ++## MULTILIB_OPTIONS ++## For some targets, invoking GCC in different ways produces objects that ++## can not be linked together. For example, for some targets GCC produces ++## both big and little endian code. For these targets, you must arrange ++## for multiple versions of libgcc.a to be compiled, one for each set of ++## incompatible options. When GCC invokes the linker, it arranges to link ++## in the right version of libgcc.a, based on the command line options ++## used. ++## The MULTILIB_OPTIONS macro lists the set of options for which special ++## versions of libgcc.a must be built. Write options that are mutually ++## incompatible side by side, separated by a slash. Write options that may ++## be used together separated by a space. The build procedure will build ++## all combinations of compatible options. ++## ++## For example, if you set MULTILIB_OPTIONS to m68000/m68020 msoft-float, ++## Makefile will build special versions of libgcc.a using the following ++## sets of options: -m68000, -m68020, -msoft-float, -m68000 -msoft-float, ++## and -m68020 -msoft-float. ++ ++ ++## The BUILD_BE_MULTILIB and BUILD_PG_MULTILIB variables allow the ++## makefile user to enable/disable the generation of the precompiled ++## big endian and profiling libraries. By default, the big endian ++## libraries are not created on a windows build and the profiling ++## libraries are not created on a Solaris build. All other library ++## combinations are created by default. ++ ++# Uncomment to temporarily avoid building big endian and profiling libraries during a Windows build. ++#ifeq ($(DEV_HOST_OS), win32) ++#BUILD_BE_MULTILIB ?= 0 ++#BUILD_PG_MULTILIB ?= 0 ++#endif ++ ++#By default, avoid building the profiling libraries during a Solaris build. ++ifeq ($(DEV_HOST_OS), solaris) ++BUILD_PG_MULTILIB ?= 0 ++endif ++ ++BUILD_BE_MULTILIB ?= 0 ++BUILD_PG_MULTILIB ?= 1 ++BUILD_MULTILIB ?= 0 ++ ++ifeq ($(BUILD_MULTILIB), 1) ++ ++MULTILIB_OPTIONS = mno-hw-mul mhw-mulx mstack-check mcustom-fpu-cfg=60-1 mcustom-fpu-cfg=60-2 ++ ++#Add the profiling flag to the multilib variable if required ++ifeq ($(BUILD_PG_MULTILIB), 1) ++MULTILIB_OPTIONS += pg ++endif ++ ++#Add the big endian flag to the multilib variable if required ++ifeq ($(BUILD_BE_MULTILIB), 1) ++MULTILIB_OPTIONS += EB/EL ++endif ++ ++endif ++ ++## MULTILIB_DIRNAMES ++## If MULTILIB_OPTIONS is used, this variable specifies the directory names ++## that should be used to hold the various libraries. Write one element in ++## MULTILIB_DIRNAMES for each element in MULTILIB_OPTIONS. If ++## MULTILIB_DIRNAMES is not used, the default value will be ++## MULTILIB_OPTIONS, with all slashes treated as spaces. ++## For example, if MULTILIB_OPTIONS is set to m68000/m68020 msoft-float, ++## then the default value of MULTILIB_DIRNAMES is m68000 m68020 ++## msoft-float. You may specify a different value if you desire a ++## different set of directory names. ++ ++# MULTILIB_DIRNAMES = ++ ++## MULTILIB_MATCHES ++## Sometimes the same option may be written in two different ways. If an ++## option is listed in MULTILIB_OPTIONS, GCC needs to know about any ++## synonyms. In that case, set MULTILIB_MATCHES to a list of items of the ++## form option=option to describe all relevant synonyms. For example, ++## m68000=mc68000 m68020=mc68020. ++ ++ifeq ($(BUILD_MULTILIB), 1) ++ifeq ($(BUILD_BE_MULTILIB), 1) ++MULTILIB_MATCHES = EL=mel EB=meb ++endif ++endif ++ ++## ++## MULTILIB_EXCEPTIONS ++## Sometimes when there are multiple sets of MULTILIB_OPTIONS being ++## specified, there are combinations that should not be built. In that ++## case, set MULTILIB_EXCEPTIONS to be all of the switch exceptions in ++## shell case syntax that should not be built. ++## For example, in the PowerPC embedded ABI support, it is not desirable to ++## build libraries compiled with the -mcall-aix option and either of the ++## -fleading-underscore or -mlittle options at the same time. Therefore ++## MULTILIB_EXCEPTIONS is set to ++## ++## *mcall-aix/*fleading-underscore* *mlittle/*mcall-aix* ++## ++ ++ifeq ($(BUILD_MULTILIB), 1) ++MULTILIB_EXCEPTIONS = *mno-hw-mul/*mhw-mulx* *mcustom-fpu-cfg=60-1/*mcustom-fpu-cfg=60-2* ++endif ++ ++## ++## MULTILIB_EXTRA_OPTS Sometimes it is desirable that when building ++## multiple versions of libgcc.a certain options should always be passed on ++## to the compiler. In that case, set MULTILIB_EXTRA_OPTS to be the list ++## of options to be used for all builds. ++## diff --git a/recipes/gcc/gcc-4.1.2/nios2-lib-flags.patch b/recipes/gcc/gcc-4.1.2/nios2-lib-flags.patch new file mode 100644 index 0000000000..e125ba0f6c --- /dev/null +++ b/recipes/gcc/gcc-4.1.2/nios2-lib-flags.patch @@ -0,0 +1,10 @@ +Index: gcc-4.1.2/config/mt-ospace +=================================================================== +--- gcc-4.1.2.orig/config/mt-ospace 2010-06-02 10:23:01.000000000 +0200 ++++ gcc-4.1.2/config/mt-ospace 2010-06-02 10:23:28.000000000 +0200 +@@ -1,3 +1,2 @@ +-# Build libraries optimizing for space, not speed. +- CFLAGS_FOR_TARGET = -g -Os +- CXXFLAGS_FOR_TARGET = -g -Os ++ CFLAGS_FOR_TARGET = -g -O2 ++ CXXFLAGS_FOR_TARGET = -g -O2 diff --git a/recipes/gcc/gcc-4.2.1.inc b/recipes/gcc/gcc-4.2.1.inc index 0e627235b0..fbee758896 100644 --- a/recipes/gcc/gcc-4.2.1.inc +++ b/recipes/gcc/gcc-4.2.1.inc @@ -3,87 +3,90 @@ require gcc-common.inc DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" +INC_PR = "r22" + SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran.patch;patch=1 \ - file://pr34130.patch;patch=1 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://402-libbackend_dep_gcov-iov.h.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc41-configure.in.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://zecke-xgcc-cpp.patch \ + file://unbreak-armv4t.patch \ + file://cache-amnesia.patch \ + file://gfortran.patch \ + file://pr34130.patch \ + file://Makefile.in.patch \ " SRC_URI_avr32 = " http://ewi546.ewi.utwente.nl/tmp/avr32-gcc-4.2.1-atmel.1.0.3.tar.gz;name=atmel \ - file://gcc-pr32889.patch;patch=1 \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran.patch;patch=1 \ + file://gcc-pr32889.patch \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://402-libbackend_dep_gcov-iov.h.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://gcc41-configure.in.patch \ + file://zecke-xgcc-cpp.patch \ + file://cache-amnesia.patch \ + file://gfortran.patch \ " SRC_URI_append_ep93xx = " \ - file://arm-crunch-saveregs.patch;patch=1 \ - file://arm-crunch-20000320.patch;patch=1 \ - file://arm-crunch-compare.patch;patch=1 \ - file://arm-crunch-compare-unordered.patch;patch=1 \ - file://arm-crunch-compare-geu.patch;patch=1 \ - file://arm-crunch-eabi-ieee754.patch;patch=1 \ - file://arm-crunch-eabi-ieee754-div.patch;patch=1 \ - file://arm-crunch-64bit-disable0.patch;patch=1 \ - file://arm-crunch-offset.patch;patch=1 \ - file://arm-crunch-fp_consts.patch;patch=1 \ - file://arm-crunch-neg2.patch;patch=1 \ - file://arm-crunch-predicates3.patch;patch=1 \ - file://arm-crunch-cfcvtds-disable.patch;patch=1 \ - file://arm-crunch-floatsi-disable.patch;patch=1 \ - file://arm-crunch-truncsi-disable.patch;patch=1 \ - file://arm-crunch-cfcvt64-disable.patch;patch=1 \ - file://arm-crunch-cirrus-bugfixes.patch;patch=1 \ + file://arm-crunch-saveregs.patch \ + file://arm-crunch-20000320.patch \ + file://arm-crunch-compare.patch \ + file://arm-crunch-compare-unordered.patch \ + file://arm-crunch-compare-geu.patch \ + file://arm-crunch-eabi-ieee754.patch \ + file://arm-crunch-eabi-ieee754-div.patch \ + file://arm-crunch-64bit-disable0.patch \ + file://arm-crunch-offset.patch \ + file://arm-crunch-fp_consts.patch \ + file://arm-crunch-neg2.patch \ + file://arm-crunch-predicates3.patch \ + file://arm-crunch-cfcvtds-disable.patch \ + file://arm-crunch-floatsi-disable.patch \ + file://arm-crunch-truncsi-disable.patch \ + file://arm-crunch-cfcvt64-disable.patch \ + file://arm-crunch-cirrus-bugfixes.patch \ " PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}" -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.2.1/Makefile.in.patch b/recipes/gcc/gcc-4.2.1/Makefile.in.patch new file mode 100644 index 0000000000..6013f710c0 --- /dev/null +++ b/recipes/gcc/gcc-4.2.1/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.2.4/gcc/Makefile.in +=================================================================== +--- gcc-4.2.4.orig/gcc/Makefile.in ++++ gcc-4.2.4/gcc/Makefile.in +@@ -570,7 +570,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder \ + $(INHIBIT_LIBC_CFLAGS) +@@ -874,9 +874,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1485,7 +1489,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.2.2.inc b/recipes/gcc/gcc-4.2.2.inc index a7e24e9f1f..1c7f9d0a17 100644 --- a/recipes/gcc/gcc-4.2.2.inc +++ b/recipes/gcc/gcc-4.2.2.inc @@ -4,76 +4,77 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r16" +INC_PR = "r18" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://801-arm-bigendian-eabi.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ - file://pr34130.patch;patch=1 \ - file://fortran-static-linking.patch;patch=1 \ - file://intermask-bigendian.patch;patch=1 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://402-libbackend_dep_gcov-iov.h.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://801-arm-bigendian-eabi.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc41-configure.in.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://zecke-xgcc-cpp.patch \ + file://unbreak-armv4t.patch \ + file://cache-amnesia.patch \ + file://gfortran.patch \ + file://gcc-4.0.2-e300c2c3.patch \ + file://pr34130.patch \ + file://fortran-static-linking.patch \ + file://intermask-bigendian.patch \ + file://Makefile.in.patch \ " SRC_URI_append_avr32 = " \ - file://gcc-4.2.2.atmel.1.0.8.patch.bz2;patch=1 \ - file://901-avr32-fix-no-cond-exec-before-reload.patch;patch=1 \ - file://902-avr32-fix-sync-insn-instructions.patch;patch=1 \ - file://903-avr32-fix-removal-of-redundant-cast-operations.patch;patch=1 \ + file://gcc-4.2.2.atmel.1.0.8.patch.bz2 \ + file://901-avr32-fix-no-cond-exec-before-reload.patch \ + file://902-avr32-fix-sync-insn-instructions.patch \ + file://903-avr32-fix-removal-of-redundant-cast-operations.patch \ " SRC_URI_append_ep93xx = " \ - file://arm-crunch-saveregs.patch;patch=1 \ - file://arm-crunch-20000320.patch;patch=1 \ - file://arm-crunch-compare.patch;patch=1 \ - file://arm-crunch-compare-unordered.patch;patch=1 \ - file://arm-crunch-compare-geu.patch;patch=1 \ - file://arm-crunch-eabi-ieee754.patch;patch=1 \ - file://arm-crunch-eabi-ieee754-div.patch;patch=1 \ - file://arm-crunch-64bit-disable0.patch;patch=1 \ - file://arm-crunch-offset.patch;patch=1 \ - file://arm-crunch-fp_consts.patch;patch=1 \ - file://arm-crunch-neg2.patch;patch=1 \ - file://arm-crunch-predicates3.patch;patch=1 \ - file://arm-crunch-cfcvtds-disable.patch;patch=1 \ - file://arm-crunch-floatsi-disable.patch;patch=1 \ - file://arm-crunch-truncsi-disable.patch;patch=1 \ - file://arm-crunch-cfcvt64-disable.patch;patch=1 \ - file://arm-crunch-cirrus-bugfixes.patch;patch=1 \ + file://arm-crunch-saveregs.patch \ + file://arm-crunch-20000320.patch \ + file://arm-crunch-compare.patch \ + file://arm-crunch-compare-unordered.patch \ + file://arm-crunch-compare-geu.patch \ + file://arm-crunch-eabi-ieee754.patch \ + file://arm-crunch-eabi-ieee754-div.patch \ + file://arm-crunch-64bit-disable0.patch \ + file://arm-crunch-offset.patch \ + file://arm-crunch-fp_consts.patch \ + file://arm-crunch-neg2.patch \ + file://arm-crunch-predicates3.patch \ + file://arm-crunch-cfcvtds-disable.patch \ + file://arm-crunch-floatsi-disable.patch \ + file://arm-crunch-truncsi-disable.patch \ + file://arm-crunch-cfcvt64-disable.patch \ + file://arm-crunch-cirrus-bugfixes.patch \ " PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}" -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.2.2/Makefile.in.patch b/recipes/gcc/gcc-4.2.2/Makefile.in.patch new file mode 100644 index 0000000000..6013f710c0 --- /dev/null +++ b/recipes/gcc/gcc-4.2.2/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.2.4/gcc/Makefile.in +=================================================================== +--- gcc-4.2.4.orig/gcc/Makefile.in ++++ gcc-4.2.4/gcc/Makefile.in +@@ -570,7 +570,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder \ + $(INHIBIT_LIBC_CFLAGS) +@@ -874,9 +874,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1485,7 +1489,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.2.3.inc b/recipes/gcc/gcc-4.2.3.inc index 55db03b623..6d29b0e4dd 100644 --- a/recipes/gcc/gcc-4.2.3.inc +++ b/recipes/gcc/gcc-4.2.3.inc @@ -4,66 +4,67 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r17" +INC_PR = "r19" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://801-arm-bigendian-eabi.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ - file://fortran-static-linking.patch;patch=1 \ - file://intermask-bigendian.patch;patch=1 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://402-libbackend_dep_gcov-iov.h.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://801-arm-bigendian-eabi.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc41-configure.in.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://zecke-xgcc-cpp.patch \ + file://unbreak-armv4t.patch \ + file://cache-amnesia.patch \ + file://gfortran.patch \ + file://gcc-4.0.2-e300c2c3.patch \ + file://fortran-static-linking.patch \ + file://intermask-bigendian.patch \ + file://Makefile.in.patch \ " SRC_URI_append_ep93xx = " \ - file://arm-crunch-saveregs.patch;patch=1 \ - file://arm-crunch-20000320.patch;patch=1 \ - file://arm-crunch-compare.patch;patch=1 \ - file://arm-crunch-compare-unordered.patch;patch=1 \ - file://arm-crunch-compare-geu.patch;patch=1 \ - file://arm-crunch-eabi-ieee754.patch;patch=1 \ - file://arm-crunch-eabi-ieee754-div.patch;patch=1 \ - file://arm-crunch-64bit-disable0.patch;patch=1 \ - file://arm-crunch-offset.patch;patch=1 \ - file://arm-crunch-fp_consts.patch;patch=1 \ - file://arm-crunch-neg2.patch;patch=1 \ - file://arm-crunch-predicates3.patch;patch=1 \ - file://arm-crunch-cfcvtds-disable.patch;patch=1 \ - file://arm-crunch-floatsi-disable.patch;patch=1 \ - file://arm-crunch-truncsi-disable.patch;patch=1 \ - file://arm-crunch-cfcvt64-disable.patch;patch=1 \ - file://arm-crunch-cirrus-bugfixes.patch;patch=1 \ + file://arm-crunch-saveregs.patch \ + file://arm-crunch-20000320.patch \ + file://arm-crunch-compare.patch \ + file://arm-crunch-compare-unordered.patch \ + file://arm-crunch-compare-geu.patch \ + file://arm-crunch-eabi-ieee754.patch \ + file://arm-crunch-eabi-ieee754-div.patch \ + file://arm-crunch-64bit-disable0.patch \ + file://arm-crunch-offset.patch \ + file://arm-crunch-fp_consts.patch \ + file://arm-crunch-neg2.patch \ + file://arm-crunch-predicates3.patch \ + file://arm-crunch-cfcvtds-disable.patch \ + file://arm-crunch-floatsi-disable.patch \ + file://arm-crunch-truncsi-disable.patch \ + file://arm-crunch-cfcvt64-disable.patch \ + file://arm-crunch-cirrus-bugfixes.patch \ " PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}" -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.2.3/Makefile.in.patch b/recipes/gcc/gcc-4.2.3/Makefile.in.patch new file mode 100644 index 0000000000..6013f710c0 --- /dev/null +++ b/recipes/gcc/gcc-4.2.3/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.2.4/gcc/Makefile.in +=================================================================== +--- gcc-4.2.4.orig/gcc/Makefile.in ++++ gcc-4.2.4/gcc/Makefile.in +@@ -570,7 +570,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder \ + $(INHIBIT_LIBC_CFLAGS) +@@ -874,9 +874,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1485,7 +1489,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.2.4.inc b/recipes/gcc/gcc-4.2.4.inc index 8211c670de..db09c6e2e1 100644 --- a/recipes/gcc/gcc-4.2.4.inc +++ b/recipes/gcc/gcc-4.2.4.inc @@ -4,80 +4,94 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r10" +INC_PR = "r13" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://300-libstdc++-pic.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://801-arm-bigendian-eabi.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://unbreak-armv4t.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ - file://fortran-static-linking.patch;patch=1 \ - file://intermask-bigendian.patch;patch=1 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://300-libstdc++-pic.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://402-libbackend_dep_gcov-iov.h.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://801-arm-bigendian-eabi.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc41-configure.in.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://zecke-xgcc-cpp.patch \ + file://unbreak-armv4t.patch \ + file://cache-amnesia.patch \ + file://gfortran.patch \ + file://gcc-4.0.2-e300c2c3.patch \ + file://fortran-static-linking.patch \ + file://intermask-bigendian.patch \ + file://libstdc++-hack-libtool-remove-lstdc++.patch \ + file://Makefile.in.patch \ " SRC_URI_append_ep93xx = " \ - file://ep93xx/arm-crunch-readme.patch;patch=1 \ - file://ep93xx/arm-crunch-saveregs.patch;patch=1 \ - file://ep93xx/arm-crunch-scratch.patch;patch=1 \ - file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch;patch=1 \ - file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch;patch=1 \ - file://ep93xx/arm-crunch-20000320.patch;patch=1 \ - file://ep93xx/arm-crunch-disable-cmpdi.patch;patch=1 \ - file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch;patch=1 \ - file://ep93xx/arm-crunch-fp_consts.patch;patch=1 \ - file://ep93xx/arm-crunch-neg-enable.patch;patch=1 \ - file://ep93xx/arm-crunch-neg-protect.patch;patch=1 \ - file://ep93xx/arm-crunch-repair-truncxfsi.patch;patch=1 \ - file://ep93xx/arm-crunch-floatsi-no-scratch.patch;patch=1 \ - file://ep93xx/arm-crunch-movsf-movdf-Uy.patch;patch=1 \ - file://ep93xx/arm-crunch-drop-thumb2.patch;patch=1 \ - file://ep93xx/arm-crunch-arm_dbx_register_number.patch;patch=1 \ - file://ep93xx/arm-crunch-pipeline.patch;patch=1 \ - file://ep93xx/arm-crunch-ccmav-mode.patch;patch=1 \ - file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch;patch=1 \ - file://ep93xx/arm-crunch-mieee.patch;patch=1 \ - file://ep93xx/arm-size-bugfix.patch;patch=1 \ - file://ep93xx/arm-prologue_use-length.patch;patch=1 \ - file://ep93xx/arm-crunch-cftruncd32-attr.patch;patch=1 \ - file://ep93xx/arm-crunch-fix-cirrus-reorg7.patch;patch=1 \ - file://ep93xx/arm-crunch-cirrus-di-flag.patch;patch=1 \ - file://ep93xx/arm-crunch-disable-floatsi.patch;patch=1 \ + file://ep93xx/arm-crunch-readme.patch \ + file://ep93xx/arm-crunch-saveregs.patch \ + file://ep93xx/arm-crunch-scratch.patch \ + file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch \ + file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch \ + file://ep93xx/arm-crunch-20000320.patch \ + file://ep93xx/arm-crunch-disable-cmpdi.patch \ + file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch \ + file://ep93xx/arm-crunch-fp_consts.patch \ + file://ep93xx/arm-crunch-neg-enable.patch \ + file://ep93xx/arm-crunch-neg-protect.patch \ + file://ep93xx/arm-crunch-repair-truncxfsi.patch \ + file://ep93xx/arm-crunch-floatsi-no-scratch.patch \ + file://ep93xx/arm-crunch-movsf-movdf-Uy.patch \ + file://ep93xx/arm-crunch-drop-thumb2.patch \ + file://ep93xx/arm-crunch-arm_dbx_register_number.patch \ + file://ep93xx/arm-crunch-pipeline.patch \ + file://ep93xx/arm-crunch-ccmav-mode.patch \ + file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch \ + file://ep93xx/arm-crunch-mieee.patch \ + file://ep93xx/arm-size-bugfix.patch \ + file://ep93xx/arm-prologue_use-length.patch \ + file://ep93xx/arm-crunch-cftruncd32-attr.patch \ + file://ep93xx/arm-crunch-fix-cirrus-reorg7.patch \ + file://ep93xx/arm-crunch-cirrus-di-flag.patch \ + file://ep93xx/arm-crunch-disable-floatsi.patch \ " PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}" -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " -SRC_URI_append_sh4 = " file://sh_unwind.patch;patch=1 \ - file://cppdefault_cross.patch;patch=1 \ +SRC_URI_append_sh4 = " file://sh_unwind.patch \ + file://cppdefault_cross.patch \ " +# with sysroot this change is not needed for gcc 4.3+ but its needed +# for older compilers because of bug in libtool as well as this PR +# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5291 +# we append the .la munging specially for libstdc++ and libsupc++ here +# This change if needed for other compilers in use should be put +# in there specific inc file. +do_install_append () { + for d in ${target_libdir} ${target_libdir}/nof; do + sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-lm '|" ${D}$d/libsupc++.la || true + sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-lm '|" ${D}$d/libstdc++.la || true + done +} # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.2.4/Makefile.in.patch b/recipes/gcc/gcc-4.2.4/Makefile.in.patch new file mode 100644 index 0000000000..6013f710c0 --- /dev/null +++ b/recipes/gcc/gcc-4.2.4/Makefile.in.patch @@ -0,0 +1,38 @@ +Index: gcc-4.2.4/gcc/Makefile.in +=================================================================== +--- gcc-4.2.4.orig/gcc/Makefile.in ++++ gcc-4.2.4/gcc/Makefile.in +@@ -570,7 +570,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder \ + $(INHIBIT_LIBC_CFLAGS) +@@ -874,9 +874,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) +@@ -1485,7 +1489,7 @@ libgcc.a: $(LIBGCC_DEPS) + $(MAKE) \ + CFLAGS="$(CFLAGS) $(WARN_CFLAGS)" \ + CONFIG_H="$(TCONFIG_H)" TM_H="$(TM_H)" \ +- INCLUDES="$(INCLUDES)" \ ++ INCLUDES="$(TARGET_INCLUDES)" \ + MAKEOVERRIDES= \ + -f libgcc.mk all + diff --git a/recipes/gcc/gcc-4.2.4/libstdc++-hack-libtool-remove-lstdc++.patch b/recipes/gcc/gcc-4.2.4/libstdc++-hack-libtool-remove-lstdc++.patch new file mode 100644 index 0000000000..0987efab2b --- /dev/null +++ b/recipes/gcc/gcc-4.2.4/libstdc++-hack-libtool-remove-lstdc++.patch @@ -0,0 +1,18 @@ +This is a hacked backport of backport http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35942 +which is in no way similar in implementation but achieves same results. libtool in +gcc 4.2 does not have postdeps_CXX separated out so it can not be used. + +-Khem + +Index: gcc-4.2.4/Makefile.in +=================================================================== +--- gcc-4.2.4.orig/Makefile.in 2010-06-06 09:49:36.724619615 -0700 ++++ gcc-4.2.4/Makefile.in 2010-06-06 10:03:59.092090624 -0700 +@@ -33586,6 +33586,7 @@ all-target-libstdc++-v3: configure-targe + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ ++ sed -i 's|postdeps=\"-lstdc++|postdeps=\"|' $(TARGET_SUBDIR)/libstdc++-v3/libtool; \ + $(RAW_CXX_TARGET_EXPORTS) \ + (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' $(TARGET-target-libstdc++-v3)) diff --git a/recipes/gcc/gcc-4.3.1.inc b/recipes/gcc/gcc-4.3.1.inc index f7b4ee9d53..645c14a778 100644 --- a/recipes/gcc/gcc-4.3.1.inc +++ b/recipes/gcc/gcc-4.3.1.inc @@ -8,63 +8,67 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r20" +INC_PR = "r23" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \ - file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \ - file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \ - file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \ - file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \ - file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \ - file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \ - file://debian/pr30961.dpatch;patch=1;pnum=0 \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ -# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://arm-thumb.patch;patch=1 \ - file://arm-thumb-cache.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran-4.3.x.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ -# file://pr34130.patch;patch=1 \ -# file://fortran-static-linking.patch;patch=1 \ - file://gcc-arm-frename-registers.patch;patch=1 \ - file://gcc-release-branch/PR-36500-fix-neon.patch;patch=1 \ - file://gcc-4.3.1-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ + file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \ + file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \ + file://fedora/gcc43-java-nomulti.patch;striplevel=0 \ + file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \ + file://fedora/gcc43-pr27898.patch;striplevel=0 \ + file://fedora/gcc43-pr32139.patch;striplevel=0 \ + file://fedora/gcc43-pr33763.patch;striplevel=0 \ + file://fedora/gcc43-rh330771.patch;striplevel=0 \ + file://fedora/gcc43-rh341221.patch;striplevel=0 \ + file://fedora/gcc43-cpp-pragma.patch;striplevel=0 \ + file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \ + file://fedora/gcc43-libgomp-speedup.patch;striplevel=0 \ + file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \ + file://fedora/gcc43-rh251682.patch;striplevel=0 \ + file://debian/arm-unbreak-eabi-armv4t.dpatch;apply=yes \ + file://debian/armel-atomic-builtins.dpatch;apply=yes;striplevel=0 \ + file://debian/libstdc++-pic.dpatch;apply=yes;striplevel=0 \ + file://debian/gcc-ice-hack.dpatch;apply=yes;striplevel=0 \ + file://debian/pr30961.dpatch;apply=yes;striplevel=0 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ +# file://402-libbackend_dep_gcov-iov.h.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://arm-thumb.patch \ + file://arm-thumb-cache.patch \ + file://gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch \ + file://cache-amnesia.patch \ + file://gfortran-4.3.x.patch \ + file://gcc-4.0.2-e300c2c3.patch \ +# file://pr34130.patch \ +# file://fortran-static-linking.patch \ + file://gcc-arm-frename-registers.patch \ + file://gcc-release-branch/PR-36500-fix-neon.patch \ + file://gcc-4.3.1-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-4.3.x-fix-EXTRA_BUILD.patch \ + file://gcc-flags-for-build.patch \ + file://Makefile.in.patch \ " -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.3.1/Makefile.in.patch b/recipes/gcc/gcc-4.3.1/Makefile.in.patch new file mode 100644 index 0000000000..4c11a64b2d --- /dev/null +++ b/recipes/gcc/gcc-4.3.1/Makefile.in.patch @@ -0,0 +1,29 @@ +Index: gcc-4.3.1/gcc/Makefile.in +=================================================================== +--- gcc-4.3.1.orig/gcc/Makefile.in ++++ gcc-4.3.1/gcc/Makefile.in +@@ -575,7 +575,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -901,9 +901,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.3.1/debian/armel-atomic-builtins.dpatch b/recipes/gcc/gcc-4.3.1/debian/armel-atomic-builtins.dpatch new file mode 100644 index 0000000000..f514375a75 --- /dev/null +++ b/recipes/gcc/gcc-4.3.1/debian/armel-atomic-builtins.dpatch @@ -0,0 +1,350 @@ +#! /bin/sh -e + +# DP: Atomic builtins using kernel helpers for ARM Linux/EABI. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +This patch implements the atomic builtins described at: + + http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Atomic-Builtins.html + +for ARM EABI Linux. This implementation uses the kernel helpers +__kernel_cmpxchg and __kernel_dmb, and so should work on any +architecture which supports those. (More-efficient versions are possible +using ldrex/strex on architectures >=v6, but those are not written yet.) + +Atomic operations are provided for data sizes of 1, 2 and 4 bytes (but +not 8 bytes). The implementation uses actual functions +(__sync_fetch_and_add_2, etc.) rather than expanding code inline. + +Tested with cross to arm-none-linux-gnueabi, and with some additional +hand-written tests which hopefully exercised the atomicity of the +operations sufficiently. + +OK for mainline? + +Julian + +ChangeLog + + gcc/ + * config/arm/t-linux-eabi (LIB2FUNCS_STATIC_EXTRA): Add + config/arm/linux-atomic.c. + * config/arm/linux-atomic.c: New. + +Index: gcc/config/arm/linux-atomic.c +=================================================================== +--- gcc/config/arm/linux-atomic.c (revision 0) ++++ gcc/config/arm/linux-atomic.c (revision 0) +@@ -0,0 +1,280 @@ ++/* Linux-specific atomic operations for ARM EABI. ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ Contributed by CodeSourcery. ++ ++This file is part of GCC. ++ ++GCC 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, 51 Franklin Street, Fifth Floor, Boston, MA ++02110-1301, USA. */ ++ ++/* Kernel helper for compare-and-exchange. */ ++typedef int (__kernel_cmpxchg_t) (int oldval, int newval, int *ptr); ++#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0) ++ ++/* Kernel helper for memory barrier. */ ++typedef void (__kernel_dmb_t) (void); ++#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) ++ ++/* Note: we implement byte, short and int versions of atomic operations using ++ the above kernel helpers, but there is no support for "long long" (64-bit) ++ operations as yet. */ ++ ++#define HIDDEN __attribute__ ((visibility ("hidden"))) ++ ++#ifdef __ARMEL__ ++#define INVERT_MASK_1 0 ++#define INVERT_MASK_2 0 ++#else ++#define INVERT_MASK_1 24 ++#define INVERT_MASK_2 16 ++#endif ++ ++#define MASK_1 0xffu ++#define MASK_2 0xffffu ++ ++#define FETCH_AND_OP_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_fetch_and_##OP##_4 (int *ptr, int val) \ ++ { \ ++ int failure, tmp; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return tmp; \ ++ } ++ ++FETCH_AND_OP_WORD (add, , +) ++FETCH_AND_OP_WORD (sub, , -) ++FETCH_AND_OP_WORD (or, , |) ++FETCH_AND_OP_WORD (and, , &) ++FETCH_AND_OP_WORD (xor, , ^) ++FETCH_AND_OP_WORD (nand, ~, &) ++ ++#define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH ++#define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH ++ ++/* Implement both __sync_<op>_and_fetch and __sync_fetch_and_<op> for ++ subword-sized quantities. */ ++ ++#define SUBWORD_SYNC_OP(OP, PFX_OP, INF_OP, TYPE, WIDTH, RETURN) \ ++ TYPE HIDDEN \ ++ NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE val) \ ++ { \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ unsigned int mask, shift, oldval, newval; \ ++ int failure; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = ((PFX_OP ((oldval & mask) >> shift) \ ++ INF_OP (unsigned int) val) << shift) & mask; \ ++ newval |= oldval & ~mask; \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (RETURN & mask) >> shift; \ ++ } ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, oldval) ++ ++#define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_##OP##_and_fetch_4 (int *ptr, int val) \ ++ { \ ++ int tmp, failure; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return PFX_OP tmp INF_OP val; \ ++ } ++ ++OP_AND_FETCH_WORD (add, , +) ++OP_AND_FETCH_WORD (sub, , -) ++OP_AND_FETCH_WORD (or, , |) ++OP_AND_FETCH_WORD (and, , &) ++OP_AND_FETCH_WORD (xor, , ^) ++OP_AND_FETCH_WORD (nand, ~, &) ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, newval) ++ ++int HIDDEN ++__sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int actual_oldval, fail; ++ ++ while (1) ++ { ++ actual_oldval = *ptr; ++ ++ if (oldval != actual_oldval) ++ return actual_oldval; ++ ++ fail = __kernel_cmpxchg (actual_oldval, newval, ptr); ++ ++ if (!fail) ++ return oldval; ++ } ++} ++ ++#define SUBWORD_VAL_CAS(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ int *wordptr = (int *)((unsigned int) ptr & ~3), fail; \ ++ unsigned int mask, shift, actual_oldval, actual_newval; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ while (1) \ ++ { \ ++ actual_oldval = *wordptr; \ ++ \ ++ if (((actual_oldval & mask) >> shift) != (unsigned int) oldval) \ ++ return (actual_oldval & mask) >> shift; \ ++ \ ++ actual_newval = (actual_oldval & ~mask) \ ++ | (((unsigned int) newval << shift) & mask); \ ++ \ ++ fail = __kernel_cmpxchg (actual_oldval, actual_newval, \ ++ wordptr); \ ++ \ ++ if (!fail) \ ++ return oldval; \ ++ } \ ++ } ++ ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (char, 1) ++ ++typedef unsigned char bool; ++ ++bool HIDDEN ++__sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int failure = __kernel_cmpxchg (oldval, newval, ptr); ++ return (failure == 0); ++} ++ ++#define SUBWORD_BOOL_CAS(TYPE, WIDTH) \ ++ bool HIDDEN \ ++ __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ TYPE actual_oldval \ ++ = __sync_val_compare_and_swap_##WIDTH (ptr, oldval, newval); \ ++ return (oldval == actual_oldval); \ ++ } ++ ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (char, 1) ++ ++void HIDDEN ++__sync_synchronize (void) ++{ ++ __kernel_dmb (); ++} ++ ++int HIDDEN ++__sync_lock_test_and_set_4 (int *ptr, int val) ++{ ++ int failure, oldval; ++ ++ do { ++ oldval = *ptr; ++ failure = __kernel_cmpxchg (oldval, val, ptr); ++ } while (failure != 0); ++ ++ return oldval; ++} ++ ++#define SUBWORD_TEST_AND_SET(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_lock_test_and_set_##WIDTH (TYPE *ptr, TYPE val) \ ++ { \ ++ int failure; \ ++ unsigned int oldval, newval, shift, mask; \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = (oldval & ~mask) \ ++ | (((unsigned int) val << shift) & mask); \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (oldval & mask) >> shift; \ ++ } ++ ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (char, 1) ++ ++#define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ ++ void HIDDEN \ ++ __sync_lock_release_##WIDTH (TYPE *ptr) \ ++ { \ ++ *ptr = 0; \ ++ __kernel_dmb (); \ ++ } ++ ++SYNC_LOCK_RELEASE (int, 4) ++SYNC_LOCK_RELEASE (short, 2) ++SYNC_LOCK_RELEASE (char, 1) +Index: gcc/config/arm/t-linux-eabi +=================================================================== +--- gcc/config/arm/t-linux-eabi (revision 136167) ++++ gcc/config/arm/t-linux-eabi (working copy) +@@ -12,3 +12,5 @@ LIB1ASMFUNCS := $(filter-out _dvmd_tls,$ + # Multilib the standard Linux files. Don't include crti.o or crtn.o, + # which are provided by glibc. + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ++ ++LIB2FUNCS_STATIC_EXTRA += $(srcdir)/config/arm/linux-atomic.c + + diff --git a/recipes/gcc/gcc-4.3.1/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch b/recipes/gcc/gcc-4.3.1/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch new file mode 100644 index 0000000000..6849d46cd4 --- /dev/null +++ b/recipes/gcc/gcc-4.3.1/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch @@ -0,0 +1,52 @@ +--- gcc-4.4-20090519/gcc/config/arm/linux-eabi.h.~1~ 2007-11-08 14:44:09.000000000 +0100 ++++ gcc-4.4-20090519/gcc/config/arm/linux-eabi.h 2009-05-22 20:38:51.000000000 +0200 +@@ -72,6 +72,49 @@ + do not use -lfloat. */ + #undef LIBGCC_SPEC + ++/* Some symbols are only in the static libgcc. Override REAL_LIBGCC_SPEC ++ to always pass -lgcc to the linker, even for --shared-libgcc, otherwise ++ shared libraries break. */ ++#ifdef ENABLE_SHARED_LIBGCC ++ ++#ifndef USE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 0 ++#endif ++ ++#if USE_LD_AS_NEEDED ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed} \ ++ %{shared-libgcc:-lgcc_s -lgcc}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared: \ ++ %{!shared-libgcc:-lgcc -lgcc_eh} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" ++#endif ++ ++#ifdef LINK_EH_SPEC ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared: \ ++ %{!shared-libgcc:-lgcc} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared:-lgcc_s -lgcc}" /* always append -lgcc */ ++#endif ++ ++#define REAL_LIBGCC_SPEC " \ ++ %{static|static-libgcc:-lgcc -lgcc_eh} \ ++ %{!static:%{!static-libgcc: \ ++ "REAL_LIBGCC_SPEC_1" \ ++ "REAL_LIBGCC_SPEC_2" \ ++ }}" ++ ++#else /* !ENABLE_SHARED_LIBGCC */ ++ ++#define REAL_LIBGCC_SPEC " -lgcc " ++ ++#endif /* !ENABLE_SHARED_LIBGCC */ ++ + /* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ + #undef CLEAR_INSN_CACHE diff --git a/recipes/gcc/gcc-4.3.2.inc b/recipes/gcc/gcc-4.3.2.inc index 75dc0d7129..2d3118ce2b 100644 --- a/recipes/gcc/gcc-4.3.2.inc +++ b/recipes/gcc/gcc-4.3.2.inc @@ -8,62 +8,66 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r10" +INC_PR = "r13" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \ - file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \ - file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \ - file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \ - file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \ - file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \ - file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \ - file://debian/pr30961.dpatch;patch=1;pnum=0 \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran-4.3.x.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ -# file://pr34130.patch;patch=1 \ -# file://fortran-static-linking.patch;patch=1 \ - file://gcc-arm-frename-registers.patch;patch=1 \ - file://gcc-4.3.2-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ + file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \ + file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \ + file://fedora/gcc43-java-nomulti.patch;striplevel=0 \ + file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \ + file://fedora/gcc43-pr27898.patch;striplevel=0 \ + file://fedora/gcc43-pr32139.patch;striplevel=0 \ + file://fedora/gcc43-pr33763.patch;striplevel=0 \ + file://fedora/gcc43-rh330771.patch;striplevel=0 \ + file://fedora/gcc43-rh341221.patch;striplevel=0 \ + file://fedora/gcc43-cpp-pragma.patch;striplevel=0 \ + file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \ + file://fedora/gcc43-libgomp-speedup.patch;striplevel=0 \ + file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \ + file://fedora/gcc43-rh251682.patch;striplevel=0 \ + file://debian/arm-unbreak-eabi-armv4t.dpatch;apply=yes \ + file://debian/armel-atomic-builtins.dpatch;apply=yes;striplevel=0 \ + file://debian/libstdc++-pic.dpatch;apply=yes;striplevel=0 \ + file://debian/gcc-ice-hack.dpatch;apply=yes;striplevel=0 \ + file://debian/pr30961.dpatch;apply=yes;striplevel=0 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch \ + file://cache-amnesia.patch \ + file://gfortran-4.3.x.patch \ + file://gcc-4.0.2-e300c2c3.patch \ +# file://pr34130.patch \ +# file://fortran-static-linking.patch \ + file://gcc-arm-frename-registers.patch \ + file://gcc-4.3.2-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-4.3.x-fix-EXTRA_BUILD.patch \ + file://gcc-flags-for-build.patch \ + file://Makefile.in.patch \ " -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " -SRC_URI_append_sh4 = " file://sh_unwind.patch;patch=1 \ - file://gcc-4.2.3-linux-multilib-fix.patch;patch=1 \ +SRC_URI_append_sh4 = " file://sh_unwind.patch \ + file://gcc-4.2.3-linux-multilib-fix.patch \ " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.3.2/Makefile.in.patch b/recipes/gcc/gcc-4.3.2/Makefile.in.patch new file mode 100644 index 0000000000..4c11a64b2d --- /dev/null +++ b/recipes/gcc/gcc-4.3.2/Makefile.in.patch @@ -0,0 +1,29 @@ +Index: gcc-4.3.1/gcc/Makefile.in +=================================================================== +--- gcc-4.3.1.orig/gcc/Makefile.in ++++ gcc-4.3.1/gcc/Makefile.in +@@ -575,7 +575,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -901,9 +901,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.3.2/debian/armel-atomic-builtins.dpatch b/recipes/gcc/gcc-4.3.2/debian/armel-atomic-builtins.dpatch new file mode 100644 index 0000000000..f514375a75 --- /dev/null +++ b/recipes/gcc/gcc-4.3.2/debian/armel-atomic-builtins.dpatch @@ -0,0 +1,350 @@ +#! /bin/sh -e + +# DP: Atomic builtins using kernel helpers for ARM Linux/EABI. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +This patch implements the atomic builtins described at: + + http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Atomic-Builtins.html + +for ARM EABI Linux. This implementation uses the kernel helpers +__kernel_cmpxchg and __kernel_dmb, and so should work on any +architecture which supports those. (More-efficient versions are possible +using ldrex/strex on architectures >=v6, but those are not written yet.) + +Atomic operations are provided for data sizes of 1, 2 and 4 bytes (but +not 8 bytes). The implementation uses actual functions +(__sync_fetch_and_add_2, etc.) rather than expanding code inline. + +Tested with cross to arm-none-linux-gnueabi, and with some additional +hand-written tests which hopefully exercised the atomicity of the +operations sufficiently. + +OK for mainline? + +Julian + +ChangeLog + + gcc/ + * config/arm/t-linux-eabi (LIB2FUNCS_STATIC_EXTRA): Add + config/arm/linux-atomic.c. + * config/arm/linux-atomic.c: New. + +Index: gcc/config/arm/linux-atomic.c +=================================================================== +--- gcc/config/arm/linux-atomic.c (revision 0) ++++ gcc/config/arm/linux-atomic.c (revision 0) +@@ -0,0 +1,280 @@ ++/* Linux-specific atomic operations for ARM EABI. ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ Contributed by CodeSourcery. ++ ++This file is part of GCC. ++ ++GCC 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, 51 Franklin Street, Fifth Floor, Boston, MA ++02110-1301, USA. */ ++ ++/* Kernel helper for compare-and-exchange. */ ++typedef int (__kernel_cmpxchg_t) (int oldval, int newval, int *ptr); ++#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0) ++ ++/* Kernel helper for memory barrier. */ ++typedef void (__kernel_dmb_t) (void); ++#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) ++ ++/* Note: we implement byte, short and int versions of atomic operations using ++ the above kernel helpers, but there is no support for "long long" (64-bit) ++ operations as yet. */ ++ ++#define HIDDEN __attribute__ ((visibility ("hidden"))) ++ ++#ifdef __ARMEL__ ++#define INVERT_MASK_1 0 ++#define INVERT_MASK_2 0 ++#else ++#define INVERT_MASK_1 24 ++#define INVERT_MASK_2 16 ++#endif ++ ++#define MASK_1 0xffu ++#define MASK_2 0xffffu ++ ++#define FETCH_AND_OP_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_fetch_and_##OP##_4 (int *ptr, int val) \ ++ { \ ++ int failure, tmp; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return tmp; \ ++ } ++ ++FETCH_AND_OP_WORD (add, , +) ++FETCH_AND_OP_WORD (sub, , -) ++FETCH_AND_OP_WORD (or, , |) ++FETCH_AND_OP_WORD (and, , &) ++FETCH_AND_OP_WORD (xor, , ^) ++FETCH_AND_OP_WORD (nand, ~, &) ++ ++#define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH ++#define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH ++ ++/* Implement both __sync_<op>_and_fetch and __sync_fetch_and_<op> for ++ subword-sized quantities. */ ++ ++#define SUBWORD_SYNC_OP(OP, PFX_OP, INF_OP, TYPE, WIDTH, RETURN) \ ++ TYPE HIDDEN \ ++ NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE val) \ ++ { \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ unsigned int mask, shift, oldval, newval; \ ++ int failure; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = ((PFX_OP ((oldval & mask) >> shift) \ ++ INF_OP (unsigned int) val) << shift) & mask; \ ++ newval |= oldval & ~mask; \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (RETURN & mask) >> shift; \ ++ } ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, oldval) ++ ++#define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_##OP##_and_fetch_4 (int *ptr, int val) \ ++ { \ ++ int tmp, failure; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return PFX_OP tmp INF_OP val; \ ++ } ++ ++OP_AND_FETCH_WORD (add, , +) ++OP_AND_FETCH_WORD (sub, , -) ++OP_AND_FETCH_WORD (or, , |) ++OP_AND_FETCH_WORD (and, , &) ++OP_AND_FETCH_WORD (xor, , ^) ++OP_AND_FETCH_WORD (nand, ~, &) ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, newval) ++ ++int HIDDEN ++__sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int actual_oldval, fail; ++ ++ while (1) ++ { ++ actual_oldval = *ptr; ++ ++ if (oldval != actual_oldval) ++ return actual_oldval; ++ ++ fail = __kernel_cmpxchg (actual_oldval, newval, ptr); ++ ++ if (!fail) ++ return oldval; ++ } ++} ++ ++#define SUBWORD_VAL_CAS(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ int *wordptr = (int *)((unsigned int) ptr & ~3), fail; \ ++ unsigned int mask, shift, actual_oldval, actual_newval; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ while (1) \ ++ { \ ++ actual_oldval = *wordptr; \ ++ \ ++ if (((actual_oldval & mask) >> shift) != (unsigned int) oldval) \ ++ return (actual_oldval & mask) >> shift; \ ++ \ ++ actual_newval = (actual_oldval & ~mask) \ ++ | (((unsigned int) newval << shift) & mask); \ ++ \ ++ fail = __kernel_cmpxchg (actual_oldval, actual_newval, \ ++ wordptr); \ ++ \ ++ if (!fail) \ ++ return oldval; \ ++ } \ ++ } ++ ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (char, 1) ++ ++typedef unsigned char bool; ++ ++bool HIDDEN ++__sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int failure = __kernel_cmpxchg (oldval, newval, ptr); ++ return (failure == 0); ++} ++ ++#define SUBWORD_BOOL_CAS(TYPE, WIDTH) \ ++ bool HIDDEN \ ++ __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ TYPE actual_oldval \ ++ = __sync_val_compare_and_swap_##WIDTH (ptr, oldval, newval); \ ++ return (oldval == actual_oldval); \ ++ } ++ ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (char, 1) ++ ++void HIDDEN ++__sync_synchronize (void) ++{ ++ __kernel_dmb (); ++} ++ ++int HIDDEN ++__sync_lock_test_and_set_4 (int *ptr, int val) ++{ ++ int failure, oldval; ++ ++ do { ++ oldval = *ptr; ++ failure = __kernel_cmpxchg (oldval, val, ptr); ++ } while (failure != 0); ++ ++ return oldval; ++} ++ ++#define SUBWORD_TEST_AND_SET(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_lock_test_and_set_##WIDTH (TYPE *ptr, TYPE val) \ ++ { \ ++ int failure; \ ++ unsigned int oldval, newval, shift, mask; \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = (oldval & ~mask) \ ++ | (((unsigned int) val << shift) & mask); \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (oldval & mask) >> shift; \ ++ } ++ ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (char, 1) ++ ++#define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ ++ void HIDDEN \ ++ __sync_lock_release_##WIDTH (TYPE *ptr) \ ++ { \ ++ *ptr = 0; \ ++ __kernel_dmb (); \ ++ } ++ ++SYNC_LOCK_RELEASE (int, 4) ++SYNC_LOCK_RELEASE (short, 2) ++SYNC_LOCK_RELEASE (char, 1) +Index: gcc/config/arm/t-linux-eabi +=================================================================== +--- gcc/config/arm/t-linux-eabi (revision 136167) ++++ gcc/config/arm/t-linux-eabi (working copy) +@@ -12,3 +12,5 @@ LIB1ASMFUNCS := $(filter-out _dvmd_tls,$ + # Multilib the standard Linux files. Don't include crti.o or crtn.o, + # which are provided by glibc. + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ++ ++LIB2FUNCS_STATIC_EXTRA += $(srcdir)/config/arm/linux-atomic.c + + diff --git a/recipes/gcc/gcc-4.3.2/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch b/recipes/gcc/gcc-4.3.2/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch new file mode 100644 index 0000000000..6849d46cd4 --- /dev/null +++ b/recipes/gcc/gcc-4.3.2/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch @@ -0,0 +1,52 @@ +--- gcc-4.4-20090519/gcc/config/arm/linux-eabi.h.~1~ 2007-11-08 14:44:09.000000000 +0100 ++++ gcc-4.4-20090519/gcc/config/arm/linux-eabi.h 2009-05-22 20:38:51.000000000 +0200 +@@ -72,6 +72,49 @@ + do not use -lfloat. */ + #undef LIBGCC_SPEC + ++/* Some symbols are only in the static libgcc. Override REAL_LIBGCC_SPEC ++ to always pass -lgcc to the linker, even for --shared-libgcc, otherwise ++ shared libraries break. */ ++#ifdef ENABLE_SHARED_LIBGCC ++ ++#ifndef USE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 0 ++#endif ++ ++#if USE_LD_AS_NEEDED ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed} \ ++ %{shared-libgcc:-lgcc_s -lgcc}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared: \ ++ %{!shared-libgcc:-lgcc -lgcc_eh} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" ++#endif ++ ++#ifdef LINK_EH_SPEC ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared: \ ++ %{!shared-libgcc:-lgcc} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared:-lgcc_s -lgcc}" /* always append -lgcc */ ++#endif ++ ++#define REAL_LIBGCC_SPEC " \ ++ %{static|static-libgcc:-lgcc -lgcc_eh} \ ++ %{!static:%{!static-libgcc: \ ++ "REAL_LIBGCC_SPEC_1" \ ++ "REAL_LIBGCC_SPEC_2" \ ++ }}" ++ ++#else /* !ENABLE_SHARED_LIBGCC */ ++ ++#define REAL_LIBGCC_SPEC " -lgcc " ++ ++#endif /* !ENABLE_SHARED_LIBGCC */ ++ + /* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ + #undef CLEAR_INSN_CACHE diff --git a/recipes/gcc/gcc-4.3.3.inc b/recipes/gcc/gcc-4.3.3.inc index d4b82dcedc..11d09fa2e3 100644 --- a/recipes/gcc/gcc-4.3.3.inc +++ b/recipes/gcc/gcc-4.3.3.inc @@ -8,91 +8,96 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r11" +INC_PR = "r16" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \ - file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \ - file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \ - file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \ - file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \ - file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \ - file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \ - file://debian/pr30961.dpatch;patch=1;pnum=0 \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran-4.3.x.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ -# file://pr34130.patch;patch=1 \ -# file://fortran-static-linking.patch;patch=1 \ - file://gcc-arm-frename-registers.patch;patch=1 \ - file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ - file://arm-gcc-objective.patch;patch=1 \ + file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \ + file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \ + file://fedora/gcc43-java-nomulti.patch;striplevel=0 \ + file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \ + file://fedora/gcc43-pr27898.patch;striplevel=0 \ + file://fedora/gcc43-pr32139.patch;striplevel=0 \ + file://fedora/gcc43-pr33763.patch;striplevel=0 \ + file://fedora/gcc43-rh330771.patch;striplevel=0 \ + file://fedora/gcc43-rh341221.patch;striplevel=0 \ + file://fedora/gcc43-cpp-pragma.patch;striplevel=0 \ + file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \ + file://fedora/gcc43-libgomp-speedup.patch;striplevel=0 \ + file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \ + file://fedora/gcc43-rh251682.patch;striplevel=0 \ + file://debian/arm-unbreak-eabi-armv4t.dpatch;apply=yes \ + file://debian/armel-atomic-builtins.dpatch;apply=yes;striplevel=0 \ + file://debian/libstdc++-pic.dpatch;apply=yes;striplevel=0 \ + file://debian/gcc-ice-hack.dpatch;apply=yes;striplevel=0 \ + file://debian/pr30961.dpatch;apply=yes;striplevel=0 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch \ + file://cache-amnesia.patch \ + file://gfortran-4.3.x.patch \ + file://gcc-4.0.2-e300c2c3.patch \ +# file://pr34130.patch \ +# file://fortran-static-linking.patch \ + file://gcc-arm-frename-registers.patch \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-flags-for-build.patch \ + file://gcc-pr36218.patch \ + file://gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://gcc-4.3.3-fix-EXTRA_BUILD.patch \ + file://arm-gcc-objective.patch \ + file://Makefile.in.patch \ " -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " -SRC_URI_append_sh4 = " file://sh_unwind.patch;patch=1 \ - file://gcc-4.2.3-linux-multilib-fix.patch;patch=1 \ +SRC_URI_append_sh4 = " file://sh_unwind.patch \ + file://gcc-4.2.3-linux-multilib-fix.patch \ " SRC_URI_append_ep93xx = " \ - file://ep93xx/arm-crunch-readme.patch;patch=1 \ - file://ep93xx/arm-crunch-saveregs.patch;patch=1 \ - file://ep93xx/arm-crunch-scratch.patch;patch=1 \ - file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch;patch=1 \ - file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch;patch=1 \ - file://ep93xx/arm-crunch-20000320.patch;patch=1 \ - file://ep93xx/arm-crunch-disable-cmpdi.patch;patch=1 \ - file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch;patch=1 \ - file://ep93xx/arm-crunch-fp_consts.patch;patch=1 \ - file://ep93xx/arm-crunch-neg-enable.patch;patch=1 \ - file://ep93xx/arm-crunch-neg-protect.patch;patch=1 \ - file://ep93xx/arm-crunch-repair-truncxfsi.patch;patch=1 \ - file://ep93xx/arm-crunch-floatsi-no-scratch.patch;patch=1 \ - file://ep93xx/arm-crunch-movsf-movdf-Uy.patch;patch=1 \ - file://ep93xx/arm-crunch-drop-thumb2.patch;patch=1 \ - file://ep93xx/arm-crunch-arm_dbx_register_number.patch;patch=1 \ - file://ep93xx/arm-crunch-pipeline.patch;patch=1 \ - file://ep93xx/arm-crunch-ccmav-mode.patch;patch=1 \ - file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch;patch=1 \ - file://ep93xx/arm-crunch-mieee.patch;patch=1 \ - file://ep93xx/arm-size-bugfix.patch;patch=1 \ - file://ep93xx/arm-prologue_use-length.patch;patch=1 \ - file://ep93xx/arm-crunch-cftruncd32-attr.patch;patch=1 \ - file://ep93xx/arm-crunch-fix-cirrus-reorg7.patch;patch=1 \ - file://ep93xx/arm-crunch-cirrus-di-flag.patch;patch=1 \ - file://ep93xx/arm-crunch-disable-floatsi.patch;patch=1 \ + file://ep93xx/arm-crunch-readme.patch \ + file://ep93xx/arm-crunch-saveregs.patch \ + file://ep93xx/arm-crunch-scratch.patch \ + file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch \ + file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch \ + file://ep93xx/arm-crunch-20000320.patch \ + file://ep93xx/arm-crunch-disable-cmpdi.patch \ + file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch \ + file://ep93xx/arm-crunch-fp_consts.patch \ + file://ep93xx/arm-crunch-neg-enable.patch \ + file://ep93xx/arm-crunch-neg-protect.patch \ + file://ep93xx/arm-crunch-repair-truncxfsi.patch \ + file://ep93xx/arm-crunch-floatsi-no-scratch.patch \ + file://ep93xx/arm-crunch-movsf-movdf-Uy.patch \ + file://ep93xx/arm-crunch-drop-thumb2.patch \ + file://ep93xx/arm-crunch-arm_dbx_register_number.patch \ + file://ep93xx/arm-crunch-pipeline.patch \ + file://ep93xx/arm-crunch-ccmav-mode.patch \ + file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch \ + file://ep93xx/arm-crunch-mieee.patch \ + file://ep93xx/arm-size-bugfix.patch \ + file://ep93xx/arm-prologue_use-length.patch \ + file://ep93xx/arm-crunch-cftruncd32-attr.patch \ + file://ep93xx/arm-crunch-fix-cirrus-reorg7.patch \ + file://ep93xx/arm-crunch-cirrus-di-flag.patch \ + file://ep93xx/arm-crunch-disable-floatsi.patch \ " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.3.3/Makefile.in.patch b/recipes/gcc/gcc-4.3.3/Makefile.in.patch new file mode 100644 index 0000000000..4c11a64b2d --- /dev/null +++ b/recipes/gcc/gcc-4.3.3/Makefile.in.patch @@ -0,0 +1,29 @@ +Index: gcc-4.3.1/gcc/Makefile.in +=================================================================== +--- gcc-4.3.1.orig/gcc/Makefile.in ++++ gcc-4.3.1/gcc/Makefile.in +@@ -575,7 +575,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -901,9 +901,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.3.3/debian/armel-atomic-builtins.dpatch b/recipes/gcc/gcc-4.3.3/debian/armel-atomic-builtins.dpatch new file mode 100644 index 0000000000..f514375a75 --- /dev/null +++ b/recipes/gcc/gcc-4.3.3/debian/armel-atomic-builtins.dpatch @@ -0,0 +1,350 @@ +#! /bin/sh -e + +# DP: Atomic builtins using kernel helpers for ARM Linux/EABI. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +This patch implements the atomic builtins described at: + + http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Atomic-Builtins.html + +for ARM EABI Linux. This implementation uses the kernel helpers +__kernel_cmpxchg and __kernel_dmb, and so should work on any +architecture which supports those. (More-efficient versions are possible +using ldrex/strex on architectures >=v6, but those are not written yet.) + +Atomic operations are provided for data sizes of 1, 2 and 4 bytes (but +not 8 bytes). The implementation uses actual functions +(__sync_fetch_and_add_2, etc.) rather than expanding code inline. + +Tested with cross to arm-none-linux-gnueabi, and with some additional +hand-written tests which hopefully exercised the atomicity of the +operations sufficiently. + +OK for mainline? + +Julian + +ChangeLog + + gcc/ + * config/arm/t-linux-eabi (LIB2FUNCS_STATIC_EXTRA): Add + config/arm/linux-atomic.c. + * config/arm/linux-atomic.c: New. + +Index: gcc/config/arm/linux-atomic.c +=================================================================== +--- gcc/config/arm/linux-atomic.c (revision 0) ++++ gcc/config/arm/linux-atomic.c (revision 0) +@@ -0,0 +1,280 @@ ++/* Linux-specific atomic operations for ARM EABI. ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ Contributed by CodeSourcery. ++ ++This file is part of GCC. ++ ++GCC 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, 51 Franklin Street, Fifth Floor, Boston, MA ++02110-1301, USA. */ ++ ++/* Kernel helper for compare-and-exchange. */ ++typedef int (__kernel_cmpxchg_t) (int oldval, int newval, int *ptr); ++#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0) ++ ++/* Kernel helper for memory barrier. */ ++typedef void (__kernel_dmb_t) (void); ++#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) ++ ++/* Note: we implement byte, short and int versions of atomic operations using ++ the above kernel helpers, but there is no support for "long long" (64-bit) ++ operations as yet. */ ++ ++#define HIDDEN __attribute__ ((visibility ("hidden"))) ++ ++#ifdef __ARMEL__ ++#define INVERT_MASK_1 0 ++#define INVERT_MASK_2 0 ++#else ++#define INVERT_MASK_1 24 ++#define INVERT_MASK_2 16 ++#endif ++ ++#define MASK_1 0xffu ++#define MASK_2 0xffffu ++ ++#define FETCH_AND_OP_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_fetch_and_##OP##_4 (int *ptr, int val) \ ++ { \ ++ int failure, tmp; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return tmp; \ ++ } ++ ++FETCH_AND_OP_WORD (add, , +) ++FETCH_AND_OP_WORD (sub, , -) ++FETCH_AND_OP_WORD (or, , |) ++FETCH_AND_OP_WORD (and, , &) ++FETCH_AND_OP_WORD (xor, , ^) ++FETCH_AND_OP_WORD (nand, ~, &) ++ ++#define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH ++#define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH ++ ++/* Implement both __sync_<op>_and_fetch and __sync_fetch_and_<op> for ++ subword-sized quantities. */ ++ ++#define SUBWORD_SYNC_OP(OP, PFX_OP, INF_OP, TYPE, WIDTH, RETURN) \ ++ TYPE HIDDEN \ ++ NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE val) \ ++ { \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ unsigned int mask, shift, oldval, newval; \ ++ int failure; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = ((PFX_OP ((oldval & mask) >> shift) \ ++ INF_OP (unsigned int) val) << shift) & mask; \ ++ newval |= oldval & ~mask; \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (RETURN & mask) >> shift; \ ++ } ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, oldval) ++ ++#define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_##OP##_and_fetch_4 (int *ptr, int val) \ ++ { \ ++ int tmp, failure; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return PFX_OP tmp INF_OP val; \ ++ } ++ ++OP_AND_FETCH_WORD (add, , +) ++OP_AND_FETCH_WORD (sub, , -) ++OP_AND_FETCH_WORD (or, , |) ++OP_AND_FETCH_WORD (and, , &) ++OP_AND_FETCH_WORD (xor, , ^) ++OP_AND_FETCH_WORD (nand, ~, &) ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, newval) ++ ++int HIDDEN ++__sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int actual_oldval, fail; ++ ++ while (1) ++ { ++ actual_oldval = *ptr; ++ ++ if (oldval != actual_oldval) ++ return actual_oldval; ++ ++ fail = __kernel_cmpxchg (actual_oldval, newval, ptr); ++ ++ if (!fail) ++ return oldval; ++ } ++} ++ ++#define SUBWORD_VAL_CAS(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ int *wordptr = (int *)((unsigned int) ptr & ~3), fail; \ ++ unsigned int mask, shift, actual_oldval, actual_newval; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ while (1) \ ++ { \ ++ actual_oldval = *wordptr; \ ++ \ ++ if (((actual_oldval & mask) >> shift) != (unsigned int) oldval) \ ++ return (actual_oldval & mask) >> shift; \ ++ \ ++ actual_newval = (actual_oldval & ~mask) \ ++ | (((unsigned int) newval << shift) & mask); \ ++ \ ++ fail = __kernel_cmpxchg (actual_oldval, actual_newval, \ ++ wordptr); \ ++ \ ++ if (!fail) \ ++ return oldval; \ ++ } \ ++ } ++ ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (char, 1) ++ ++typedef unsigned char bool; ++ ++bool HIDDEN ++__sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int failure = __kernel_cmpxchg (oldval, newval, ptr); ++ return (failure == 0); ++} ++ ++#define SUBWORD_BOOL_CAS(TYPE, WIDTH) \ ++ bool HIDDEN \ ++ __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ TYPE actual_oldval \ ++ = __sync_val_compare_and_swap_##WIDTH (ptr, oldval, newval); \ ++ return (oldval == actual_oldval); \ ++ } ++ ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (char, 1) ++ ++void HIDDEN ++__sync_synchronize (void) ++{ ++ __kernel_dmb (); ++} ++ ++int HIDDEN ++__sync_lock_test_and_set_4 (int *ptr, int val) ++{ ++ int failure, oldval; ++ ++ do { ++ oldval = *ptr; ++ failure = __kernel_cmpxchg (oldval, val, ptr); ++ } while (failure != 0); ++ ++ return oldval; ++} ++ ++#define SUBWORD_TEST_AND_SET(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_lock_test_and_set_##WIDTH (TYPE *ptr, TYPE val) \ ++ { \ ++ int failure; \ ++ unsigned int oldval, newval, shift, mask; \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = (oldval & ~mask) \ ++ | (((unsigned int) val << shift) & mask); \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (oldval & mask) >> shift; \ ++ } ++ ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (char, 1) ++ ++#define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ ++ void HIDDEN \ ++ __sync_lock_release_##WIDTH (TYPE *ptr) \ ++ { \ ++ *ptr = 0; \ ++ __kernel_dmb (); \ ++ } ++ ++SYNC_LOCK_RELEASE (int, 4) ++SYNC_LOCK_RELEASE (short, 2) ++SYNC_LOCK_RELEASE (char, 1) +Index: gcc/config/arm/t-linux-eabi +=================================================================== +--- gcc/config/arm/t-linux-eabi (revision 136167) ++++ gcc/config/arm/t-linux-eabi (working copy) +@@ -12,3 +12,5 @@ LIB1ASMFUNCS := $(filter-out _dvmd_tls,$ + # Multilib the standard Linux files. Don't include crti.o or crtn.o, + # which are provided by glibc. + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ++ ++LIB2FUNCS_STATIC_EXTRA += $(srcdir)/config/arm/linux-atomic.c + + diff --git a/recipes/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/recipes/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch index 1d3936bc39..951e6838b4 100644 --- a/recipes/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch +++ b/recipes/gcc/gcc-4.3.3/gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch @@ -71,9 +71,9 @@ gcc: Index: gcc-4.3.3/configure.ac =================================================================== ---- gcc-4.3.3.orig/configure.ac 2008-02-01 20:29:30.000000000 -0700 -+++ gcc-4.3.3/configure.ac 2009-04-29 18:03:50.025603468 -0700 -@@ -1667,6 +1667,38 @@ +--- gcc-4.3.3.orig/configure.ac 2010-05-16 23:25:38.000000000 -0700 ++++ gcc-4.3.3/configure.ac 2010-05-16 23:26:54.363020511 -0700 +@@ -1667,6 +1667,38 @@ AC_ARG_WITH([debug-prefix-map], [DEBUG_PREFIX_CFLAGS_FOR_TARGET=]) AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET) @@ -114,17 +114,9 @@ Index: gcc-4.3.3/configure.ac if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then Index: gcc-4.3.3/Makefile.def =================================================================== ---- gcc-4.3.3.orig/Makefile.def 2007-10-23 08:53:18.000000000 -0700 -+++ gcc-4.3.3/Makefile.def 2009-04-29 18:03:50.029603058 -0700 -@@ -214,6 +214,7 @@ - flags_to_pass = { flag= INSTALL_DATA ; }; - flags_to_pass = { flag= INSTALL_PROGRAM ; }; - flags_to_pass = { flag= INSTALL_SCRIPT ; }; -+flags_to_pass = { flag= LDFLAGS_FOR_BUILD ; }; - flags_to_pass = { flag= LEX ; }; - flags_to_pass = { flag= M4 ; }; - flags_to_pass = { flag= MAKE ; }; -@@ -511,43 +512,51 @@ +--- gcc-4.3.3.orig/Makefile.def 2010-05-16 23:25:38.000000000 -0700 ++++ gcc-4.3.3/Makefile.def 2010-05-16 23:26:54.363020511 -0700 +@@ -513,43 +513,51 @@ bootstrap_stage = { // compiler probably has never heard of them. stage_configure_flags='--disable-intermodule $(STAGE1_CHECKING) \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ; @@ -186,9 +178,9 @@ Index: gcc-4.3.3/Makefile.def + stage_libcflags='$(STAGE3_LIBCFLAGS) -fprofile-use' ; }; Index: gcc-4.3.3/Makefile.tpl =================================================================== ---- gcc-4.3.3.orig/Makefile.tpl 2008-08-16 00:28:01.000000000 -0700 -+++ gcc-4.3.3/Makefile.tpl 2009-04-29 18:04:16.836611837 -0700 -@@ -23,6 +23,14 @@ +--- gcc-4.3.3.orig/Makefile.tpl 2010-05-16 23:25:38.000000000 -0700 ++++ gcc-4.3.3/Makefile.tpl 2010-05-16 23:56:35.720617708 -0700 +@@ -23,6 +23,14 @@ in # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # @@ -203,21 +195,7 @@ Index: gcc-4.3.3/Makefile.tpl # ------------------------------- # Standard Autoconf-set variables # ------------------------------- -@@ -139,6 +147,13 @@ - WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ - WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; - -+# These variables must be set on the make command line for directories -+# built for the build system to override those in BASE_FLAGS_TO_PASSS. -+EXTRA_BUILD_FLAGS = \ -+ CFLAGS="$(CFLAGS_FOR_BUILD)" \ -+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \ -+ LIBCFLAGS="" -+ - # This is the list of directories to built for the host system. - SUBDIRS = @configdirs@ - # This is set by the configure script to the arguments to use when configuring -@@ -153,6 +168,7 @@ +@@ -159,6 +167,7 @@ HOST_SUBDIR = @host_subdir@ HOST_EXPORTS = \ $(BASE_EXPORTS) \ CC="$(CC)"; export CC; \ @@ -225,10 +203,10 @@ Index: gcc-4.3.3/Makefile.tpl CFLAGS="$(CFLAGS)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CXX="$(CXX)"; export CXX; \ -@@ -207,10 +223,10 @@ - AR="$(AR_FOR_TARGET)"; export AR; \ +@@ -214,10 +223,10 @@ BASE_TARGET_EXPORTS = \ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ + CPP="$(CC_FOR_TARGET) -E"; export CPP; \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ @@ -238,7 +216,7 @@ Index: gcc-4.3.3/Makefile.tpl GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ -@@ -323,7 +339,6 @@ +@@ -331,7 +340,6 @@ LDFLAGS = @LDFLAGS@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates @@ -246,7 +224,7 @@ Index: gcc-4.3.3/Makefile.tpl # Only build the C compiler for stage1, because that is the only one that # we can guarantee will build with the native compiler, and also it is the -@@ -331,14 +346,19 @@ +@@ -339,14 +347,19 @@ PICFLAG = # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them # overrideable (for a bootstrap build stage1 also builds gcc.info). @@ -267,7 +245,7 @@ Index: gcc-4.3.3/Makefile.tpl do-compare = @do_compare@ do-compare3 = $(do-compare) do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2 -@@ -377,22 +397,14 @@ +@@ -385,22 +398,14 @@ COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_ COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@ @@ -290,11 +268,11 @@ Index: gcc-4.3.3/Makefile.tpl LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -LDFLAGS_FOR_TARGET = -PICFLAG_FOR_TARGET = -+LDFLAGS_FOR_TARGET = @LDFLAGS@ ++LDFLAGS_FOR_TARGET = # ------------------------------------ # Miscellaneous targets and flag lists -@@ -492,19 +504,20 @@ +@@ -500,19 +505,20 @@ POSTSTAGE1_FLAGS_TO_PASS = \ # Flags to pass down to makes which are built with the target environment. # The double $ decreases the length of the command line; those variables # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The @@ -320,7 +298,7 @@ Index: gcc-4.3.3/Makefile.tpl 'NM=$(COMPILER_NM_FOR_TARGET)' \ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ 'RANLIB=$$(RANLIB_FOR_TARGET)' \ -@@ -852,9 +865,11 @@ +@@ -860,9 +866,11 @@ configure-stage[+id+]-[+prefix+][+module fi; \ [+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \ [+exports+][+ IF prev +] \ @@ -334,7 +312,7 @@ Index: gcc-4.3.3/Makefile.tpl echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \ $(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \ cd [+subdir+]/[+module+] || exit 1; \ -@@ -891,7 +906,8 @@ +@@ -899,7 +907,8 @@ all-[+prefix+][+module+]: configure-[+pr s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ [+exports+] \ (cd [+subdir+]/[+module+] && \ @@ -344,7 +322,7 @@ Index: gcc-4.3.3/Makefile.tpl @endif [+prefix+][+module+] [+ IF bootstrap +] -@@ -911,8 +927,11 @@ +@@ -919,8 +928,11 @@ all-stage[+id+]-[+prefix+][+module+]: co [+exports+][+ IF prev +] \ [+poststage1_exports+][+ ENDIF prev +] \ cd [+subdir+]/[+module+] && \ @@ -358,17 +336,7 @@ Index: gcc-4.3.3/Makefile.tpl IF prev +][+poststage1_args+][+ ENDIF prev +] [+extra_make_flags+] \ $(TARGET-stage[+id+]-[+prefix+][+module+]) -@@ -945,7 +964,8 @@ - target_alias=(get "target" "${target_alias}") - args="$(BUILD_CONFIGARGS)" no-config-site=true +] - --[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +] -+[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" -+ args="$(EXTRA_BUILD_FLAGS)" +] - [+ ENDFOR build_module +] - - # -------------------------------------- -@@ -962,7 +982,7 @@ +@@ -971,7 +983,7 @@ clean-stage[+id+]-[+prefix+][+module+]: [+ all prefix="" subdir="$(HOST_SUBDIR)" exports="$(HOST_EXPORTS)" poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)" @@ -377,7 +345,7 @@ Index: gcc-4.3.3/Makefile.tpl poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +] .PHONY: check-[+module+] maybe-check-[+module+] -@@ -1060,7 +1080,7 @@ +@@ -1069,7 +1081,7 @@ maybe-[+make_target+]-[+module+]: [+make [+ all prefix="target-" subdir="$(TARGET_SUBDIR)" exports="$(RAW_CXX_TARGET_EXPORTS)" @@ -386,7 +354,7 @@ Index: gcc-4.3.3/Makefile.tpl [+ ELSE +] [+ configure prefix="target-" subdir="$(TARGET_SUBDIR)" check_multilibs=true -@@ -1071,7 +1091,7 @@ +@@ -1080,7 +1092,7 @@ maybe-[+make_target+]-[+module+]: [+make [+ all prefix="target-" subdir="$(TARGET_SUBDIR)" exports="$(NORMAL_TARGET_EXPORTS)" @@ -395,7 +363,7 @@ Index: gcc-4.3.3/Makefile.tpl [+ ENDIF +] .PHONY: check-target-[+module+] maybe-check-target-[+module+] -@@ -1301,7 +1321,7 @@ +@@ -1310,7 +1322,7 @@ stage[+id+]-end:: [+ FOR host_modules +] # Bubble a bug fix through all the stages up to stage [+id+]. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -404,7 +372,7 @@ Index: gcc-4.3.3/Makefile.tpl .PHONY: stage[+id+]-bubble stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +] @r=`${PWD_COMMAND}`; export r; \ -@@ -1440,11 +1460,11 @@ +@@ -1449,11 +1461,11 @@ stage_current: @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi .PHONY: restrap @@ -418,7 +386,7 @@ Index: gcc-4.3.3/Makefile.tpl @endif gcc-bootstrap # -------------------------------------- -@@ -1475,7 +1495,7 @@ +@@ -1484,7 +1496,7 @@ configure-target-[+module+]: maybe-all-g [+ ;; These Scheme functions build the bulk of the dependencies. ;; dep-target builds a string like "maybe-all-MODULE_KIND-gcc", @@ -427,7 +395,7 @@ Index: gcc-4.3.3/Makefile.tpl ;; is taken from VAR-NAME. (define dep-target (lambda (module-kind var-name hard) (string-append -@@ -1633,7 +1653,8 @@ +@@ -1642,7 +1654,8 @@ config.status: configure # Rebuilding configure. AUTOCONF = autoconf @@ -440,7 +408,7 @@ Index: gcc-4.3.3/Makefile.tpl Index: gcc-4.3.3/config/mh-ppc-darwin =================================================================== --- gcc-4.3.3.orig/config/mh-ppc-darwin 2007-05-23 07:26:31.000000000 -0700 -+++ gcc-4.3.3/config/mh-ppc-darwin 2009-04-29 18:03:50.057603252 -0700 ++++ gcc-4.3.3/config/mh-ppc-darwin 2010-05-16 23:26:54.363020511 -0700 @@ -2,5 +2,4 @@ # position-independent-code -- the usual default on Darwin. This fix speeds # compiles by 3-5%. @@ -450,9 +418,9 @@ Index: gcc-4.3.3/config/mh-ppc-darwin +BOOT_CFLAGS=-g -O2 -mdynamic-no-pic Index: gcc-4.3.3/gcc/doc/install.texi =================================================================== ---- gcc-4.3.3.orig/gcc/doc/install.texi 2009-01-06 17:52:26.000000000 -0700 -+++ gcc-4.3.3/gcc/doc/install.texi 2009-04-29 18:03:50.065603803 -0700 -@@ -1778,33 +1778,35 @@ +--- gcc-4.3.3.orig/gcc/doc/install.texi 2009-01-06 16:52:26.000000000 -0800 ++++ gcc-4.3.3/gcc/doc/install.texi 2010-05-16 23:26:54.363020511 -0700 +@@ -1778,33 +1778,35 @@ same described above, but object files f stage2 of the 3-stage bootstrap of the compiler are deleted as soon as they are no longer needed. @@ -513,7 +481,7 @@ Index: gcc-4.3.3/gcc/doc/install.texi If you used the flag @option{--enable-languages=@dots{}} to restrict the compilers to be built, only those you've actually enabled will be -@@ -2687,8 +2689,8 @@ +@@ -2687,8 +2689,8 @@ new version of DEC Unix, you should rebu stamp. @samp{make compare} may fail on old versions of DEC Unix unless you add @@ -526,8 +494,8 @@ Index: gcc-4.3.3/gcc/doc/install.texi fixed name to be used for the assembler input file, instead of a Index: gcc-4.3.3/Makefile.in =================================================================== ---- gcc-4.3.3.orig/Makefile.in 2008-08-16 00:28:01.000000000 -0700 -+++ gcc-4.3.3/Makefile.in 2009-04-29 18:04:32.133111439 -0700 +--- gcc-4.3.3.orig/Makefile.in 2010-05-16 23:25:38.000000000 -0700 ++++ gcc-4.3.3/Makefile.in 2010-05-16 23:56:50.000000000 -0700 @@ -20,6 +20,14 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # @@ -543,21 +511,7 @@ Index: gcc-4.3.3/Makefile.in # ------------------------------- # Standard Autoconf-set variables # ------------------------------- -@@ -136,6 +144,13 @@ - WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ - WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; - -+# These variables must be set on the make command line for directories -+# built for the build system to override those in BASE_FLAGS_TO_PASSS. -+EXTRA_BUILD_FLAGS = \ -+ CFLAGS="$(CFLAGS_FOR_BUILD)" \ -+ LDFLAGS="$(LDFLAGS_FOR_BUILD)" \ -+ LIBCFLAGS="" -+ - # This is the list of directories to built for the host system. - SUBDIRS = @configdirs@ - # This is set by the configure script to the arguments to use when configuring -@@ -150,6 +165,7 @@ +@@ -156,6 +164,7 @@ HOST_SUBDIR = @host_subdir@ HOST_EXPORTS = \ $(BASE_EXPORTS) \ CC="$(CC)"; export CC; \ @@ -565,10 +519,10 @@ Index: gcc-4.3.3/Makefile.in CFLAGS="$(CFLAGS)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CXX="$(CXX)"; export CXX; \ -@@ -204,10 +220,10 @@ - AR="$(AR_FOR_TARGET)"; export AR; \ +@@ -211,10 +220,10 @@ BASE_TARGET_EXPORTS = \ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ + CPP="$(CC_FOR_TARGET) -E"; export CPP; \ - CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ @@ -578,7 +532,7 @@ Index: gcc-4.3.3/Makefile.in GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ -@@ -320,7 +336,6 @@ +@@ -328,7 +337,6 @@ LDFLAGS = @LDFLAGS@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates @@ -586,7 +540,7 @@ Index: gcc-4.3.3/Makefile.in # Only build the C compiler for stage1, because that is the only one that # we can guarantee will build with the native compiler, and also it is the -@@ -328,14 +343,19 @@ +@@ -336,14 +344,19 @@ PICFLAG = # MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them # overrideable (for a bootstrap build stage1 also builds gcc.info). @@ -607,7 +561,7 @@ Index: gcc-4.3.3/Makefile.in do-compare = @do_compare@ do-compare3 = $(do-compare) do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2 -@@ -374,22 +394,14 @@ +@@ -382,22 +395,14 @@ COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_ COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@ @@ -630,19 +584,11 @@ Index: gcc-4.3.3/Makefile.in LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -LDFLAGS_FOR_TARGET = -PICFLAG_FOR_TARGET = -+LDFLAGS_FOR_TARGET = @LDFLAGS@ ++LDFLAGS_FOR_TARGET = # ------------------------------------ # Miscellaneous targets and flag lists -@@ -496,6 +508,7 @@ - "INSTALL_DATA=$(INSTALL_DATA)" \ - "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ - "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ -+ "LDFLAGS_FOR_BUILD=$(LDFLAGS_FOR_BUILD)" \ - "LEX=$(LEX)" \ - "M4=$(M4)" \ - "MAKE=$(MAKE)" \ -@@ -592,19 +605,20 @@ +@@ -602,19 +607,20 @@ POSTSTAGE1_FLAGS_TO_PASS = \ # Flags to pass down to makes which are built with the target environment. # The double $ decreases the length of the command line; those variables # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The @@ -668,77 +614,77 @@ Index: gcc-4.3.3/Makefile.in 'NM=$(COMPILER_NM_FOR_TARGET)' \ 'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \ 'RANLIB=$$(RANLIB_FOR_TARGET)' \ -@@ -2738,7 +2752,8 @@ +@@ -2748,7 +2754,8 @@ all-build-libiberty: configure-build-lib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/libiberty && \ -- $(MAKE) $(TARGET-build-libiberty)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-libiberty)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-libiberty)) @endif build-libiberty -@@ -2793,7 +2808,8 @@ +@@ -2803,7 +2810,8 @@ all-build-bison: configure-build-bison s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/bison && \ -- $(MAKE) $(TARGET-build-bison)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-bison)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-bison)) @endif build-bison -@@ -2848,7 +2864,8 @@ +@@ -2858,7 +2866,8 @@ all-build-byacc: configure-build-byacc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/byacc && \ -- $(MAKE) $(TARGET-build-byacc)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-byacc)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-byacc)) @endif build-byacc -@@ -2903,7 +2920,8 @@ +@@ -2913,7 +2922,8 @@ all-build-flex: configure-build-flex s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/flex && \ -- $(MAKE) $(TARGET-build-flex)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-flex)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-flex)) @endif build-flex -@@ -2958,7 +2976,8 @@ +@@ -2968,7 +2978,8 @@ all-build-m4: configure-build-m4 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/m4 && \ -- $(MAKE) $(TARGET-build-m4)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-m4)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-m4)) @endif build-m4 -@@ -3013,7 +3032,8 @@ +@@ -3023,7 +3034,8 @@ all-build-texinfo: configure-build-texin s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/texinfo && \ -- $(MAKE) $(TARGET-build-texinfo)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-texinfo)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-texinfo)) @endif build-texinfo -@@ -3068,7 +3088,8 @@ +@@ -3078,7 +3090,8 @@ all-build-fixincludes: configure-build-f s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(BUILD_EXPORTS) \ (cd $(BUILD_SUBDIR)/fixincludes && \ -- $(MAKE) $(TARGET-build-fixincludes)) +- $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-fixincludes)) + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \ + $(TARGET-build-fixincludes)) @endif build-fixincludes -@@ -3127,7 +3148,8 @@ +@@ -3137,7 +3150,8 @@ all-ash: configure-ash s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/ash && \ @@ -748,7 +694,7 @@ Index: gcc-4.3.3/Makefile.in @endif ash -@@ -3551,7 +3573,8 @@ +@@ -3561,7 +3575,8 @@ all-autoconf: configure-autoconf s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/autoconf && \ @@ -758,7 +704,7 @@ Index: gcc-4.3.3/Makefile.in @endif autoconf -@@ -3975,7 +3998,8 @@ +@@ -3985,7 +4000,8 @@ all-automake: configure-automake s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/automake && \ @@ -768,7 +714,7 @@ Index: gcc-4.3.3/Makefile.in @endif automake -@@ -4399,7 +4423,8 @@ +@@ -4409,7 +4425,8 @@ all-bash: configure-bash s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bash && \ @@ -778,7 +724,7 @@ Index: gcc-4.3.3/Makefile.in @endif bash -@@ -4816,9 +4841,9 @@ +@@ -4826,9 +4843,9 @@ configure-stage1-bfd: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ @@ -790,7 +736,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -4847,9 +4872,9 @@ +@@ -4857,9 +4874,9 @@ configure-stage2-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -802,7 +748,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -4878,9 +4903,9 @@ +@@ -4888,9 +4905,9 @@ configure-stageb2g0-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -814,7 +760,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -4909,9 +4934,9 @@ +@@ -4919,9 +4936,9 @@ configure-stage3-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -826,7 +772,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -4940,9 +4965,9 @@ +@@ -4950,9 +4967,9 @@ configure-stageb3g2-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -838,7 +784,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -4971,9 +4996,9 @@ +@@ -4981,9 +4998,9 @@ configure-stage4-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -850,7 +796,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -5002,9 +5027,9 @@ +@@ -5012,9 +5029,9 @@ configure-stageprofile-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -862,7 +808,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -5033,9 +5058,9 @@ +@@ -5043,9 +5060,9 @@ configure-stagefeedback-bfd: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -874,7 +820,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \ cd $(HOST_SUBDIR)/bfd || exit 1; \ -@@ -5070,7 +5095,8 @@ +@@ -5080,7 +5097,8 @@ all-bfd: configure-bfd s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bfd && \ @@ -884,7 +830,7 @@ Index: gcc-4.3.3/Makefile.in @endif bfd -@@ -5089,8 +5115,11 @@ +@@ -5099,8 +5117,11 @@ all-stage1-bfd: configure-stage1-bfd s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -898,7 +844,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-bfd) maybe-clean-stage1-bfd: clean-stage1-bfd -@@ -5103,7 +5132,7 @@ +@@ -5113,7 +5134,7 @@ clean-stage1-bfd: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -907,7 +853,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif bfd-bootstrap -@@ -5123,8 +5152,11 @@ +@@ -5133,8 +5154,11 @@ all-stage2-bfd: configure-stage2-bfd $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -921,7 +867,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-bfd) maybe-clean-stage2-bfd: clean-stage2-bfd -@@ -5137,7 +5169,7 @@ +@@ -5147,7 +5171,7 @@ clean-stage2-bfd: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -930,7 +876,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5158,8 +5190,11 @@ +@@ -5168,8 +5192,11 @@ all-stageb2g0-bfd: configure-stageb2g0-b $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -944,7 +890,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-bfd) maybe-clean-stageb2g0-bfd: clean-stageb2g0-bfd -@@ -5172,7 +5207,7 @@ +@@ -5182,7 +5209,7 @@ clean-stageb2g0-bfd: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -953,7 +899,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5193,8 +5228,11 @@ +@@ -5203,8 +5230,11 @@ all-stage3-bfd: configure-stage3-bfd $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -967,7 +913,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-bfd) maybe-clean-stage3-bfd: clean-stage3-bfd -@@ -5207,7 +5245,7 @@ +@@ -5217,7 +5247,7 @@ clean-stage3-bfd: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -976,7 +922,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5228,8 +5266,11 @@ +@@ -5238,8 +5268,11 @@ all-stageb3g2-bfd: configure-stageb3g2-b $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -990,7 +936,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-bfd) maybe-clean-stageb3g2-bfd: clean-stageb3g2-bfd -@@ -5242,7 +5283,7 @@ +@@ -5252,7 +5285,7 @@ clean-stageb3g2-bfd: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -999,7 +945,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5263,8 +5304,11 @@ +@@ -5273,8 +5306,11 @@ all-stage4-bfd: configure-stage4-bfd $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -1013,7 +959,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-bfd) maybe-clean-stage4-bfd: clean-stage4-bfd -@@ -5277,7 +5321,7 @@ +@@ -5287,7 +5323,7 @@ clean-stage4-bfd: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -1022,7 +968,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5298,8 +5342,11 @@ +@@ -5308,8 +5344,11 @@ all-stageprofile-bfd: configure-stagepro $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -1036,7 +982,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-bfd) maybe-clean-stageprofile-bfd: clean-stageprofile-bfd -@@ -5312,7 +5359,7 @@ +@@ -5322,7 +5361,7 @@ clean-stageprofile-bfd: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -1045,7 +991,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5333,8 +5380,11 @@ +@@ -5343,8 +5382,11 @@ all-stagefeedback-bfd: configure-stagefe $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/bfd && \ @@ -1059,7 +1005,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-bfd) maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd -@@ -5347,7 +5397,7 @@ +@@ -5357,7 +5399,7 @@ clean-stagefeedback-bfd: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/bfd && \ @@ -1068,7 +1014,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif bfd-bootstrap -@@ -5754,9 +5804,9 @@ +@@ -5764,9 +5806,9 @@ configure-stage1-opcodes: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ @@ -1080,7 +1026,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5785,9 +5835,9 @@ +@@ -5795,9 +5837,9 @@ configure-stage2-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1092,7 +1038,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5816,9 +5866,9 @@ +@@ -5826,9 +5868,9 @@ configure-stageb2g0-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1104,7 +1050,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5847,9 +5897,9 @@ +@@ -5857,9 +5899,9 @@ configure-stage3-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1116,7 +1062,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5878,9 +5928,9 @@ +@@ -5888,9 +5930,9 @@ configure-stageb3g2-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1128,7 +1074,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5909,9 +5959,9 @@ +@@ -5919,9 +5961,9 @@ configure-stage4-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1140,7 +1086,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5940,9 +5990,9 @@ +@@ -5950,9 +5992,9 @@ configure-stageprofile-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1152,7 +1098,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -5971,9 +6021,9 @@ +@@ -5981,9 +6023,9 @@ configure-stagefeedback-opcodes: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1164,7 +1110,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \ cd $(HOST_SUBDIR)/opcodes || exit 1; \ -@@ -6008,7 +6058,8 @@ +@@ -6018,7 +6060,8 @@ all-opcodes: configure-opcodes s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/opcodes && \ @@ -1174,7 +1120,7 @@ Index: gcc-4.3.3/Makefile.in @endif opcodes -@@ -6027,8 +6078,11 @@ +@@ -6037,8 +6080,11 @@ all-stage1-opcodes: configure-stage1-opc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1188,7 +1134,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-opcodes) maybe-clean-stage1-opcodes: clean-stage1-opcodes -@@ -6041,7 +6095,7 @@ +@@ -6051,7 +6097,7 @@ clean-stage1-opcodes: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1197,7 +1143,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif opcodes-bootstrap -@@ -6061,8 +6115,11 @@ +@@ -6071,8 +6117,11 @@ all-stage2-opcodes: configure-stage2-opc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1211,7 +1157,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-opcodes) maybe-clean-stage2-opcodes: clean-stage2-opcodes -@@ -6075,7 +6132,7 @@ +@@ -6085,7 +6134,7 @@ clean-stage2-opcodes: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1220,7 +1166,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6096,8 +6153,11 @@ +@@ -6106,8 +6155,11 @@ all-stageb2g0-opcodes: configure-stageb2 $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1234,7 +1180,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-opcodes) maybe-clean-stageb2g0-opcodes: clean-stageb2g0-opcodes -@@ -6110,7 +6170,7 @@ +@@ -6120,7 +6172,7 @@ clean-stageb2g0-opcodes: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1243,7 +1189,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6131,8 +6191,11 @@ +@@ -6141,8 +6193,11 @@ all-stage3-opcodes: configure-stage3-opc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1257,7 +1203,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-opcodes) maybe-clean-stage3-opcodes: clean-stage3-opcodes -@@ -6145,7 +6208,7 @@ +@@ -6155,7 +6210,7 @@ clean-stage3-opcodes: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1266,7 +1212,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6166,8 +6229,11 @@ +@@ -6176,8 +6231,11 @@ all-stageb3g2-opcodes: configure-stageb3 $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1280,7 +1226,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-opcodes) maybe-clean-stageb3g2-opcodes: clean-stageb3g2-opcodes -@@ -6180,7 +6246,7 @@ +@@ -6190,7 +6248,7 @@ clean-stageb3g2-opcodes: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1289,7 +1235,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6201,8 +6267,11 @@ +@@ -6211,8 +6269,11 @@ all-stage4-opcodes: configure-stage4-opc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1303,7 +1249,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-opcodes) maybe-clean-stage4-opcodes: clean-stage4-opcodes -@@ -6215,7 +6284,7 @@ +@@ -6225,7 +6286,7 @@ clean-stage4-opcodes: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1312,7 +1258,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6236,8 +6305,11 @@ +@@ -6246,8 +6307,11 @@ all-stageprofile-opcodes: configure-stag $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1326,7 +1272,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-opcodes) maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes -@@ -6250,7 +6322,7 @@ +@@ -6260,7 +6324,7 @@ clean-stageprofile-opcodes: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1335,7 +1281,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6271,8 +6343,11 @@ +@@ -6281,8 +6345,11 @@ all-stagefeedback-opcodes: configure-sta $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1349,7 +1295,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-opcodes) maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes -@@ -6285,7 +6360,7 @@ +@@ -6295,7 +6362,7 @@ clean-stagefeedback-opcodes: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/opcodes && \ @@ -1358,7 +1304,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif opcodes-bootstrap -@@ -6692,9 +6767,9 @@ +@@ -6702,9 +6769,9 @@ configure-stage1-binutils: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ @@ -1370,7 +1316,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6723,9 +6798,9 @@ +@@ -6733,9 +6800,9 @@ configure-stage2-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1382,7 +1328,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6754,9 +6829,9 @@ +@@ -6764,9 +6831,9 @@ configure-stageb2g0-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1394,7 +1340,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6785,9 +6860,9 @@ +@@ -6795,9 +6862,9 @@ configure-stage3-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1406,7 +1352,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6816,9 +6891,9 @@ +@@ -6826,9 +6893,9 @@ configure-stageb3g2-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1418,7 +1364,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6847,9 +6922,9 @@ +@@ -6857,9 +6924,9 @@ configure-stage4-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1430,7 +1376,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6878,9 +6953,9 @@ +@@ -6888,9 +6955,9 @@ configure-stageprofile-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1442,7 +1388,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6909,9 +6984,9 @@ +@@ -6919,9 +6986,9 @@ configure-stagefeedback-binutils: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1454,7 +1400,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \ cd $(HOST_SUBDIR)/binutils || exit 1; \ -@@ -6946,7 +7021,8 @@ +@@ -6956,7 +7023,8 @@ all-binutils: configure-binutils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/binutils && \ @@ -1464,7 +1410,7 @@ Index: gcc-4.3.3/Makefile.in @endif binutils -@@ -6965,8 +7041,11 @@ +@@ -6975,8 +7043,11 @@ all-stage1-binutils: configure-stage1-bi s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1478,7 +1424,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-binutils) maybe-clean-stage1-binutils: clean-stage1-binutils -@@ -6979,7 +7058,7 @@ +@@ -6989,7 +7060,7 @@ clean-stage1-binutils: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1487,7 +1433,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif binutils-bootstrap -@@ -6999,8 +7078,11 @@ +@@ -7009,8 +7080,11 @@ all-stage2-binutils: configure-stage2-bi $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1501,7 +1447,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-binutils) maybe-clean-stage2-binutils: clean-stage2-binutils -@@ -7013,7 +7095,7 @@ +@@ -7023,7 +7097,7 @@ clean-stage2-binutils: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1510,7 +1456,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7034,8 +7116,11 @@ +@@ -7044,8 +7118,11 @@ all-stageb2g0-binutils: configure-stageb $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1524,7 +1470,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-binutils) maybe-clean-stageb2g0-binutils: clean-stageb2g0-binutils -@@ -7048,7 +7133,7 @@ +@@ -7058,7 +7135,7 @@ clean-stageb2g0-binutils: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1533,7 +1479,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7069,8 +7154,11 @@ +@@ -7079,8 +7156,11 @@ all-stage3-binutils: configure-stage3-bi $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1547,7 +1493,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-binutils) maybe-clean-stage3-binutils: clean-stage3-binutils -@@ -7083,7 +7171,7 @@ +@@ -7093,7 +7173,7 @@ clean-stage3-binutils: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1556,7 +1502,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7104,8 +7192,11 @@ +@@ -7114,8 +7194,11 @@ all-stageb3g2-binutils: configure-stageb $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1570,7 +1516,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-binutils) maybe-clean-stageb3g2-binutils: clean-stageb3g2-binutils -@@ -7118,7 +7209,7 @@ +@@ -7128,7 +7211,7 @@ clean-stageb3g2-binutils: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1579,7 +1525,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7139,8 +7230,11 @@ +@@ -7149,8 +7232,11 @@ all-stage4-binutils: configure-stage4-bi $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1593,7 +1539,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-binutils) maybe-clean-stage4-binutils: clean-stage4-binutils -@@ -7153,7 +7247,7 @@ +@@ -7163,7 +7249,7 @@ clean-stage4-binutils: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1602,7 +1548,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7174,8 +7268,11 @@ +@@ -7184,8 +7270,11 @@ all-stageprofile-binutils: configure-sta $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1616,7 +1562,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-binutils) maybe-clean-stageprofile-binutils: clean-stageprofile-binutils -@@ -7188,7 +7285,7 @@ +@@ -7198,7 +7287,7 @@ clean-stageprofile-binutils: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1625,7 +1571,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7209,8 +7306,11 @@ +@@ -7219,8 +7308,11 @@ all-stagefeedback-binutils: configure-st $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/binutils && \ @@ -1639,7 +1585,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-binutils) maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils -@@ -7223,7 +7323,7 @@ +@@ -7233,7 +7325,7 @@ clean-stagefeedback-binutils: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/binutils && \ @@ -1648,7 +1594,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif binutils-bootstrap -@@ -7637,7 +7737,8 @@ +@@ -7647,7 +7739,8 @@ all-bison: configure-bison s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bison && \ @@ -1658,7 +1604,7 @@ Index: gcc-4.3.3/Makefile.in @endif bison -@@ -8064,7 +8165,8 @@ +@@ -8074,7 +8167,8 @@ all-byacc: configure-byacc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/byacc && \ @@ -1668,7 +1614,7 @@ Index: gcc-4.3.3/Makefile.in @endif byacc -@@ -8491,7 +8593,8 @@ +@@ -8501,7 +8595,8 @@ all-bzip2: configure-bzip2 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/bzip2 && \ @@ -1678,7 +1624,7 @@ Index: gcc-4.3.3/Makefile.in @endif bzip2 -@@ -8915,7 +9018,8 @@ +@@ -8925,7 +9020,8 @@ all-dejagnu: configure-dejagnu s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/dejagnu && \ @@ -1688,7 +1634,7 @@ Index: gcc-4.3.3/Makefile.in @endif dejagnu -@@ -9339,7 +9443,8 @@ +@@ -9349,7 +9445,8 @@ all-diff: configure-diff s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/diff && \ @@ -1698,7 +1644,7 @@ Index: gcc-4.3.3/Makefile.in @endif diff -@@ -9763,7 +9868,8 @@ +@@ -9773,7 +9870,8 @@ all-dosutils: configure-dosutils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/dosutils && \ @@ -1708,7 +1654,7 @@ Index: gcc-4.3.3/Makefile.in @endif dosutils -@@ -10181,7 +10287,8 @@ +@@ -10191,7 +10289,8 @@ all-etc: configure-etc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/etc && \ @@ -1718,7 +1664,7 @@ Index: gcc-4.3.3/Makefile.in @endif etc -@@ -10605,7 +10712,8 @@ +@@ -10615,7 +10714,8 @@ all-fastjar: configure-fastjar s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/fastjar && \ @@ -1728,7 +1674,7 @@ Index: gcc-4.3.3/Makefile.in @endif fastjar -@@ -11032,7 +11140,8 @@ +@@ -11042,7 +11142,8 @@ all-fileutils: configure-fileutils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/fileutils && \ @@ -1738,7 +1684,7 @@ Index: gcc-4.3.3/Makefile.in @endif fileutils -@@ -11456,7 +11565,8 @@ +@@ -11466,7 +11567,8 @@ all-findutils: configure-findutils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/findutils && \ @@ -1748,7 +1694,7 @@ Index: gcc-4.3.3/Makefile.in @endif findutils -@@ -11880,7 +11990,8 @@ +@@ -11890,7 +11992,8 @@ all-find: configure-find s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/find && \ @@ -1758,7 +1704,7 @@ Index: gcc-4.3.3/Makefile.in @endif find -@@ -12304,7 +12415,8 @@ +@@ -12314,7 +12417,8 @@ all-fixincludes: configure-fixincludes s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/fixincludes && \ @@ -1768,7 +1714,7 @@ Index: gcc-4.3.3/Makefile.in @endif fixincludes -@@ -12712,7 +12824,8 @@ +@@ -12722,7 +12826,8 @@ all-flex: configure-flex s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/flex && \ @@ -1778,7 +1724,7 @@ Index: gcc-4.3.3/Makefile.in @endif flex -@@ -13132,9 +13245,9 @@ +@@ -13142,9 +13247,9 @@ configure-stage1-gas: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ @@ -1790,7 +1736,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13163,9 +13276,9 @@ +@@ -13173,9 +13278,9 @@ configure-stage2-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1802,7 +1748,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13194,9 +13307,9 @@ +@@ -13204,9 +13309,9 @@ configure-stageb2g0-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1814,7 +1760,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13225,9 +13338,9 @@ +@@ -13235,9 +13340,9 @@ configure-stage3-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1826,7 +1772,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13256,9 +13369,9 @@ +@@ -13266,9 +13371,9 @@ configure-stageb3g2-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1838,7 +1784,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13287,9 +13400,9 @@ +@@ -13297,9 +13402,9 @@ configure-stage4-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1850,7 +1796,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13318,9 +13431,9 @@ +@@ -13328,9 +13433,9 @@ configure-stageprofile-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1862,7 +1808,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13349,9 +13462,9 @@ +@@ -13359,9 +13464,9 @@ configure-stagefeedback-gas: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -1874,7 +1820,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \ cd $(HOST_SUBDIR)/gas || exit 1; \ -@@ -13386,7 +13499,8 @@ +@@ -13396,7 +13501,8 @@ all-gas: configure-gas s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gas && \ @@ -1884,7 +1830,7 @@ Index: gcc-4.3.3/Makefile.in @endif gas -@@ -13405,8 +13519,11 @@ +@@ -13415,8 +13521,11 @@ all-stage1-gas: configure-stage1-gas s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -1898,7 +1844,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-gas) maybe-clean-stage1-gas: clean-stage1-gas -@@ -13419,7 +13536,7 @@ +@@ -13429,7 +13538,7 @@ clean-stage1-gas: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -1907,7 +1853,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif gas-bootstrap -@@ -13439,8 +13556,11 @@ +@@ -13449,8 +13558,11 @@ all-stage2-gas: configure-stage2-gas $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -1921,7 +1867,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-gas) maybe-clean-stage2-gas: clean-stage2-gas -@@ -13453,7 +13573,7 @@ +@@ -13463,7 +13575,7 @@ clean-stage2-gas: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -1930,7 +1876,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -13474,8 +13594,11 @@ +@@ -13484,8 +13596,11 @@ all-stageb2g0-gas: configure-stageb2g0-g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -1944,7 +1890,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-gas) maybe-clean-stageb2g0-gas: clean-stageb2g0-gas -@@ -13488,7 +13611,7 @@ +@@ -13498,7 +13613,7 @@ clean-stageb2g0-gas: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -1953,7 +1899,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -13509,8 +13632,11 @@ +@@ -13519,8 +13634,11 @@ all-stage3-gas: configure-stage3-gas $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -1967,7 +1913,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-gas) maybe-clean-stage3-gas: clean-stage3-gas -@@ -13523,7 +13649,7 @@ +@@ -13533,7 +13651,7 @@ clean-stage3-gas: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -1976,7 +1922,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -13544,8 +13670,11 @@ +@@ -13554,8 +13672,11 @@ all-stageb3g2-gas: configure-stageb3g2-g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -1990,7 +1936,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-gas) maybe-clean-stageb3g2-gas: clean-stageb3g2-gas -@@ -13558,7 +13687,7 @@ +@@ -13568,7 +13689,7 @@ clean-stageb3g2-gas: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -1999,7 +1945,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -13579,8 +13708,11 @@ +@@ -13589,8 +13710,11 @@ all-stage4-gas: configure-stage4-gas $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -2013,7 +1959,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-gas) maybe-clean-stage4-gas: clean-stage4-gas -@@ -13593,7 +13725,7 @@ +@@ -13603,7 +13727,7 @@ clean-stage4-gas: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -2022,7 +1968,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -13614,8 +13746,11 @@ +@@ -13624,8 +13748,11 @@ all-stageprofile-gas: configure-stagepro $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -2036,7 +1982,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-gas) maybe-clean-stageprofile-gas: clean-stageprofile-gas -@@ -13628,7 +13763,7 @@ +@@ -13638,7 +13765,7 @@ clean-stageprofile-gas: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -2045,7 +1991,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -13649,8 +13784,11 @@ +@@ -13659,8 +13786,11 @@ all-stagefeedback-gas: configure-stagefe $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gas && \ @@ -2059,7 +2005,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-gas) maybe-clean-stagefeedback-gas: clean-stagefeedback-gas -@@ -13663,7 +13801,7 @@ +@@ -13673,7 +13803,7 @@ clean-stagefeedback-gas: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/gas && \ @@ -2068,7 +2014,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gas-bootstrap -@@ -14070,9 +14208,9 @@ +@@ -14080,9 +14210,9 @@ configure-stage1-gcc: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ @@ -2080,7 +2026,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14101,9 +14239,9 @@ +@@ -14111,9 +14241,9 @@ configure-stage2-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2092,7 +2038,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14132,9 +14270,9 @@ +@@ -14142,9 +14272,9 @@ configure-stageb2g0-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2104,7 +2050,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14163,9 +14301,9 @@ +@@ -14173,9 +14303,9 @@ configure-stage3-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2116,7 +2062,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14194,9 +14332,9 @@ +@@ -14204,9 +14334,9 @@ configure-stageb3g2-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2128,7 +2074,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14225,9 +14363,9 @@ +@@ -14235,9 +14365,9 @@ configure-stage4-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2140,7 +2086,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14256,9 +14394,9 @@ +@@ -14266,9 +14396,9 @@ configure-stageprofile-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2152,7 +2098,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14287,9 +14425,9 @@ +@@ -14297,9 +14427,9 @@ configure-stagefeedback-gcc: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2164,7 +2110,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \ cd $(HOST_SUBDIR)/gcc || exit 1; \ -@@ -14324,7 +14462,8 @@ +@@ -14334,7 +14464,8 @@ all-gcc: configure-gcc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gcc && \ @@ -2174,7 +2120,7 @@ Index: gcc-4.3.3/Makefile.in @endif gcc -@@ -14343,8 +14482,11 @@ +@@ -14353,8 +14484,11 @@ all-stage1-gcc: configure-stage1-gcc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2188,7 +2134,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-gcc) maybe-clean-stage1-gcc: clean-stage1-gcc -@@ -14357,7 +14499,7 @@ +@@ -14367,7 +14501,7 @@ clean-stage1-gcc: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2197,7 +2143,7 @@ Index: gcc-4.3.3/Makefile.in $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14377,8 +14519,11 @@ +@@ -14387,8 +14521,11 @@ all-stage2-gcc: configure-stage2-gcc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2211,7 +2157,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-gcc) maybe-clean-stage2-gcc: clean-stage2-gcc -@@ -14391,7 +14536,7 @@ +@@ -14401,7 +14538,7 @@ clean-stage2-gcc: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2220,7 +2166,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14412,8 +14557,11 @@ +@@ -14422,8 +14559,11 @@ all-stageb2g0-gcc: configure-stageb2g0-g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2234,7 +2180,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-gcc) maybe-clean-stageb2g0-gcc: clean-stageb2g0-gcc -@@ -14426,7 +14574,7 @@ +@@ -14436,7 +14576,7 @@ clean-stageb2g0-gcc: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2243,7 +2189,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14447,8 +14595,11 @@ +@@ -14457,8 +14597,11 @@ all-stage3-gcc: configure-stage3-gcc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2257,7 +2203,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-gcc) maybe-clean-stage3-gcc: clean-stage3-gcc -@@ -14461,7 +14612,7 @@ +@@ -14471,7 +14614,7 @@ clean-stage3-gcc: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2266,7 +2212,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14482,8 +14633,11 @@ +@@ -14492,8 +14635,11 @@ all-stageb3g2-gcc: configure-stageb3g2-g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2280,7 +2226,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-gcc) maybe-clean-stageb3g2-gcc: clean-stageb3g2-gcc -@@ -14496,7 +14650,7 @@ +@@ -14506,7 +14652,7 @@ clean-stageb3g2-gcc: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2289,7 +2235,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14517,8 +14671,11 @@ +@@ -14527,8 +14673,11 @@ all-stage4-gcc: configure-stage4-gcc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2303,7 +2249,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-gcc) maybe-clean-stage4-gcc: clean-stage4-gcc -@@ -14531,7 +14688,7 @@ +@@ -14541,7 +14690,7 @@ clean-stage4-gcc: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2312,7 +2258,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14552,8 +14709,11 @@ +@@ -14562,8 +14711,11 @@ all-stageprofile-gcc: configure-stagepro $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2326,7 +2272,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-gcc) maybe-clean-stageprofile-gcc: clean-stageprofile-gcc -@@ -14566,7 +14726,7 @@ +@@ -14576,7 +14728,7 @@ clean-stageprofile-gcc: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2335,7 +2281,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -14587,8 +14747,11 @@ +@@ -14597,8 +14749,11 @@ all-stagefeedback-gcc: configure-stagefe $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gcc && \ @@ -2349,7 +2295,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-gcc) maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc -@@ -14601,7 +14764,7 @@ +@@ -14611,7 +14766,7 @@ clean-stagefeedback-gcc: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/gcc && \ @@ -2358,7 +2304,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ $(EXTRA_GCC_FLAGS) clean @endif gcc-bootstrap -@@ -15015,7 +15178,8 @@ +@@ -15025,7 +15180,8 @@ all-gawk: configure-gawk s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gawk && \ @@ -2368,7 +2314,7 @@ Index: gcc-4.3.3/Makefile.in @endif gawk -@@ -15439,7 +15603,8 @@ +@@ -15449,7 +15605,8 @@ all-gettext: configure-gettext s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gettext && \ @@ -2378,7 +2324,7 @@ Index: gcc-4.3.3/Makefile.in @endif gettext -@@ -15856,9 +16021,9 @@ +@@ -15866,9 +16023,9 @@ configure-stage1-gmp: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ @@ -2390,7 +2336,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -15887,9 +16052,9 @@ +@@ -15897,9 +16054,9 @@ configure-stage2-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2402,7 +2348,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -15918,9 +16083,9 @@ +@@ -15928,9 +16085,9 @@ configure-stageb2g0-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2414,7 +2360,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -15949,9 +16114,9 @@ +@@ -15959,9 +16116,9 @@ configure-stage3-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2426,7 +2372,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -15980,9 +16145,9 @@ +@@ -15990,9 +16147,9 @@ configure-stageb3g2-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2438,7 +2384,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -16011,9 +16176,9 @@ +@@ -16021,9 +16178,9 @@ configure-stage4-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2450,7 +2396,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -16042,9 +16207,9 @@ +@@ -16052,9 +16209,9 @@ configure-stageprofile-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2462,7 +2408,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -16073,9 +16238,9 @@ +@@ -16083,9 +16240,9 @@ configure-stagefeedback-gmp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2474,7 +2420,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/gmp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \ cd $(HOST_SUBDIR)/gmp || exit 1; \ -@@ -16110,7 +16275,8 @@ +@@ -16120,7 +16277,8 @@ all-gmp: configure-gmp s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gmp && \ @@ -2484,7 +2430,7 @@ Index: gcc-4.3.3/Makefile.in @endif gmp -@@ -16129,8 +16295,11 @@ +@@ -16139,8 +16297,11 @@ all-stage1-gmp: configure-stage1-gmp s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2498,7 +2444,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-gmp) maybe-clean-stage1-gmp: clean-stage1-gmp -@@ -16143,7 +16312,7 @@ +@@ -16153,7 +16314,7 @@ clean-stage1-gmp: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2507,7 +2453,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif gmp-bootstrap -@@ -16163,8 +16332,11 @@ +@@ -16173,8 +16334,11 @@ all-stage2-gmp: configure-stage2-gmp $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2521,7 +2467,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-gmp) maybe-clean-stage2-gmp: clean-stage2-gmp -@@ -16177,7 +16349,7 @@ +@@ -16187,7 +16351,7 @@ clean-stage2-gmp: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2530,7 +2476,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16198,8 +16370,11 @@ +@@ -16208,8 +16372,11 @@ all-stageb2g0-gmp: configure-stageb2g0-g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2544,7 +2490,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-gmp) maybe-clean-stageb2g0-gmp: clean-stageb2g0-gmp -@@ -16212,7 +16387,7 @@ +@@ -16222,7 +16389,7 @@ clean-stageb2g0-gmp: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2553,7 +2499,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16233,8 +16408,11 @@ +@@ -16243,8 +16410,11 @@ all-stage3-gmp: configure-stage3-gmp $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2567,7 +2513,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-gmp) maybe-clean-stage3-gmp: clean-stage3-gmp -@@ -16247,7 +16425,7 @@ +@@ -16257,7 +16427,7 @@ clean-stage3-gmp: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2576,7 +2522,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16268,8 +16446,11 @@ +@@ -16278,8 +16448,11 @@ all-stageb3g2-gmp: configure-stageb3g2-g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2590,7 +2536,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-gmp) maybe-clean-stageb3g2-gmp: clean-stageb3g2-gmp -@@ -16282,7 +16463,7 @@ +@@ -16292,7 +16465,7 @@ clean-stageb3g2-gmp: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2599,7 +2545,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16303,8 +16484,11 @@ +@@ -16313,8 +16486,11 @@ all-stage4-gmp: configure-stage4-gmp $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2613,7 +2559,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-gmp) maybe-clean-stage4-gmp: clean-stage4-gmp -@@ -16317,7 +16501,7 @@ +@@ -16327,7 +16503,7 @@ clean-stage4-gmp: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2622,7 +2568,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16338,8 +16522,11 @@ +@@ -16348,8 +16524,11 @@ all-stageprofile-gmp: configure-stagepro $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2636,7 +2582,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-gmp) maybe-clean-stageprofile-gmp: clean-stageprofile-gmp -@@ -16352,7 +16539,7 @@ +@@ -16362,7 +16541,7 @@ clean-stageprofile-gmp: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2645,7 +2591,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16373,8 +16560,11 @@ +@@ -16383,8 +16562,11 @@ all-stagefeedback-gmp: configure-stagefe $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/gmp && \ @@ -2659,7 +2605,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-gmp) maybe-clean-stagefeedback-gmp: clean-stagefeedback-gmp -@@ -16387,7 +16577,7 @@ +@@ -16397,7 +16579,7 @@ clean-stagefeedback-gmp: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/gmp && \ @@ -2668,7 +2614,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif gmp-bootstrap -@@ -16788,9 +16978,9 @@ +@@ -16798,9 +16980,9 @@ configure-stage1-mpfr: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ @@ -2680,7 +2626,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -16819,9 +17009,9 @@ +@@ -16829,9 +17011,9 @@ configure-stage2-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2692,7 +2638,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -16850,9 +17040,9 @@ +@@ -16860,9 +17042,9 @@ configure-stageb2g0-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2704,7 +2650,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -16881,9 +17071,9 @@ +@@ -16891,9 +17073,9 @@ configure-stage3-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2716,7 +2662,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -16912,9 +17102,9 @@ +@@ -16922,9 +17104,9 @@ configure-stageb3g2-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2728,7 +2674,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -16943,9 +17133,9 @@ +@@ -16953,9 +17135,9 @@ configure-stage4-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2740,7 +2686,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -16974,9 +17164,9 @@ +@@ -16984,9 +17166,9 @@ configure-stageprofile-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2752,7 +2698,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -17005,9 +17195,9 @@ +@@ -17015,9 +17197,9 @@ configure-stagefeedback-mpfr: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -2764,7 +2710,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \ cd $(HOST_SUBDIR)/mpfr || exit 1; \ -@@ -17042,7 +17232,8 @@ +@@ -17052,7 +17234,8 @@ all-mpfr: configure-mpfr s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/mpfr && \ @@ -2774,7 +2720,7 @@ Index: gcc-4.3.3/Makefile.in @endif mpfr -@@ -17061,8 +17252,11 @@ +@@ -17071,8 +17254,11 @@ all-stage1-mpfr: configure-stage1-mpfr s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2788,7 +2734,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-mpfr) maybe-clean-stage1-mpfr: clean-stage1-mpfr -@@ -17075,7 +17269,7 @@ +@@ -17085,7 +17271,7 @@ clean-stage1-mpfr: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2797,7 +2743,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif mpfr-bootstrap -@@ -17095,8 +17289,11 @@ +@@ -17105,8 +17291,11 @@ all-stage2-mpfr: configure-stage2-mpfr $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2811,7 +2757,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-mpfr) maybe-clean-stage2-mpfr: clean-stage2-mpfr -@@ -17109,7 +17306,7 @@ +@@ -17119,7 +17308,7 @@ clean-stage2-mpfr: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2820,7 +2766,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17130,8 +17327,11 @@ +@@ -17140,8 +17329,11 @@ all-stageb2g0-mpfr: configure-stageb2g0- $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2834,7 +2780,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-mpfr) maybe-clean-stageb2g0-mpfr: clean-stageb2g0-mpfr -@@ -17144,7 +17344,7 @@ +@@ -17154,7 +17346,7 @@ clean-stageb2g0-mpfr: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2843,7 +2789,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17165,8 +17365,11 @@ +@@ -17175,8 +17367,11 @@ all-stage3-mpfr: configure-stage3-mpfr $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2857,7 +2803,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-mpfr) maybe-clean-stage3-mpfr: clean-stage3-mpfr -@@ -17179,7 +17382,7 @@ +@@ -17189,7 +17384,7 @@ clean-stage3-mpfr: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2866,7 +2812,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17200,8 +17403,11 @@ +@@ -17210,8 +17405,11 @@ all-stageb3g2-mpfr: configure-stageb3g2- $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2880,7 +2826,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-mpfr) maybe-clean-stageb3g2-mpfr: clean-stageb3g2-mpfr -@@ -17214,7 +17420,7 @@ +@@ -17224,7 +17422,7 @@ clean-stageb3g2-mpfr: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2889,7 +2835,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17235,8 +17441,11 @@ +@@ -17245,8 +17443,11 @@ all-stage4-mpfr: configure-stage4-mpfr $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2903,7 +2849,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-mpfr) maybe-clean-stage4-mpfr: clean-stage4-mpfr -@@ -17249,7 +17458,7 @@ +@@ -17259,7 +17460,7 @@ clean-stage4-mpfr: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2912,7 +2858,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17270,8 +17479,11 @@ +@@ -17280,8 +17481,11 @@ all-stageprofile-mpfr: configure-stagepr $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2926,7 +2872,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-mpfr) maybe-clean-stageprofile-mpfr: clean-stageprofile-mpfr -@@ -17284,7 +17496,7 @@ +@@ -17294,7 +17498,7 @@ clean-stageprofile-mpfr: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2935,7 +2881,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17305,8 +17517,11 @@ +@@ -17315,8 +17519,11 @@ all-stagefeedback-mpfr: configure-stagef $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2949,7 +2895,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-mpfr) maybe-clean-stagefeedback-mpfr: clean-stagefeedback-mpfr -@@ -17319,7 +17534,7 @@ +@@ -17329,7 +17536,7 @@ clean-stagefeedback-mpfr: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/mpfr && \ @@ -2958,7 +2904,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif mpfr-bootstrap -@@ -17727,7 +17942,8 @@ +@@ -17737,7 +17944,8 @@ all-gnuserv: configure-gnuserv s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gnuserv && \ @@ -2968,7 +2914,7 @@ Index: gcc-4.3.3/Makefile.in @endif gnuserv -@@ -18151,7 +18367,8 @@ +@@ -18161,7 +18369,8 @@ all-gprof: configure-gprof s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gprof && \ @@ -2978,7 +2924,7 @@ Index: gcc-4.3.3/Makefile.in @endif gprof -@@ -18575,7 +18792,8 @@ +@@ -18585,7 +18794,8 @@ all-gzip: configure-gzip s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gzip && \ @@ -2988,7 +2934,7 @@ Index: gcc-4.3.3/Makefile.in @endif gzip -@@ -18999,7 +19217,8 @@ +@@ -19009,7 +19219,8 @@ all-hello: configure-hello s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/hello && \ @@ -2998,7 +2944,7 @@ Index: gcc-4.3.3/Makefile.in @endif hello -@@ -19423,7 +19642,8 @@ +@@ -19433,7 +19644,8 @@ all-indent: configure-indent s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/indent && \ @@ -3008,7 +2954,7 @@ Index: gcc-4.3.3/Makefile.in @endif indent -@@ -19840,9 +20060,9 @@ +@@ -19850,9 +20062,9 @@ configure-stage1-intl: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ @@ -3020,7 +2966,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -19871,9 +20091,9 @@ +@@ -19881,9 +20093,9 @@ configure-stage2-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3032,7 +2978,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -19902,9 +20122,9 @@ +@@ -19912,9 +20124,9 @@ configure-stageb2g0-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3044,7 +2990,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -19933,9 +20153,9 @@ +@@ -19943,9 +20155,9 @@ configure-stage3-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3056,7 +3002,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -19964,9 +20184,9 @@ +@@ -19974,9 +20186,9 @@ configure-stageb3g2-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3068,7 +3014,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -19995,9 +20215,9 @@ +@@ -20005,9 +20217,9 @@ configure-stage4-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3080,7 +3026,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -20026,9 +20246,9 @@ +@@ -20036,9 +20248,9 @@ configure-stageprofile-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3092,7 +3038,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -20057,9 +20277,9 @@ +@@ -20067,9 +20279,9 @@ configure-stagefeedback-intl: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3104,7 +3050,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \ cd $(HOST_SUBDIR)/intl || exit 1; \ -@@ -20094,7 +20314,8 @@ +@@ -20104,7 +20316,8 @@ all-intl: configure-intl s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/intl && \ @@ -3114,7 +3060,7 @@ Index: gcc-4.3.3/Makefile.in @endif intl -@@ -20113,8 +20334,11 @@ +@@ -20123,8 +20336,11 @@ all-stage1-intl: configure-stage1-intl s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3128,7 +3074,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-intl) maybe-clean-stage1-intl: clean-stage1-intl -@@ -20127,7 +20351,7 @@ +@@ -20137,7 +20353,7 @@ clean-stage1-intl: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3137,7 +3083,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif intl-bootstrap -@@ -20147,8 +20371,11 @@ +@@ -20157,8 +20373,11 @@ all-stage2-intl: configure-stage2-intl $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3151,7 +3097,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-intl) maybe-clean-stage2-intl: clean-stage2-intl -@@ -20161,7 +20388,7 @@ +@@ -20171,7 +20390,7 @@ clean-stage2-intl: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3160,7 +3106,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20182,8 +20409,11 @@ +@@ -20192,8 +20411,11 @@ all-stageb2g0-intl: configure-stageb2g0- $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3174,7 +3120,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-intl) maybe-clean-stageb2g0-intl: clean-stageb2g0-intl -@@ -20196,7 +20426,7 @@ +@@ -20206,7 +20428,7 @@ clean-stageb2g0-intl: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3183,7 +3129,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20217,8 +20447,11 @@ +@@ -20227,8 +20449,11 @@ all-stage3-intl: configure-stage3-intl $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3197,7 +3143,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-intl) maybe-clean-stage3-intl: clean-stage3-intl -@@ -20231,7 +20464,7 @@ +@@ -20241,7 +20466,7 @@ clean-stage3-intl: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3206,7 +3152,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20252,8 +20485,11 @@ +@@ -20262,8 +20487,11 @@ all-stageb3g2-intl: configure-stageb3g2- $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3220,7 +3166,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-intl) maybe-clean-stageb3g2-intl: clean-stageb3g2-intl -@@ -20266,7 +20502,7 @@ +@@ -20276,7 +20504,7 @@ clean-stageb3g2-intl: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3229,7 +3175,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20287,8 +20523,11 @@ +@@ -20297,8 +20525,11 @@ all-stage4-intl: configure-stage4-intl $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3243,7 +3189,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-intl) maybe-clean-stage4-intl: clean-stage4-intl -@@ -20301,7 +20540,7 @@ +@@ -20311,7 +20542,7 @@ clean-stage4-intl: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3252,7 +3198,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20322,8 +20561,11 @@ +@@ -20332,8 +20563,11 @@ all-stageprofile-intl: configure-stagepr $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3266,7 +3212,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-intl) maybe-clean-stageprofile-intl: clean-stageprofile-intl -@@ -20336,7 +20578,7 @@ +@@ -20346,7 +20580,7 @@ clean-stageprofile-intl: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3275,7 +3221,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20357,8 +20599,11 @@ +@@ -20367,8 +20601,11 @@ all-stagefeedback-intl: configure-stagef $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/intl && \ @@ -3289,7 +3235,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-intl) maybe-clean-stagefeedback-intl: clean-stagefeedback-intl -@@ -20371,7 +20616,7 @@ +@@ -20381,7 +20618,7 @@ clean-stagefeedback-intl: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/intl && \ @@ -3298,7 +3244,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif intl-bootstrap -@@ -20785,7 +21030,8 @@ +@@ -20795,7 +21032,8 @@ all-tcl: configure-tcl s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/tcl && \ @@ -3308,7 +3254,7 @@ Index: gcc-4.3.3/Makefile.in @endif tcl -@@ -21194,7 +21440,8 @@ +@@ -21204,7 +21442,8 @@ all-itcl: configure-itcl s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/itcl && \ @@ -3318,7 +3264,7 @@ Index: gcc-4.3.3/Makefile.in @endif itcl -@@ -21611,9 +21858,9 @@ +@@ -21621,9 +21860,9 @@ configure-stage1-ld: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ @@ -3330,7 +3276,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21642,9 +21889,9 @@ +@@ -21652,9 +21891,9 @@ configure-stage2-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3342,7 +3288,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21673,9 +21920,9 @@ +@@ -21683,9 +21922,9 @@ configure-stageb2g0-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3354,7 +3300,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21704,9 +21951,9 @@ +@@ -21714,9 +21953,9 @@ configure-stage3-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3366,7 +3312,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21735,9 +21982,9 @@ +@@ -21745,9 +21984,9 @@ configure-stageb3g2-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3378,7 +3324,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21766,9 +22013,9 @@ +@@ -21776,9 +22015,9 @@ configure-stage4-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3390,7 +3336,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21797,9 +22044,9 @@ +@@ -21807,9 +22046,9 @@ configure-stageprofile-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3402,7 +3348,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21828,9 +22075,9 @@ +@@ -21838,9 +22077,9 @@ configure-stagefeedback-ld: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3414,7 +3360,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \ cd $(HOST_SUBDIR)/ld || exit 1; \ -@@ -21865,7 +22112,8 @@ +@@ -21875,7 +22114,8 @@ all-ld: configure-ld s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/ld && \ @@ -3424,7 +3370,7 @@ Index: gcc-4.3.3/Makefile.in @endif ld -@@ -21884,8 +22132,11 @@ +@@ -21894,8 +22134,11 @@ all-stage1-ld: configure-stage1-ld s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3438,7 +3384,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-ld) maybe-clean-stage1-ld: clean-stage1-ld -@@ -21898,7 +22149,7 @@ +@@ -21908,7 +22151,7 @@ clean-stage1-ld: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3447,7 +3393,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif ld-bootstrap -@@ -21918,8 +22169,11 @@ +@@ -21928,8 +22171,11 @@ all-stage2-ld: configure-stage2-ld $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3461,7 +3407,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-ld) maybe-clean-stage2-ld: clean-stage2-ld -@@ -21932,7 +22186,7 @@ +@@ -21942,7 +22188,7 @@ clean-stage2-ld: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3470,7 +3416,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -21953,8 +22207,11 @@ +@@ -21963,8 +22209,11 @@ all-stageb2g0-ld: configure-stageb2g0-ld $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3484,7 +3430,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-ld) maybe-clean-stageb2g0-ld: clean-stageb2g0-ld -@@ -21967,7 +22224,7 @@ +@@ -21977,7 +22226,7 @@ clean-stageb2g0-ld: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3493,7 +3439,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -21988,8 +22245,11 @@ +@@ -21998,8 +22247,11 @@ all-stage3-ld: configure-stage3-ld $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3507,7 +3453,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-ld) maybe-clean-stage3-ld: clean-stage3-ld -@@ -22002,7 +22262,7 @@ +@@ -22012,7 +22264,7 @@ clean-stage3-ld: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3516,7 +3462,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -22023,8 +22283,11 @@ +@@ -22033,8 +22285,11 @@ all-stageb3g2-ld: configure-stageb3g2-ld $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3530,7 +3476,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-ld) maybe-clean-stageb3g2-ld: clean-stageb3g2-ld -@@ -22037,7 +22300,7 @@ +@@ -22047,7 +22302,7 @@ clean-stageb3g2-ld: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3539,7 +3485,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -22058,8 +22321,11 @@ +@@ -22068,8 +22323,11 @@ all-stage4-ld: configure-stage4-ld $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3553,7 +3499,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-ld) maybe-clean-stage4-ld: clean-stage4-ld -@@ -22072,7 +22338,7 @@ +@@ -22082,7 +22340,7 @@ clean-stage4-ld: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3562,7 +3508,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -22093,8 +22359,11 @@ +@@ -22103,8 +22361,11 @@ all-stageprofile-ld: configure-stageprof $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3576,7 +3522,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-ld) maybe-clean-stageprofile-ld: clean-stageprofile-ld -@@ -22107,7 +22376,7 @@ +@@ -22117,7 +22378,7 @@ clean-stageprofile-ld: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3585,7 +3531,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -22128,8 +22397,11 @@ +@@ -22138,8 +22399,11 @@ all-stagefeedback-ld: configure-stagefee $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/ld && \ @@ -3599,7 +3545,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-ld) maybe-clean-stagefeedback-ld: clean-stagefeedback-ld -@@ -22142,7 +22414,7 @@ +@@ -22152,7 +22416,7 @@ clean-stagefeedback-ld: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/ld && \ @@ -3608,7 +3554,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif ld-bootstrap -@@ -22549,9 +22821,9 @@ +@@ -22559,9 +22823,9 @@ configure-stage1-libcpp: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ @@ -3620,7 +3566,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22580,9 +22852,9 @@ +@@ -22590,9 +22854,9 @@ configure-stage2-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3632,7 +3578,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22611,9 +22883,9 @@ +@@ -22621,9 +22885,9 @@ configure-stageb2g0-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3644,7 +3590,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22642,9 +22914,9 @@ +@@ -22652,9 +22916,9 @@ configure-stage3-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3656,7 +3602,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22673,9 +22945,9 @@ +@@ -22683,9 +22947,9 @@ configure-stageb3g2-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3668,7 +3614,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22704,9 +22976,9 @@ +@@ -22714,9 +22978,9 @@ configure-stage4-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3680,7 +3626,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22735,9 +23007,9 @@ +@@ -22745,9 +23009,9 @@ configure-stageprofile-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3692,7 +3638,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22766,9 +23038,9 @@ +@@ -22776,9 +23040,9 @@ configure-stagefeedback-libcpp: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3704,7 +3650,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \ cd $(HOST_SUBDIR)/libcpp || exit 1; \ -@@ -22803,7 +23075,8 @@ +@@ -22813,7 +23077,8 @@ all-libcpp: configure-libcpp s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libcpp && \ @@ -3714,7 +3660,7 @@ Index: gcc-4.3.3/Makefile.in @endif libcpp -@@ -22822,8 +23095,11 @@ +@@ -22832,8 +23097,11 @@ all-stage1-libcpp: configure-stage1-libc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3728,7 +3674,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-libcpp) maybe-clean-stage1-libcpp: clean-stage1-libcpp -@@ -22836,7 +23112,7 @@ +@@ -22846,7 +23114,7 @@ clean-stage1-libcpp: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3737,7 +3683,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif libcpp-bootstrap -@@ -22856,8 +23132,11 @@ +@@ -22866,8 +23134,11 @@ all-stage2-libcpp: configure-stage2-libc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3751,7 +3697,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-libcpp) maybe-clean-stage2-libcpp: clean-stage2-libcpp -@@ -22870,7 +23149,7 @@ +@@ -22880,7 +23151,7 @@ clean-stage2-libcpp: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3760,7 +3706,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -22891,8 +23170,11 @@ +@@ -22901,8 +23172,11 @@ all-stageb2g0-libcpp: configure-stageb2g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3774,7 +3720,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-libcpp) maybe-clean-stageb2g0-libcpp: clean-stageb2g0-libcpp -@@ -22905,7 +23187,7 @@ +@@ -22915,7 +23189,7 @@ clean-stageb2g0-libcpp: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3783,7 +3729,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -22926,8 +23208,11 @@ +@@ -22936,8 +23210,11 @@ all-stage3-libcpp: configure-stage3-libc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3797,7 +3743,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-libcpp) maybe-clean-stage3-libcpp: clean-stage3-libcpp -@@ -22940,7 +23225,7 @@ +@@ -22950,7 +23227,7 @@ clean-stage3-libcpp: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3806,7 +3752,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -22961,8 +23246,11 @@ +@@ -22971,8 +23248,11 @@ all-stageb3g2-libcpp: configure-stageb3g $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3820,7 +3766,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-libcpp) maybe-clean-stageb3g2-libcpp: clean-stageb3g2-libcpp -@@ -22975,7 +23263,7 @@ +@@ -22985,7 +23265,7 @@ clean-stageb3g2-libcpp: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3829,7 +3775,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -22996,8 +23284,11 @@ +@@ -23006,8 +23286,11 @@ all-stage4-libcpp: configure-stage4-libc $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3843,7 +3789,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-libcpp) maybe-clean-stage4-libcpp: clean-stage4-libcpp -@@ -23010,7 +23301,7 @@ +@@ -23020,7 +23303,7 @@ clean-stage4-libcpp: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3852,7 +3798,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -23031,8 +23322,11 @@ +@@ -23041,8 +23324,11 @@ all-stageprofile-libcpp: configure-stage $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3866,7 +3812,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-libcpp) maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp -@@ -23045,7 +23339,7 @@ +@@ -23055,7 +23341,7 @@ clean-stageprofile-libcpp: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3875,7 +3821,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -23066,8 +23360,11 @@ +@@ -23076,8 +23362,11 @@ all-stagefeedback-libcpp: configure-stag $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3889,7 +3835,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-libcpp) maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp -@@ -23080,7 +23377,7 @@ +@@ -23090,7 +23379,7 @@ clean-stagefeedback-libcpp: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/libcpp && \ @@ -3898,7 +3844,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libcpp-bootstrap -@@ -23487,9 +23784,9 @@ +@@ -23497,9 +23786,9 @@ configure-stage1-libdecnumber: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ @@ -3910,7 +3856,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23518,9 +23815,9 @@ +@@ -23528,9 +23817,9 @@ configure-stage2-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3922,7 +3868,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23549,9 +23846,9 @@ +@@ -23559,9 +23848,9 @@ configure-stageb2g0-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3934,7 +3880,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23580,9 +23877,9 @@ +@@ -23590,9 +23879,9 @@ configure-stage3-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3946,7 +3892,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23611,9 +23908,9 @@ +@@ -23621,9 +23910,9 @@ configure-stageb3g2-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3958,7 +3904,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23642,9 +23939,9 @@ +@@ -23652,9 +23941,9 @@ configure-stage4-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3970,7 +3916,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23673,9 +23970,9 @@ +@@ -23683,9 +23972,9 @@ configure-stageprofile-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3982,7 +3928,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23704,9 +24001,9 @@ +@@ -23714,9 +24003,9 @@ configure-stagefeedback-libdecnumber: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -3994,7 +3940,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \ cd $(HOST_SUBDIR)/libdecnumber || exit 1; \ -@@ -23741,7 +24038,8 @@ +@@ -23751,7 +24040,8 @@ all-libdecnumber: configure-libdecnumber s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4004,7 +3950,7 @@ Index: gcc-4.3.3/Makefile.in @endif libdecnumber -@@ -23760,8 +24058,11 @@ +@@ -23770,8 +24060,11 @@ all-stage1-libdecnumber: configure-stage s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4018,7 +3964,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-libdecnumber) maybe-clean-stage1-libdecnumber: clean-stage1-libdecnumber -@@ -23774,7 +24075,7 @@ +@@ -23784,7 +24077,7 @@ clean-stage1-libdecnumber: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4027,7 +3973,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif libdecnumber-bootstrap -@@ -23794,8 +24095,11 @@ +@@ -23804,8 +24097,11 @@ all-stage2-libdecnumber: configure-stage $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4041,7 +3987,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-libdecnumber) maybe-clean-stage2-libdecnumber: clean-stage2-libdecnumber -@@ -23808,7 +24112,7 @@ +@@ -23818,7 +24114,7 @@ clean-stage2-libdecnumber: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4050,7 +3996,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -23829,8 +24133,11 @@ +@@ -23839,8 +24135,11 @@ all-stageb2g0-libdecnumber: configure-st $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4064,7 +4010,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-libdecnumber) maybe-clean-stageb2g0-libdecnumber: clean-stageb2g0-libdecnumber -@@ -23843,7 +24150,7 @@ +@@ -23853,7 +24152,7 @@ clean-stageb2g0-libdecnumber: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4073,7 +4019,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -23864,8 +24171,11 @@ +@@ -23874,8 +24173,11 @@ all-stage3-libdecnumber: configure-stage $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4087,7 +4033,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-libdecnumber) maybe-clean-stage3-libdecnumber: clean-stage3-libdecnumber -@@ -23878,7 +24188,7 @@ +@@ -23888,7 +24190,7 @@ clean-stage3-libdecnumber: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4096,7 +4042,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -23899,8 +24209,11 @@ +@@ -23909,8 +24211,11 @@ all-stageb3g2-libdecnumber: configure-st $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4110,7 +4056,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-libdecnumber) maybe-clean-stageb3g2-libdecnumber: clean-stageb3g2-libdecnumber -@@ -23913,7 +24226,7 @@ +@@ -23923,7 +24228,7 @@ clean-stageb3g2-libdecnumber: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4119,7 +4065,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -23934,8 +24247,11 @@ +@@ -23944,8 +24249,11 @@ all-stage4-libdecnumber: configure-stage $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4133,7 +4079,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-libdecnumber) maybe-clean-stage4-libdecnumber: clean-stage4-libdecnumber -@@ -23948,7 +24264,7 @@ +@@ -23958,7 +24266,7 @@ clean-stage4-libdecnumber: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4142,7 +4088,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -23969,8 +24285,11 @@ +@@ -23979,8 +24287,11 @@ all-stageprofile-libdecnumber: configure $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4156,7 +4102,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-libdecnumber) maybe-clean-stageprofile-libdecnumber: clean-stageprofile-libdecnumber -@@ -23983,7 +24302,7 @@ +@@ -23993,7 +24304,7 @@ clean-stageprofile-libdecnumber: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4165,7 +4111,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -24004,8 +24323,11 @@ +@@ -24014,8 +24325,11 @@ all-stagefeedback-libdecnumber: configur $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4179,7 +4125,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-libdecnumber) maybe-clean-stagefeedback-libdecnumber: clean-stagefeedback-libdecnumber -@@ -24018,7 +24340,7 @@ +@@ -24028,7 +24342,7 @@ clean-stagefeedback-libdecnumber: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/libdecnumber && \ @@ -4188,7 +4134,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libdecnumber-bootstrap -@@ -24432,7 +24754,8 @@ +@@ -24442,7 +24756,8 @@ all-libgui: configure-libgui s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libgui && \ @@ -4198,7 +4144,7 @@ Index: gcc-4.3.3/Makefile.in @endif libgui -@@ -24849,9 +25172,9 @@ +@@ -24859,9 +25174,9 @@ configure-stage1-libiberty: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ @@ -4210,7 +4156,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -24880,9 +25203,9 @@ +@@ -24890,9 +25205,9 @@ configure-stage2-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4222,7 +4168,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -24911,9 +25234,9 @@ +@@ -24921,9 +25236,9 @@ configure-stageb2g0-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4234,7 +4180,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -24942,9 +25265,9 @@ +@@ -24952,9 +25267,9 @@ configure-stage3-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4246,7 +4192,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -24973,9 +25296,9 @@ +@@ -24983,9 +25298,9 @@ configure-stageb3g2-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4258,7 +4204,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -25004,9 +25327,9 @@ +@@ -25014,9 +25329,9 @@ configure-stage4-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4270,7 +4216,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -25035,9 +25358,9 @@ +@@ -25045,9 +25360,9 @@ configure-stageprofile-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4282,7 +4228,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -25066,9 +25389,9 @@ +@@ -25076,9 +25391,9 @@ configure-stagefeedback-libiberty: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4294,7 +4240,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \ cd $(HOST_SUBDIR)/libiberty || exit 1; \ -@@ -25103,7 +25426,8 @@ +@@ -25113,7 +25428,8 @@ all-libiberty: configure-libiberty s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libiberty && \ @@ -4304,7 +4250,7 @@ Index: gcc-4.3.3/Makefile.in @endif libiberty -@@ -25122,8 +25446,11 @@ +@@ -25132,8 +25448,11 @@ all-stage1-libiberty: configure-stage1-l s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4318,7 +4264,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-libiberty) maybe-clean-stage1-libiberty: clean-stage1-libiberty -@@ -25136,7 +25463,7 @@ +@@ -25146,7 +25465,7 @@ clean-stage1-libiberty: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4327,7 +4273,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif libiberty-bootstrap -@@ -25156,8 +25483,11 @@ +@@ -25166,8 +25485,11 @@ all-stage2-libiberty: configure-stage2-l $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4341,7 +4287,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-libiberty) maybe-clean-stage2-libiberty: clean-stage2-libiberty -@@ -25170,7 +25500,7 @@ +@@ -25180,7 +25502,7 @@ clean-stage2-libiberty: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4350,7 +4296,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25191,8 +25521,11 @@ +@@ -25201,8 +25523,11 @@ all-stageb2g0-libiberty: configure-stage $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4364,7 +4310,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-libiberty) maybe-clean-stageb2g0-libiberty: clean-stageb2g0-libiberty -@@ -25205,7 +25538,7 @@ +@@ -25215,7 +25540,7 @@ clean-stageb2g0-libiberty: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4373,7 +4319,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25226,8 +25559,11 @@ +@@ -25236,8 +25561,11 @@ all-stage3-libiberty: configure-stage3-l $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4387,7 +4333,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-libiberty) maybe-clean-stage3-libiberty: clean-stage3-libiberty -@@ -25240,7 +25576,7 @@ +@@ -25250,7 +25578,7 @@ clean-stage3-libiberty: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4396,7 +4342,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25261,8 +25597,11 @@ +@@ -25271,8 +25599,11 @@ all-stageb3g2-libiberty: configure-stage $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4410,7 +4356,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-libiberty) maybe-clean-stageb3g2-libiberty: clean-stageb3g2-libiberty -@@ -25275,7 +25614,7 @@ +@@ -25285,7 +25616,7 @@ clean-stageb3g2-libiberty: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4419,7 +4365,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25296,8 +25635,11 @@ +@@ -25306,8 +25637,11 @@ all-stage4-libiberty: configure-stage4-l $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4433,7 +4379,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-libiberty) maybe-clean-stage4-libiberty: clean-stage4-libiberty -@@ -25310,7 +25652,7 @@ +@@ -25320,7 +25654,7 @@ clean-stage4-libiberty: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4442,7 +4388,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25331,8 +25673,11 @@ +@@ -25341,8 +25675,11 @@ all-stageprofile-libiberty: configure-st $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4456,7 +4402,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-libiberty) maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty -@@ -25345,7 +25690,7 @@ +@@ -25355,7 +25692,7 @@ clean-stageprofile-libiberty: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4465,7 +4411,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25366,8 +25711,11 @@ +@@ -25376,8 +25713,11 @@ all-stagefeedback-libiberty: configure-s $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4479,7 +4425,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-libiberty) maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty -@@ -25380,7 +25728,7 @@ +@@ -25390,7 +25730,7 @@ clean-stagefeedback-libiberty: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/libiberty && \ @@ -4488,7 +4434,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif libiberty-bootstrap -@@ -25794,7 +26142,8 @@ +@@ -25804,7 +26144,8 @@ all-libtool: configure-libtool s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libtool && \ @@ -4498,7 +4444,7 @@ Index: gcc-4.3.3/Makefile.in @endif libtool -@@ -26218,7 +26567,8 @@ +@@ -26228,7 +26569,8 @@ all-m4: configure-m4 s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/m4 && \ @@ -4508,7 +4454,7 @@ Index: gcc-4.3.3/Makefile.in @endif m4 -@@ -26642,7 +26992,8 @@ +@@ -26652,7 +26994,8 @@ all-make: configure-make s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/make && \ @@ -4518,7 +4464,7 @@ Index: gcc-4.3.3/Makefile.in @endif make -@@ -27066,7 +27417,8 @@ +@@ -27076,7 +27419,8 @@ all-mmalloc: configure-mmalloc s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/mmalloc && \ @@ -4528,7 +4474,7 @@ Index: gcc-4.3.3/Makefile.in @endif mmalloc -@@ -27484,7 +27836,8 @@ +@@ -27494,7 +27838,8 @@ all-patch: configure-patch s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/patch && \ @@ -4538,7 +4484,7 @@ Index: gcc-4.3.3/Makefile.in @endif patch -@@ -27908,7 +28261,8 @@ +@@ -27918,7 +28263,8 @@ all-perl: configure-perl s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/perl && \ @@ -4548,7 +4494,7 @@ Index: gcc-4.3.3/Makefile.in @endif perl -@@ -28332,7 +28686,8 @@ +@@ -28342,7 +28688,8 @@ all-prms: configure-prms s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/prms && \ @@ -4558,7 +4504,7 @@ Index: gcc-4.3.3/Makefile.in @endif prms -@@ -28756,7 +29111,8 @@ +@@ -28766,7 +29113,8 @@ all-rcs: configure-rcs s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/rcs && \ @@ -4568,7 +4514,7 @@ Index: gcc-4.3.3/Makefile.in @endif rcs -@@ -29180,7 +29536,8 @@ +@@ -29190,7 +29538,8 @@ all-readline: configure-readline s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/readline && \ @@ -4578,7 +4524,7 @@ Index: gcc-4.3.3/Makefile.in @endif readline -@@ -29604,7 +29961,8 @@ +@@ -29614,7 +29963,8 @@ all-release: configure-release s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/release && \ @@ -4588,7 +4534,7 @@ Index: gcc-4.3.3/Makefile.in @endif release -@@ -30016,7 +30374,8 @@ +@@ -30026,7 +30376,8 @@ all-recode: configure-recode s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/recode && \ @@ -4598,7 +4544,7 @@ Index: gcc-4.3.3/Makefile.in @endif recode -@@ -30440,7 +30799,8 @@ +@@ -30450,7 +30801,8 @@ all-sed: configure-sed s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/sed && \ @@ -4608,7 +4554,7 @@ Index: gcc-4.3.3/Makefile.in @endif sed -@@ -30864,7 +31224,8 @@ +@@ -30874,7 +31226,8 @@ all-send-pr: configure-send-pr s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/send-pr && \ @@ -4618,7 +4564,7 @@ Index: gcc-4.3.3/Makefile.in @endif send-pr -@@ -31288,7 +31649,8 @@ +@@ -31298,7 +31651,8 @@ all-shellutils: configure-shellutils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/shellutils && \ @@ -4628,7 +4574,7 @@ Index: gcc-4.3.3/Makefile.in @endif shellutils -@@ -31712,7 +32074,8 @@ +@@ -31722,7 +32076,8 @@ all-sid: configure-sid s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/sid && \ @@ -4638,7 +4584,7 @@ Index: gcc-4.3.3/Makefile.in @endif sid -@@ -32136,7 +32499,8 @@ +@@ -32146,7 +32501,8 @@ all-sim: configure-sim s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/sim && \ @@ -4648,7 +4594,7 @@ Index: gcc-4.3.3/Makefile.in @endif sim -@@ -32560,7 +32924,8 @@ +@@ -32570,7 +32926,8 @@ all-tar: configure-tar s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/tar && \ @@ -4658,7 +4604,7 @@ Index: gcc-4.3.3/Makefile.in @endif tar -@@ -32984,7 +33349,8 @@ +@@ -32994,7 +33351,8 @@ all-texinfo: configure-texinfo s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/texinfo && \ @@ -4668,7 +4614,7 @@ Index: gcc-4.3.3/Makefile.in @endif texinfo -@@ -33402,7 +33768,8 @@ +@@ -33412,7 +33770,8 @@ all-textutils: configure-textutils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/textutils && \ @@ -4678,7 +4624,7 @@ Index: gcc-4.3.3/Makefile.in @endif textutils -@@ -33826,7 +34193,8 @@ +@@ -33836,7 +34195,8 @@ all-time: configure-time s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/time && \ @@ -4688,7 +4634,7 @@ Index: gcc-4.3.3/Makefile.in @endif time -@@ -34250,7 +34618,8 @@ +@@ -34260,7 +34620,8 @@ all-uudecode: configure-uudecode s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/uudecode && \ @@ -4698,7 +4644,7 @@ Index: gcc-4.3.3/Makefile.in @endif uudecode -@@ -34674,7 +35043,8 @@ +@@ -34684,7 +35045,8 @@ all-wdiff: configure-wdiff s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/wdiff && \ @@ -4708,7 +4654,7 @@ Index: gcc-4.3.3/Makefile.in @endif wdiff -@@ -35098,7 +35468,8 @@ +@@ -35108,7 +35470,8 @@ all-zip: configure-zip s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/zip && \ @@ -4718,7 +4664,7 @@ Index: gcc-4.3.3/Makefile.in @endif zip -@@ -35518,9 +35889,9 @@ +@@ -35528,9 +35891,9 @@ configure-stage1-zlib: @r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ @@ -4730,7 +4676,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35549,9 +35920,9 @@ +@@ -35559,9 +35922,9 @@ configure-stage2-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4742,7 +4688,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35580,9 +35951,9 @@ +@@ -35590,9 +35953,9 @@ configure-stageb2g0-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4754,7 +4700,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35611,9 +35982,9 @@ +@@ -35621,9 +35984,9 @@ configure-stage3-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4766,7 +4712,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35642,9 +36013,9 @@ +@@ -35652,9 +36015,9 @@ configure-stageb3g2-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4778,7 +4724,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35673,9 +36044,9 @@ +@@ -35683,9 +36046,9 @@ configure-stage4-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4790,7 +4736,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35704,9 +36075,9 @@ +@@ -35714,9 +36077,9 @@ configure-stageprofile-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4802,7 +4748,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35735,9 +36106,9 @@ +@@ -35745,9 +36108,9 @@ configure-stagefeedback-zlib: s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \ $(HOST_EXPORTS) \ @@ -4814,7 +4760,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \ cd $(HOST_SUBDIR)/zlib || exit 1; \ -@@ -35772,7 +36143,8 @@ +@@ -35782,7 +36145,8 @@ all-zlib: configure-zlib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/zlib && \ @@ -4824,7 +4770,7 @@ Index: gcc-4.3.3/Makefile.in @endif zlib -@@ -35791,8 +36163,11 @@ +@@ -35801,8 +36165,11 @@ all-stage1-zlib: configure-stage1-zlib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4838,7 +4784,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-zlib) maybe-clean-stage1-zlib: clean-stage1-zlib -@@ -35805,7 +36180,7 @@ +@@ -35815,7 +36182,7 @@ clean-stage1-zlib: $(MAKE) stage1-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4847,7 +4793,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif zlib-bootstrap -@@ -35825,8 +36200,11 @@ +@@ -35835,8 +36202,11 @@ all-stage2-zlib: configure-stage2-zlib $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4861,7 +4807,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-zlib) maybe-clean-stage2-zlib: clean-stage2-zlib -@@ -35839,7 +36217,7 @@ +@@ -35849,7 +36219,7 @@ clean-stage2-zlib: $(MAKE) stage2-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4870,7 +4816,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -35860,8 +36238,11 @@ +@@ -35870,8 +36240,11 @@ all-stageb2g0-zlib: configure-stageb2g0- $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4884,7 +4830,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-zlib) maybe-clean-stageb2g0-zlib: clean-stageb2g0-zlib -@@ -35874,7 +36255,7 @@ +@@ -35884,7 +36257,7 @@ clean-stageb2g0-zlib: $(MAKE) stageb2g0-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4893,7 +4839,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -35895,8 +36276,11 @@ +@@ -35905,8 +36278,11 @@ all-stage3-zlib: configure-stage3-zlib $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4907,7 +4853,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-zlib) maybe-clean-stage3-zlib: clean-stage3-zlib -@@ -35909,7 +36293,7 @@ +@@ -35919,7 +36295,7 @@ clean-stage3-zlib: $(MAKE) stage3-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4916,7 +4862,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -35930,8 +36314,11 @@ +@@ -35940,8 +36316,11 @@ all-stageb3g2-zlib: configure-stageb3g2- $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4930,7 +4876,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-zlib) maybe-clean-stageb3g2-zlib: clean-stageb3g2-zlib -@@ -35944,7 +36331,7 @@ +@@ -35954,7 +36333,7 @@ clean-stageb3g2-zlib: $(MAKE) stageb3g2-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4939,7 +4885,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -35965,8 +36352,11 @@ +@@ -35975,8 +36354,11 @@ all-stage4-zlib: configure-stage4-zlib $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4953,7 +4899,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-zlib) maybe-clean-stage4-zlib: clean-stage4-zlib -@@ -35979,7 +36369,7 @@ +@@ -35989,7 +36371,7 @@ clean-stage4-zlib: $(MAKE) stage4-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4962,7 +4908,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -36000,8 +36390,11 @@ +@@ -36010,8 +36392,11 @@ all-stageprofile-zlib: configure-stagepr $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4976,7 +4922,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-zlib) maybe-clean-stageprofile-zlib: clean-stageprofile-zlib -@@ -36014,7 +36407,7 @@ +@@ -36024,7 +36409,7 @@ clean-stageprofile-zlib: $(MAKE) stageprofile-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -4985,7 +4931,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -36035,8 +36428,11 @@ +@@ -36045,8 +36430,11 @@ all-stagefeedback-zlib: configure-stagef $(HOST_EXPORTS) \ $(POSTSTAGE1_HOST_EXPORTS) \ cd $(HOST_SUBDIR)/zlib && \ @@ -4999,7 +4945,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-zlib) maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib -@@ -36049,7 +36445,7 @@ +@@ -36059,7 +36447,7 @@ clean-stagefeedback-zlib: $(MAKE) stagefeedback-start; \ fi; \ cd $(HOST_SUBDIR)/zlib && \ @@ -5008,7 +4954,7 @@ Index: gcc-4.3.3/Makefile.in $(POSTSTAGE1_FLAGS_TO_PASS) \ clean @endif zlib-bootstrap -@@ -36451,7 +36847,8 @@ +@@ -36461,7 +36849,8 @@ all-gdb: configure-gdb s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gdb && \ @@ -5018,7 +4964,7 @@ Index: gcc-4.3.3/Makefile.in @endif gdb -@@ -36875,7 +37272,8 @@ +@@ -36885,7 +37274,8 @@ all-expect: configure-expect s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/expect && \ @@ -5028,7 +4974,7 @@ Index: gcc-4.3.3/Makefile.in @endif expect -@@ -37299,7 +37697,8 @@ +@@ -37309,7 +37699,8 @@ all-guile: configure-guile s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/guile && \ @@ -5038,7 +4984,7 @@ Index: gcc-4.3.3/Makefile.in @endif guile -@@ -37723,7 +38122,8 @@ +@@ -37733,7 +38124,8 @@ all-tk: configure-tk s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/tk && \ @@ -5048,7 +4994,7 @@ Index: gcc-4.3.3/Makefile.in @endif tk -@@ -38147,7 +38547,8 @@ +@@ -38157,7 +38549,8 @@ all-libtermcap: configure-libtermcap s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/libtermcap && \ @@ -5058,7 +5004,7 @@ Index: gcc-4.3.3/Makefile.in @endif libtermcap -@@ -38505,7 +38906,8 @@ +@@ -38515,7 +38908,8 @@ all-utils: configure-utils s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/utils && \ @@ -5068,7 +5014,7 @@ Index: gcc-4.3.3/Makefile.in @endif utils -@@ -38923,7 +39325,8 @@ +@@ -38933,7 +39327,8 @@ all-gnattools: configure-gnattools s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(HOST_EXPORTS) \ (cd $(HOST_SUBDIR)/gnattools && \ @@ -5078,7 +5024,7 @@ Index: gcc-4.3.3/Makefile.in @endif gnattools -@@ -39368,7 +39771,8 @@ +@@ -39378,7 +39773,8 @@ all-target-libstdc++-v3: configure-targe s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \ @@ -5088,7 +5034,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libstdc++-v3 -@@ -39809,7 +40213,8 @@ +@@ -39819,7 +40215,8 @@ all-target-libmudflap: configure-target- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libmudflap && \ @@ -5098,7 +5044,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libmudflap -@@ -40250,7 +40655,8 @@ +@@ -40260,7 +40657,8 @@ all-target-libssp: configure-target-libs s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libssp && \ @@ -5108,7 +5054,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libssp -@@ -40691,7 +41097,8 @@ +@@ -40701,7 +41099,8 @@ all-target-newlib: configure-target-newl s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/newlib && \ @@ -5118,7 +5064,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-newlib -@@ -41137,9 +41544,9 @@ +@@ -41147,9 +41546,9 @@ configure-stage1-target-libgcc: mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \ fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ @@ -5131,7 +5077,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 1 in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41180,9 +41587,9 @@ +@@ -41190,9 +41589,9 @@ configure-stage2-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5144,7 +5090,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 2 in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41223,9 +41630,9 @@ +@@ -41233,9 +41632,9 @@ configure-stageb2g0-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5157,7 +5103,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b2g0 in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41266,9 +41673,9 @@ +@@ -41276,9 +41675,9 @@ configure-stage3-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5170,7 +5116,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 3 in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41309,9 +41716,9 @@ +@@ -41319,9 +41718,9 @@ configure-stageb3g2-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5183,7 +5129,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage b3g2 in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41352,9 +41759,9 @@ +@@ -41362,9 +41761,9 @@ configure-stage4-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5196,7 +5142,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage 4 in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41395,9 +41802,9 @@ +@@ -41405,9 +41804,9 @@ configure-stageprofile-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5209,7 +5155,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage profile in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41438,9 +41845,9 @@ +@@ -41448,9 +41847,9 @@ configure-stagefeedback-target-libgcc: fi; \ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \ $(NORMAL_TARGET_EXPORTS) \ @@ -5222,7 +5168,7 @@ Index: gcc-4.3.3/Makefile.in echo Configuring stage feedback in $(TARGET_SUBDIR)/libgcc ; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \ cd $(TARGET_SUBDIR)/libgcc || exit 1; \ -@@ -41475,7 +41882,8 @@ +@@ -41485,7 +41884,8 @@ all-target-libgcc: configure-target-libg s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libgcc && \ @@ -5232,7 +5178,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libgcc -@@ -41494,8 +41902,11 @@ +@@ -41504,8 +41904,11 @@ all-stage1-target-libgcc: configure-stag s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5246,7 +5192,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage1-target-libgcc) maybe-clean-stage1-target-libgcc: clean-stage1-target-libgcc -@@ -41508,7 +41919,7 @@ +@@ -41518,7 +41921,7 @@ clean-stage1-target-libgcc: $(MAKE) stage1-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5255,7 +5201,7 @@ Index: gcc-4.3.3/Makefile.in clean @endif target-libgcc-bootstrap -@@ -41528,8 +41939,11 @@ +@@ -41538,8 +41941,11 @@ all-stage2-target-libgcc: configure-stag $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5269,7 +5215,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage2-target-libgcc) maybe-clean-stage2-target-libgcc: clean-stage2-target-libgcc -@@ -41542,7 +41956,7 @@ +@@ -41552,7 +41958,7 @@ clean-stage2-target-libgcc: $(MAKE) stage2-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5278,7 +5224,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -41563,8 +41977,11 @@ +@@ -41573,8 +41979,11 @@ all-stageb2g0-target-libgcc: configure-s $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5292,7 +5238,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb2g0-target-libgcc) maybe-clean-stageb2g0-target-libgcc: clean-stageb2g0-target-libgcc -@@ -41577,7 +41994,7 @@ +@@ -41587,7 +41996,7 @@ clean-stageb2g0-target-libgcc: $(MAKE) stageb2g0-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5301,7 +5247,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -41598,8 +42015,11 @@ +@@ -41608,8 +42017,11 @@ all-stage3-target-libgcc: configure-stag $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5315,7 +5261,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage3-target-libgcc) maybe-clean-stage3-target-libgcc: clean-stage3-target-libgcc -@@ -41612,7 +42032,7 @@ +@@ -41622,7 +42034,7 @@ clean-stage3-target-libgcc: $(MAKE) stage3-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5324,7 +5270,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -41633,8 +42053,11 @@ +@@ -41643,8 +42055,11 @@ all-stageb3g2-target-libgcc: configure-s $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5338,7 +5284,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageb3g2-target-libgcc) maybe-clean-stageb3g2-target-libgcc: clean-stageb3g2-target-libgcc -@@ -41647,7 +42070,7 @@ +@@ -41657,7 +42072,7 @@ clean-stageb3g2-target-libgcc: $(MAKE) stageb3g2-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5347,7 +5293,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -41668,8 +42091,11 @@ +@@ -41678,8 +42093,11 @@ all-stage4-target-libgcc: configure-stag $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5361,7 +5307,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stage4-target-libgcc) maybe-clean-stage4-target-libgcc: clean-stage4-target-libgcc -@@ -41682,7 +42108,7 @@ +@@ -41692,7 +42110,7 @@ clean-stage4-target-libgcc: $(MAKE) stage4-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5370,7 +5316,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -41703,8 +42129,11 @@ +@@ -41713,8 +42131,11 @@ all-stageprofile-target-libgcc: configur $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5384,7 +5330,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stageprofile-target-libgcc) maybe-clean-stageprofile-target-libgcc: clean-stageprofile-target-libgcc -@@ -41717,7 +42146,7 @@ +@@ -41727,7 +42148,7 @@ clean-stageprofile-target-libgcc: $(MAKE) stageprofile-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5393,7 +5339,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -41738,8 +42167,11 @@ +@@ -41748,8 +42169,11 @@ all-stagefeedback-target-libgcc: configu $(NORMAL_TARGET_EXPORTS) \ \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5407,7 +5353,7 @@ Index: gcc-4.3.3/Makefile.in $(TARGET-stagefeedback-target-libgcc) maybe-clean-stagefeedback-target-libgcc: clean-stagefeedback-target-libgcc -@@ -41752,7 +42184,7 @@ +@@ -41762,7 +42186,7 @@ clean-stagefeedback-target-libgcc: $(MAKE) stagefeedback-start; \ fi; \ cd $(TARGET_SUBDIR)/libgcc && \ @@ -5416,7 +5362,7 @@ Index: gcc-4.3.3/Makefile.in \ clean @endif target-libgcc-bootstrap -@@ -42191,7 +42623,8 @@ +@@ -42201,7 +42625,8 @@ all-target-libgfortran: configure-target s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libgfortran && \ @@ -5426,7 +5372,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libgfortran -@@ -42632,7 +43065,8 @@ +@@ -42642,7 +43067,8 @@ all-target-libobjc: configure-target-lib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libobjc && \ @@ -5436,7 +5382,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libobjc -@@ -43073,7 +43507,8 @@ +@@ -43083,7 +43509,8 @@ all-target-libtermcap: configure-target- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libtermcap && \ @@ -5446,7 +5392,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libtermcap -@@ -43449,7 +43884,8 @@ +@@ -43459,7 +43886,8 @@ all-target-winsup: configure-target-wins s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/winsup && \ @@ -5456,7 +5402,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-winsup -@@ -43890,7 +44326,8 @@ +@@ -43900,7 +44328,8 @@ all-target-libgloss: configure-target-li s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libgloss && \ @@ -5466,7 +5412,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libgloss -@@ -44326,7 +44763,8 @@ +@@ -44336,7 +44765,8 @@ all-target-libiberty: configure-target-l s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libiberty && \ @@ -5476,7 +5422,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libiberty -@@ -44767,7 +45205,8 @@ +@@ -44777,7 +45207,8 @@ all-target-gperf: configure-target-gperf s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/gperf && \ @@ -5486,7 +5432,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-gperf -@@ -45208,7 +45647,8 @@ +@@ -45218,7 +45649,8 @@ all-target-examples: configure-target-ex s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/examples && \ @@ -5496,7 +5442,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-examples -@@ -45639,7 +46079,8 @@ +@@ -45649,7 +46081,8 @@ all-target-libffi: configure-target-libf s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libffi && \ @@ -5506,7 +5452,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libffi -@@ -46080,7 +46521,8 @@ +@@ -46090,7 +46523,8 @@ all-target-libjava: configure-target-lib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(RAW_CXX_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libjava && \ @@ -5516,7 +5462,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libjava -@@ -46521,7 +46963,8 @@ +@@ -46531,7 +46965,8 @@ all-target-zlib: configure-target-zlib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/zlib && \ @@ -5526,7 +5472,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-zlib -@@ -46962,7 +47405,8 @@ +@@ -46972,7 +47407,8 @@ all-target-boehm-gc: configure-target-bo s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/boehm-gc && \ @@ -5536,7 +5482,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-boehm-gc -@@ -47403,7 +47847,8 @@ +@@ -47413,7 +47849,8 @@ all-target-qthreads: configure-target-qt s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/qthreads && \ @@ -5546,7 +5492,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-qthreads -@@ -47844,7 +48289,8 @@ +@@ -47854,7 +48291,8 @@ all-target-rda: configure-target-rda s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/rda && \ @@ -5556,7 +5502,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-rda -@@ -48285,7 +48731,8 @@ +@@ -48295,7 +48733,8 @@ all-target-libada: configure-target-liba s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libada && \ @@ -5566,7 +5512,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libada -@@ -48726,7 +49173,8 @@ +@@ -48736,7 +49175,8 @@ all-target-libgomp: configure-target-lib s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(NORMAL_TARGET_EXPORTS) \ (cd $(TARGET_SUBDIR)/libgomp && \ @@ -5576,7 +5522,7 @@ Index: gcc-4.3.3/Makefile.in @endif target-libgomp -@@ -49359,7 +49807,7 @@ +@@ -49369,7 +49809,7 @@ stage1-end:: # Bubble a bug fix through all the stages up to stage 1. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5585,7 +5531,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stage1-bubble stage1-bubble:: @r=`${PWD_COMMAND}`; export r; \ -@@ -49570,7 +50018,7 @@ +@@ -49580,7 +50020,7 @@ stage2-end:: # Bubble a bug fix through all the stages up to stage 2. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5594,7 +5540,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stage2-bubble stage2-bubble:: stage1-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -49802,7 +50250,7 @@ +@@ -49812,7 +50252,7 @@ stageb2g0-end:: # Bubble a bug fix through all the stages up to stage b2g0. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5603,7 +5549,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stageb2g0-bubble stageb2g0-bubble:: stage1-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -50034,7 +50482,7 @@ +@@ -50044,7 +50484,7 @@ stage3-end:: # Bubble a bug fix through all the stages up to stage 3. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5612,7 +5558,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stage3-bubble stage3-bubble:: stage2-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -50320,7 +50768,7 @@ +@@ -50330,7 +50770,7 @@ stageb3g2-end:: # Bubble a bug fix through all the stages up to stage b3g2. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5621,7 +5567,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stageb3g2-bubble stageb3g2-bubble:: stageb2g0-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -50606,7 +51054,7 @@ +@@ -50616,7 +51056,7 @@ stage4-end:: # Bubble a bug fix through all the stages up to stage 4. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5630,7 +5576,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stage4-bubble stage4-bubble:: stage3-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -50881,7 +51329,7 @@ +@@ -50891,7 +51331,7 @@ stageprofile-end:: # Bubble a bug fix through all the stages up to stage profile. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5639,7 +5585,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stageprofile-bubble stageprofile-bubble:: stage1-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -51092,7 +51540,7 @@ +@@ -51102,7 +51542,7 @@ stagefeedback-end:: # Bubble a bug fix through all the stages up to stage feedback. They are # remade, but not reconfigured. The next stage (if any) will not be @@ -5648,7 +5594,7 @@ Index: gcc-4.3.3/Makefile.in .PHONY: stagefeedback-bubble stagefeedback-bubble:: stageprofile-bubble @r=`${PWD_COMMAND}`; export r; \ -@@ -51175,10 +51623,10 @@ +@@ -51185,10 +51625,10 @@ stage_current: @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi .PHONY: restrap @@ -5661,7 +5607,7 @@ Index: gcc-4.3.3/Makefile.in @endif gcc-bootstrap # -------------------------------------- -@@ -52004,7 +52452,8 @@ +@@ -52014,7 +52454,8 @@ config.status: configure # Rebuilding configure. AUTOCONF = autoconf @@ -5673,18 +5619,18 @@ Index: gcc-4.3.3/Makefile.in # ------------------------------ Index: gcc-4.3.3/configure =================================================================== ---- gcc-4.3.3.orig/configure 2008-02-01 20:29:30.000000000 -0700 -+++ gcc-4.3.3/configure 2009-04-29 18:03:50.204611816 -0700 -@@ -272,7 +272,7 @@ +--- gcc-4.3.3.orig/configure 2010-05-16 23:25:38.000000000 -0700 ++++ gcc-4.3.3/configure 2010-05-16 23:26:54.433023190 -0700 +@@ -272,7 +272,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="move-if-change" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag' # Initialize some variables set by options. -@@ -5147,6 +5147,38 @@ +@@ -5147,6 +5147,38 @@ else fi; @@ -5723,7 +5669,7 @@ Index: gcc-4.3.3/configure # Handle --with-headers=XXX. If the value is not "yes", the contents of # the named directory are copied to $(tooldir)/sys-include. if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then -@@ -12825,6 +12857,8 @@ +@@ -12827,6 +12859,8 @@ s,@gmpinc@,$gmpinc,;t t s,@stage1_languages@,$stage1_languages,;t t s,@SYSROOT_CFLAGS_FOR_TARGET@,$SYSROOT_CFLAGS_FOR_TARGET,;t t s,@DEBUG_PREFIX_CFLAGS_FOR_TARGET@,$DEBUG_PREFIX_CFLAGS_FOR_TARGET,;t t @@ -5735,8 +5681,8 @@ Index: gcc-4.3.3/configure Index: gcc-4.3.3/libiberty/Makefile.in =================================================================== --- gcc-4.3.3.orig/libiberty/Makefile.in 2007-07-24 23:26:45.000000000 -0700 -+++ gcc-4.3.3/libiberty/Makefile.in 2009-04-29 18:03:50.212612133 -0700 -@@ -60,7 +60,7 @@ ++++ gcc-4.3.3/libiberty/Makefile.in 2010-05-16 23:26:54.433023190 -0700 +@@ -60,7 +60,7 @@ RANLIB = @RANLIB@ MAKEINFO = @MAKEINFO@ PERL = @PERL@ @@ -5745,7 +5691,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in MAKEOVERRIDES = -@@ -143,10 +143,11 @@ +@@ -143,10 +143,11 @@ CFILES = alloca.c argv.c asprintf.c atex pex-unix.c pex-win32.c \ physmem.c putenv.c \ random.c regex.c rename.c rindex.c \ @@ -5761,7 +5707,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in tmpnam.c \ unlink-if-ordinary.c \ vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \ -@@ -156,7 +157,8 @@ +@@ -156,7 +157,8 @@ CFILES = alloca.c argv.c asprintf.c atex # These are always included in the library. The first four are listed # first and by compile time to optimize parallel builds. @@ -5771,7 +5717,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in ./alloca.o ./argv.o \ ./choose-temp.o ./concat.o ./cp-demint.o \ ./dyn-string.o \ -@@ -473,13 +475,13 @@ +@@ -473,13 +475,13 @@ stamp-h: $(srcdir)/config.in config.stat config.status: $(srcdir)/configure $(SHELL) ./config.status --recheck @@ -5787,7 +5733,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in @subdirs='$(SUBDIRS)'; \ target=`echo $@ | sed -e 's/-subdir//'`; \ for dir in $$subdirs ; do \ -@@ -496,40 +498,41 @@ +@@ -496,40 +498,41 @@ $(CONFIGURED_OFILES): stamp-picdir # The dependencies in the remainder of this file are automatically # generated by "make maint-deps". Manual edits will be lost. @@ -5835,7 +5781,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/basename.c -o pic/$@; \ -@@ -548,7 +551,7 @@ +@@ -548,7 +551,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/bcopy.c $(OUTPUT_OPTION) @@ -5844,7 +5790,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/bsearch.c -o pic/$@; \ else true; fi -@@ -566,20 +569,21 @@ +@@ -566,20 +569,21 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/calloc.c $(OUTPUT_OPTION) @@ -5869,7 +5815,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/concat.c -o pic/$@; \ else true; fi -@@ -591,7 +595,7 @@ +@@ -591,7 +595,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/copysign.c $(OUTPUT_OPTION) @@ -5878,7 +5824,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(srcdir)/cp-demangle.h $(INCDIR)/demangle.h \ $(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ -@@ -599,7 +603,7 @@ +@@ -599,7 +603,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/cp-demangle.c $(OUTPUT_OPTION) @@ -5887,7 +5833,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(srcdir)/cp-demangle.h $(INCDIR)/demangle.h \ $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ -@@ -607,7 +611,7 @@ +@@ -607,7 +611,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/cp-demint.c $(OUTPUT_OPTION) @@ -5896,7 +5842,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ -@@ -615,14 +619,14 @@ +@@ -615,14 +619,14 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/cplus-dem.c $(OUTPUT_OPTION) @@ -5913,7 +5859,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/fdmatch.c -o pic/$@; \ -@@ -635,93 +639,94 @@ +@@ -635,93 +639,94 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/ffs.c $(OUTPUT_OPTION) @@ -6024,7 +5970,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/hex.c -o pic/$@; \ -@@ -740,7 +745,7 @@ +@@ -740,7 +745,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/insque.c $(OUTPUT_OPTION) @@ -6033,7 +5979,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ -@@ -748,28 +753,28 @@ +@@ -748,28 +753,28 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/lbasename.c $(OUTPUT_OPTION) @@ -6066,7 +6012,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/md5.c -o pic/$@; \ else true; fi -@@ -811,7 +816,7 @@ +@@ -811,7 +816,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/memset.c $(OUTPUT_OPTION) @@ -6075,7 +6021,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/mkstemps.c -o pic/$@; \ else true; fi -@@ -823,41 +828,41 @@ +@@ -823,41 +828,41 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/msdos.c $(OUTPUT_OPTION) @@ -6123,7 +6069,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h $(srcdir)/pex-common.h \ $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ -@@ -865,42 +870,42 @@ +@@ -865,42 +870,42 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/pex-msdos.c $(OUTPUT_OPTION) @@ -6172,7 +6118,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/putenv.c -o pic/$@; \ else true; fi -@@ -912,14 +917,14 @@ +@@ -912,14 +917,14 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/random.c $(OUTPUT_OPTION) @@ -6189,7 +6135,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/rename.c -o pic/$@; \ else true; fi -@@ -938,7 +943,7 @@ +@@ -938,7 +943,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/safe-ctype.c $(OUTPUT_OPTION) @@ -6198,7 +6144,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/setenv.c -o pic/$@; \ else true; fi -@@ -956,20 +961,21 @@ +@@ -956,20 +961,21 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/snprintf.c $(OUTPUT_OPTION) @@ -6223,7 +6169,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/splay-tree.c -o pic/$@; \ -@@ -1006,7 +1012,7 @@ +@@ -1006,7 +1012,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/strdup.c $(OUTPUT_OPTION) @@ -6232,7 +6178,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/strerror.c -o pic/$@; \ -@@ -1037,7 +1043,7 @@ +@@ -1037,7 +1043,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/strrchr.c $(OUTPUT_OPTION) @@ -6241,7 +6187,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/strsignal.c -o pic/$@; \ -@@ -1056,13 +1062,13 @@ +@@ -1056,13 +1062,13 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/strtod.c $(OUTPUT_OPTION) @@ -6257,7 +6203,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/strtoul.c -o pic/$@; \ -@@ -1082,14 +1088,14 @@ +@@ -1082,14 +1088,14 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/tmpnam.c $(OUTPUT_OPTION) @@ -6274,7 +6220,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/vasprintf.c -o pic/$@; \ -@@ -1114,7 +1120,7 @@ +@@ -1114,7 +1120,7 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/vprintf.c $(OUTPUT_OPTION) @@ -6283,7 +6229,7 @@ Index: gcc-4.3.3/libiberty/Makefile.in $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/vsnprintf.c -o pic/$@; \ -@@ -1127,54 +1133,54 @@ +@@ -1127,54 +1133,54 @@ $(CONFIGURED_OFILES): stamp-picdir else true; fi $(COMPILE.c) $(srcdir)/vsprintf.c $(OUTPUT_OPTION) @@ -6349,8 +6295,8 @@ Index: gcc-4.3.3/libiberty/Makefile.in Index: gcc-4.3.3/libiberty/configure =================================================================== --- gcc-4.3.3.orig/libiberty/configure 2007-07-17 10:52:28.000000000 -0700 -+++ gcc-4.3.3/libiberty/configure 2009-04-29 18:03:50.224612238 -0700 -@@ -309,7 +309,7 @@ ++++ gcc-4.3.3/libiberty/configure 2010-05-16 23:26:54.433023190 -0700 +@@ -309,7 +309,7 @@ ac_includes_default="\ # include <unistd.h> #endif" @@ -6359,7 +6305,7 @@ Index: gcc-4.3.3/libiberty/configure ac_subst_files='host_makefile_frag' # Initialize some variables set by options. -@@ -3699,9 +3699,7 @@ +@@ -3699,9 +3699,7 @@ case "${host}" in esac if [ -n "${frag}" ]; then @@ -6370,7 +6316,7 @@ Index: gcc-4.3.3/libiberty/configure fi # If they didn't specify --enable-shared, don't generate shared libs. -@@ -3712,34 +3710,35 @@ +@@ -3712,34 +3710,35 @@ case "${enable_shared}" in *) shared=yes ;; esac if [ "${shared}" = "yes" ]; then @@ -6425,7 +6371,7 @@ Index: gcc-4.3.3/libiberty/configure # record if we want to build shared libs. if [ "${shared}" = "yes" ]; then -@@ -9671,6 +9670,7 @@ +@@ -9671,6 +9670,7 @@ s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t @@ -6436,8 +6382,8 @@ Index: gcc-4.3.3/libiberty/configure Index: gcc-4.3.3/libiberty/configure.ac =================================================================== --- gcc-4.3.3.orig/libiberty/configure.ac 2007-07-17 10:52:28.000000000 -0700 -+++ gcc-4.3.3/libiberty/configure.ac 2009-04-29 18:03:50.224612238 -0700 -@@ -187,9 +187,7 @@ ++++ gcc-4.3.3/libiberty/configure.ac 2010-05-16 23:26:54.433023190 -0700 +@@ -187,9 +187,7 @@ case "${host}" in esac if [[ -n "${frag}" ]]; then @@ -6448,7 +6394,7 @@ Index: gcc-4.3.3/libiberty/configure.ac fi # If they didn't specify --enable-shared, don't generate shared libs. -@@ -200,34 +198,35 @@ +@@ -200,34 +198,35 @@ case "${enable_shared}" in *) shared=yes ;; esac if [[ "${shared}" = "yes" ]]; then @@ -6503,189 +6449,3 @@ Index: gcc-4.3.3/libiberty/configure.ac # record if we want to build shared libs. if [[ "${shared}" = "yes" ]]; then -Index: gcc-4.3.3/gcc/Makefile.in -=================================================================== ---- gcc-4.3.3.orig/gcc/Makefile.in 2009-04-29 17:55:20.000000000 -0700 -+++ gcc-4.3.3/gcc/Makefile.in 2009-04-29 18:03:50.236612117 -0700 -@@ -689,7 +689,7 @@ - BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE - - # Native linker and preprocessor flags. For x-fragment overrides. --BUILD_LDFLAGS=$(LDFLAGS) -+BUILD_LDFLAGS=@BUILD_LDFLAGS@ - BUILD_CPPFLAGS=$(ALL_CPPFLAGS) - - # Actual name to use when installing a native compiler. -Index: gcc-4.3.3/gcc/configure -=================================================================== ---- gcc-4.3.3.orig/gcc/configure 2009-04-29 17:55:27.000000000 -0700 -+++ gcc-4.3.3/gcc/configure 2009-04-29 18:03:50.256611768 -0700 -@@ -458,7 +458,7 @@ - # include <unistd.h> - #endif" - --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' - ac_subst_files='language_hooks' - - # Initialize some variables set by options. -@@ -12972,6 +12972,7 @@ - esac - saved_CFLAGS="${CFLAGS}" - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ -+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \ - CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias -@@ -13469,6 +13470,7 @@ - # These are the normal (build=host) settings: - CC_FOR_BUILD='$(CC)' - BUILD_CFLAGS='$(ALL_CFLAGS)' -+BUILD_LDFLAGS='$(LDFLAGS)' - STMP_FIXINC=stmp-fixinc - - # Possibly disable fixproto, on a per-target basis. -@@ -13486,6 +13488,7 @@ - if test x$build != x$host || test "x$coverage_flags" != x - then - BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' -+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' - - if test "x$TARGET_SYSTEM_ROOT" = x; then - if test "x$STMP_FIXPROTO" != x; then -@@ -14064,13 +14067,13 @@ - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:14067: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:14070: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:14070: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:14073: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:14073: output\"" >&5) -+ (eval echo "\"\$as_me:14076: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -15125,7 +15128,7 @@ - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 15128 "configure"' > conftest.$ac_ext -+ echo '#line 15131 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -15745,11 +15748,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:15748: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:15751: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:15752: \$? = $ac_status" >&5 -+ echo "$as_me:15755: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -16067,11 +16070,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16070: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16073: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:16074: \$? = $ac_status" >&5 -+ echo "$as_me:16077: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -16172,11 +16175,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16175: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16178: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:16179: \$? = $ac_status" >&5 -+ echo "$as_me:16182: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -16227,11 +16230,11 @@ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16230: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:16234: \$? = $ac_status" >&5 -+ echo "$as_me:16237: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -19024,7 +19027,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 19027 "configure" -+#line 19030 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -19124,7 +19127,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 19127 "configure" -+#line 19130 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -23934,6 +23937,7 @@ - s,@inhibit_libc@,$inhibit_libc,;t t - s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t - s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t -+s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t - s,@STMP_FIXINC@,$STMP_FIXINC,;t t - s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t - s,@collect2@,$collect2,;t t -Index: gcc-4.3.3/gcc/configure.ac -=================================================================== ---- gcc-4.3.3.orig/gcc/configure.ac 2009-04-29 17:55:27.000000000 -0700 -+++ gcc-4.3.3/gcc/configure.ac 2009-04-29 18:03:50.264611238 -0700 -@@ -1480,6 +1480,7 @@ - esac - saved_CFLAGS="${CFLAGS}" - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ -+ LDFLAGS="${LDFLAGS_FOR_BUILD}" \ - CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias -@@ -1776,6 +1777,7 @@ - # These are the normal (build=host) settings: - CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) - BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) -+BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) - STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) - - # Possibly disable fixproto, on a per-target basis. -@@ -1793,6 +1795,7 @@ - if test x$build != x$host || test "x$coverage_flags" != x - then - BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' -+ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' - - if test "x$TARGET_SYSTEM_ROOT" = x; then - if test "x$STMP_FIXPROTO" != x; then diff --git a/recipes/gcc/gcc-4.3.3/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch b/recipes/gcc/gcc-4.3.3/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch new file mode 100644 index 0000000000..6849d46cd4 --- /dev/null +++ b/recipes/gcc/gcc-4.3.3/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch @@ -0,0 +1,52 @@ +--- gcc-4.4-20090519/gcc/config/arm/linux-eabi.h.~1~ 2007-11-08 14:44:09.000000000 +0100 ++++ gcc-4.4-20090519/gcc/config/arm/linux-eabi.h 2009-05-22 20:38:51.000000000 +0200 +@@ -72,6 +72,49 @@ + do not use -lfloat. */ + #undef LIBGCC_SPEC + ++/* Some symbols are only in the static libgcc. Override REAL_LIBGCC_SPEC ++ to always pass -lgcc to the linker, even for --shared-libgcc, otherwise ++ shared libraries break. */ ++#ifdef ENABLE_SHARED_LIBGCC ++ ++#ifndef USE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 0 ++#endif ++ ++#if USE_LD_AS_NEEDED ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed} \ ++ %{shared-libgcc:-lgcc_s -lgcc}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared: \ ++ %{!shared-libgcc:-lgcc -lgcc_eh} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" ++#endif ++ ++#ifdef LINK_EH_SPEC ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared: \ ++ %{!shared-libgcc:-lgcc} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared:-lgcc_s -lgcc}" /* always append -lgcc */ ++#endif ++ ++#define REAL_LIBGCC_SPEC " \ ++ %{static|static-libgcc:-lgcc -lgcc_eh} \ ++ %{!static:%{!static-libgcc: \ ++ "REAL_LIBGCC_SPEC_1" \ ++ "REAL_LIBGCC_SPEC_2" \ ++ }}" ++ ++#else /* !ENABLE_SHARED_LIBGCC */ ++ ++#define REAL_LIBGCC_SPEC " -lgcc " ++ ++#endif /* !ENABLE_SHARED_LIBGCC */ ++ + /* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ + #undef CLEAR_INSN_CACHE diff --git a/recipes/gcc/gcc-4.3.3/gcc-flags-for-build.patch b/recipes/gcc/gcc-4.3.3/gcc-flags-for-build.patch index 43a9d73dcf..554b94844a 100644 --- a/recipes/gcc/gcc-4.3.3/gcc-flags-for-build.patch +++ b/recipes/gcc/gcc-4.3.3/gcc-flags-for-build.patch @@ -1,8 +1,8 @@ -Index: gcc-4.3.2/Makefile.def +Index: gcc-4.3.3/Makefile.def =================================================================== ---- gcc-4.3.2.orig/Makefile.def 2008-08-28 18:21:19.000000000 -0700 -+++ gcc-4.3.2/Makefile.def 2008-08-28 18:21:41.000000000 -0700 -@@ -207,6 +207,7 @@ +--- gcc-4.3.3.orig/Makefile.def 2007-10-23 08:53:18.000000000 -0700 ++++ gcc-4.3.3/Makefile.def 2010-05-16 18:51:00.933014111 -0700 +@@ -207,6 +207,7 @@ flags_to_pass = { flag= target_alias ; } flags_to_pass = { flag= BISON ; }; flags_to_pass = { flag= CC_FOR_BUILD ; }; flags_to_pass = { flag= CFLAGS_FOR_BUILD ; }; @@ -10,52 +10,50 @@ Index: gcc-4.3.2/Makefile.def flags_to_pass = { flag= CXX_FOR_BUILD ; }; flags_to_pass = { flag= EXPECT ; }; flags_to_pass = { flag= FLEX ; }; -Index: gcc-4.3.2/gcc/Makefile.in +Index: gcc-4.3.3/gcc/Makefile.in =================================================================== ---- gcc-4.3.2.orig/gcc/Makefile.in 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/gcc/Makefile.in 2008-08-28 18:21:41.000000000 -0700 -@@ -673,7 +673,7 @@ +--- gcc-4.3.3.orig/gcc/Makefile.in 2010-05-16 17:27:08.000000000 -0700 ++++ gcc-4.3.3/gcc/Makefile.in 2010-05-16 18:52:35.760534304 -0700 +@@ -690,7 +690,7 @@ BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR # Native linker and preprocessor flags. For x-fragment overrides. - BUILD_LDFLAGS=@BUILD_LDFLAGS@ + BUILD_LDFLAGS=$(LDFLAGS) -BUILD_CPPFLAGS=$(ALL_CPPFLAGS) +BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS) # Actual name to use when installing a native compiler. GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') -Index: gcc-4.3.2/gcc/configure.ac +Index: gcc-4.3.3/gcc/configure.ac =================================================================== ---- gcc-4.3.2.orig/gcc/configure.ac 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/gcc/configure.ac 2008-08-28 18:21:41.000000000 -0700 -@@ -1775,10 +1775,11 @@ +--- gcc-4.3.3.orig/gcc/configure.ac 2010-05-16 17:27:04.000000000 -0700 ++++ gcc-4.3.3/gcc/configure.ac 2010-05-16 18:57:15.600630389 -0700 +@@ -1774,9 +1774,10 @@ AC_SUBST(inhibit_libc) # Also, we cannot run fixincludes or fix-header. # These are the normal (build=host) settings: -CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) -BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) --BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) -STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) +CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) +BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) -+BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) +BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS) +STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) # Possibly disable fixproto, on a per-target basis. case ${use_fixproto} in -@@ -1796,6 +1797,7 @@ +@@ -1793,6 +1794,7 @@ AC_SUBST(STMP_FIXPROTO) + if test x$build != x$host || test "x$coverage_flags" != x then BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' - BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' + BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' if test "x$TARGET_SYSTEM_ROOT" = x; then if test "x$STMP_FIXPROTO" != x; then -Index: gcc-4.3.2/Makefile.in +Index: gcc-4.3.3/Makefile.in =================================================================== ---- gcc-4.3.2.orig/Makefile.in 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/Makefile.in 2008-08-28 18:21:41.000000000 -0700 -@@ -272,6 +272,7 @@ +--- gcc-4.3.3.orig/Makefile.in 2010-05-16 18:50:32.000000000 -0700 ++++ gcc-4.3.3/Makefile.in 2010-05-16 18:51:00.953026222 -0700 +@@ -256,6 +256,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ AS_FOR_BUILD = @AS_FOR_BUILD@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @@ -63,7 +61,7 @@ Index: gcc-4.3.2/Makefile.in CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ -@@ -502,6 +503,7 @@ +@@ -490,6 +491,7 @@ BASE_FLAGS_TO_PASS = \ "BISON=$(BISON)" \ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ @@ -71,148 +69,148 @@ Index: gcc-4.3.2/Makefile.in "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ "EXPECT=$(EXPECT)" \ "FLEX=$(FLEX)" \ -Index: gcc-4.3.2/gcc/configure +Index: gcc-4.3.3/gcc/configure =================================================================== ---- gcc-4.3.2.orig/gcc/configure 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/gcc/configure 2008-08-28 18:21:50.000000000 -0700 -@@ -458,7 +458,7 @@ +--- gcc-4.3.3.orig/gcc/configure 2010-05-16 17:27:04.000000000 -0700 ++++ gcc-4.3.3/gcc/configure 2010-05-16 19:01:39.473013538 -0700 +@@ -458,7 +458,7 @@ ac_includes_default="\ # include <unistd.h> #endif" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS BUILD_CPPFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_CPPFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ac_subst_files='language_hooks' # Initialize some variables set by options. -@@ -13471,6 +13471,7 @@ +@@ -13469,6 +13469,7 @@ fi + # These are the normal (build=host) settings: CC_FOR_BUILD='$(CC)' BUILD_CFLAGS='$(ALL_CFLAGS)' - BUILD_LDFLAGS='$(LDFLAGS)' +BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' STMP_FIXINC=stmp-fixinc # Possibly disable fixproto, on a per-target basis. -@@ -13489,6 +13490,7 @@ +@@ -13486,6 +13487,7 @@ esac + if test x$build != x$host || test "x$coverage_flags" != x then BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' - BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' + BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' if test "x$TARGET_SYSTEM_ROOT" = x; then if test "x$STMP_FIXPROTO" != x; then -@@ -14067,13 +14069,13 @@ +@@ -14064,13 +14066,13 @@ if test "${lt_cv_nm_interface+set}" = se else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:14070: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:14072: $ac_compile\"" >&5) +- (eval echo "\"\$as_me:14067: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:14069: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 -- (eval echo "\"\$as_me:14073: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:14075: $NM \\\"conftest.$ac_objext\\\"\"" >&5) +- (eval echo "\"\$as_me:14070: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:14072: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 -- (eval echo "\"\$as_me:14076: output\"" >&5) -+ (eval echo "\"\$as_me:14078: output\"" >&5) +- (eval echo "\"\$as_me:14073: output\"" >&5) ++ (eval echo "\"\$as_me:14075: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" -@@ -15128,7 +15130,7 @@ +@@ -15125,7 +15127,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. -- echo '#line 15131 "configure"' > conftest.$ac_ext -+ echo '#line 15133 "configure"' > conftest.$ac_ext +- echo '#line 15128 "configure"' > conftest.$ac_ext ++ echo '#line 15130 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? -@@ -15748,11 +15750,11 @@ +@@ -15745,11 +15747,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:15751: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:15753: $lt_compile\"" >&5) +- (eval echo "\"\$as_me:15748: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15750: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 -- echo "$as_me:15755: \$? = $ac_status" >&5 -+ echo "$as_me:15757: \$? = $ac_status" >&5 +- echo "$as_me:15752: \$? = $ac_status" >&5 ++ echo "$as_me:15754: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. -@@ -16070,11 +16072,11 @@ +@@ -16067,11 +16069,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16073: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16075: $lt_compile\"" >&5) +- (eval echo "\"\$as_me:16070: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16072: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 -- echo "$as_me:16077: \$? = $ac_status" >&5 -+ echo "$as_me:16079: \$? = $ac_status" >&5 +- echo "$as_me:16074: \$? = $ac_status" >&5 ++ echo "$as_me:16076: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. -@@ -16175,11 +16177,11 @@ +@@ -16172,11 +16174,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16178: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16180: $lt_compile\"" >&5) +- (eval echo "\"\$as_me:16175: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16177: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 -- echo "$as_me:16182: \$? = $ac_status" >&5 -+ echo "$as_me:16184: \$? = $ac_status" >&5 +- echo "$as_me:16179: \$? = $ac_status" >&5 ++ echo "$as_me:16181: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized -@@ -16230,11 +16232,11 @@ +@@ -16227,11 +16229,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:16235: $lt_compile\"" >&5) +- (eval echo "\"\$as_me:16230: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16232: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 -- echo "$as_me:16237: \$? = $ac_status" >&5 -+ echo "$as_me:16239: \$? = $ac_status" >&5 +- echo "$as_me:16234: \$? = $ac_status" >&5 ++ echo "$as_me:16236: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized -@@ -19027,7 +19029,7 @@ +@@ -19024,7 +19026,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF --#line 19030 "configure" -+#line 19032 "configure" +-#line 19027 "configure" ++#line 19029 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -@@ -19127,7 +19129,7 @@ +@@ -19124,7 +19126,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF --#line 19130 "configure" -+#line 19132 "configure" +-#line 19127 "configure" ++#line 19129 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -@@ -23938,6 +23940,7 @@ +@@ -23934,6 +23936,7 @@ s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR + s,@inhibit_libc@,$inhibit_libc,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t - s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t +s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t s,@STMP_FIXINC@,$STMP_FIXINC,;t t s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t s,@collect2@,$collect2,;t t -Index: gcc-4.3.2/Makefile.tpl +Index: gcc-4.3.3/Makefile.tpl =================================================================== ---- gcc-4.3.2.orig/Makefile.tpl 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/Makefile.tpl 2008-08-28 18:21:41.000000000 -0700 -@@ -275,6 +275,7 @@ +--- gcc-4.3.3.orig/Makefile.tpl 2010-05-16 18:49:57.000000000 -0700 ++++ gcc-4.3.3/Makefile.tpl 2010-05-16 18:51:00.980591667 -0700 +@@ -259,6 +259,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ AS_FOR_BUILD = @AS_FOR_BUILD@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @@ -220,20 +218,20 @@ Index: gcc-4.3.2/Makefile.tpl CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ -Index: gcc-4.3.2/configure +Index: gcc-4.3.3/configure =================================================================== ---- gcc-4.3.2.orig/configure 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/configure 2008-08-28 18:21:41.000000000 -0700 -@@ -272,7 +272,7 @@ +--- gcc-4.3.3.orig/configure 2010-05-16 17:27:05.700521719 -0700 ++++ gcc-4.3.3/configure 2010-05-16 19:02:27.520529425 -0700 +@@ -272,7 +272,7 @@ PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="move-if-change" --ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' -+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS' ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag' # Initialize some variables set by options. -@@ -5914,6 +5914,7 @@ +@@ -5882,6 +5882,7 @@ esac # our build compiler if desired. if test x"${build}" = x"${host}" ; then CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} @@ -241,7 +239,7 @@ Index: gcc-4.3.2/configure CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi -@@ -5991,6 +5992,7 @@ +@@ -5959,6 +5960,7 @@ done @@ -249,7 +247,7 @@ Index: gcc-4.3.2/configure # Generate default definitions for YACC, M4, LEX and other programs that run # on the build machine. These are used if the Makefile can't locate these # programs in objdir. -@@ -12874,6 +12876,7 @@ +@@ -12840,6 +12842,7 @@ s,@AR_FOR_BUILD@,$AR_FOR_BUILD,;t t s,@AS_FOR_BUILD@,$AS_FOR_BUILD,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t @@ -257,11 +255,11 @@ Index: gcc-4.3.2/configure s,@CXXFLAGS_FOR_BUILD@,$CXXFLAGS_FOR_BUILD,;t t s,@CXX_FOR_BUILD@,$CXX_FOR_BUILD,;t t s,@DLLTOOL_FOR_BUILD@,$DLLTOOL_FOR_BUILD,;t t -Index: gcc-4.3.2/configure.ac +Index: gcc-4.3.3/configure.ac =================================================================== ---- gcc-4.3.2.orig/configure.ac 2008-08-28 18:21:20.000000000 -0700 -+++ gcc-4.3.2/configure.ac 2008-08-28 18:21:41.000000000 -0700 -@@ -2425,6 +2425,7 @@ +--- gcc-4.3.3.orig/configure.ac 2010-05-16 17:27:05.000000000 -0700 ++++ gcc-4.3.3/configure.ac 2010-05-16 18:51:00.990613402 -0700 +@@ -2393,6 +2393,7 @@ esac # our build compiler if desired. if test x"${build}" = x"${host}" ; then CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} @@ -269,7 +267,7 @@ Index: gcc-4.3.2/configure.ac CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi -@@ -2489,6 +2490,7 @@ +@@ -2457,6 +2458,7 @@ AC_SUBST(AR_FOR_BUILD) AC_SUBST(AS_FOR_BUILD) AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) diff --git a/recipes/gcc/gcc-4.3.3/gcc-pr36218.patch b/recipes/gcc/gcc-4.3.3/gcc-pr36218.patch new file mode 100644 index 0000000000..f025327741 --- /dev/null +++ b/recipes/gcc/gcc-4.3.3/gcc-pr36218.patch @@ -0,0 +1,345 @@ +http://gcc.gnu.org/viewcvs?view=revision&revision=136563 + +2008-06-08 Joseph Myers <joseph@codesourcery.com> + + PR tree-optimization/36218 + * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_BUILD. + * Makefile.tpl (EXTRA_BUILD_FLAGS): Define. + (all prefix="build-"): Pass them to build-system sub-makes. + * Makefile.in: Regenerate. + +config: + * config/mh-mingw (LDFLAGS): Define. + +gcc: + * configure.ac: Use LDFLAGS="${LDFLAGS_FOR_BUILD}" when running + configure for the build system. + (BUILD_LDFLAGS): Define. + * configure: Regenerate. + * Makefile.in (BUILD_LDFLAGS): Define to @BUILD_LDFLAGS@. + + +Index: gcc-4.3.3/Makefile.def +=================================================================== +--- gcc-4.3.3.orig/Makefile.def 2010-05-16 23:08:16.000000000 -0700 ++++ gcc-4.3.3/Makefile.def 2010-05-16 23:09:17.130520085 -0700 +@@ -215,6 +215,7 @@ flags_to_pass = { flag= INSTALL ; }; + flags_to_pass = { flag= INSTALL_DATA ; }; + flags_to_pass = { flag= INSTALL_PROGRAM ; }; + flags_to_pass = { flag= INSTALL_SCRIPT ; }; ++flags_to_pass = { flag= LDFLAGS_FOR_BUILD ; }; + flags_to_pass = { flag= LEX ; }; + flags_to_pass = { flag= M4 ; }; + flags_to_pass = { flag= MAKE ; }; +Index: gcc-4.3.3/Makefile.in +=================================================================== +--- gcc-4.3.3.orig/Makefile.in 2010-05-16 23:08:16.000000000 -0700 ++++ gcc-4.3.3/Makefile.in 2010-05-16 23:10:22.000000000 -0700 +@@ -136,6 +136,12 @@ BUILD_EXPORTS = \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; + ++# These variables must be set on the make command line for directories ++# built for the build system to override those in BASE_FLAGS_TO_PASSS. ++EXTRA_BUILD_FLAGS = \ ++ CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ LDFLAGS="$(LDFLAGS_FOR_BUILD)" ++ + # This is the list of directories to built for the host system. + SUBDIRS = @configdirs@ + # This is set by the configure script to the arguments to use when configuring +@@ -499,6 +505,7 @@ BASE_FLAGS_TO_PASS = \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ ++ "LDFLAGS_FOR_BUILD=$(LDFLAGS_FOR_BUILD)" \ + "LEX=$(LEX)" \ + "M4=$(M4)" \ + "MAKE=$(MAKE)" \ +@@ -2741,7 +2748,7 @@ all-build-libiberty: configure-build-lib + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/libiberty && \ +- $(MAKE) $(TARGET-build-libiberty)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-libiberty)) + @endif build-libiberty + + +@@ -2796,7 +2803,7 @@ all-build-bison: configure-build-bison + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/bison && \ +- $(MAKE) $(TARGET-build-bison)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-bison)) + @endif build-bison + + +@@ -2851,7 +2858,7 @@ all-build-byacc: configure-build-byacc + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/byacc && \ +- $(MAKE) $(TARGET-build-byacc)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-byacc)) + @endif build-byacc + + +@@ -2906,7 +2913,7 @@ all-build-flex: configure-build-flex + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/flex && \ +- $(MAKE) $(TARGET-build-flex)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-flex)) + @endif build-flex + + +@@ -2961,7 +2968,7 @@ all-build-m4: configure-build-m4 + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/m4 && \ +- $(MAKE) $(TARGET-build-m4)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-m4)) + @endif build-m4 + + +@@ -3016,7 +3023,7 @@ all-build-texinfo: configure-build-texin + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/texinfo && \ +- $(MAKE) $(TARGET-build-texinfo)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-texinfo)) + @endif build-texinfo + + +@@ -3071,7 +3078,7 @@ all-build-fixincludes: configure-build-f + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(BUILD_EXPORTS) \ + (cd $(BUILD_SUBDIR)/fixincludes && \ +- $(MAKE) $(TARGET-build-fixincludes)) ++ $(MAKE) $(EXTRA_BUILD_FLAGS) $(TARGET-build-fixincludes)) + @endif build-fixincludes + + +Index: gcc-4.3.3/Makefile.tpl +=================================================================== +--- gcc-4.3.3.orig/Makefile.tpl 2010-05-16 23:08:16.000000000 -0700 ++++ gcc-4.3.3/Makefile.tpl 2010-05-16 23:09:17.170555760 -0700 +@@ -139,6 +139,12 @@ BUILD_EXPORTS = \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; + ++# These variables must be set on the make command line for directories ++# built for the build system to override those in BASE_FLAGS_TO_PASSS. ++EXTRA_BUILD_FLAGS = \ ++ CFLAGS="$(CFLAGS_FOR_BUILD)" \ ++ LDFLAGS="$(LDFLAGS_FOR_BUILD)" ++ + # This is the list of directories to built for the host system. + SUBDIRS = @configdirs@ + # This is set by the configure script to the arguments to use when configuring +@@ -947,7 +953,8 @@ clean-stage[+id+]-[+prefix+][+module+]: + target_alias=(get "target" "${target_alias}") + args="$(BUILD_CONFIGARGS)" no-config-site=true +] + +-[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +] ++[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" ++ args="$(EXTRA_BUILD_FLAGS)" +] + [+ ENDFOR build_module +] + + # -------------------------------------- +Index: gcc-4.3.3/config/mh-mingw +=================================================================== +--- gcc-4.3.3.orig/config/mh-mingw 2007-09-06 08:42:02.000000000 -0700 ++++ gcc-4.3.3/config/mh-mingw 2010-05-16 23:09:17.170555760 -0700 +@@ -1,3 +1,6 @@ + # Add -D__USE_MINGW_ACCESS to enable the built compiler to work on Windows + # Vista (see PR33281 for details). + BOOT_CFLAGS += -D__USE_MINGW_ACCESS ++# Increase stack limit to same as Linux default. ++LDFLAGS = -Wl,--stack,8388608 ++ +Index: gcc-4.3.3/gcc/Makefile.in +=================================================================== +--- gcc-4.3.3.orig/gcc/Makefile.in 2010-05-16 23:08:16.000000000 -0700 ++++ gcc-4.3.3/gcc/Makefile.in 2010-05-16 23:10:11.430519728 -0700 +@@ -689,7 +689,7 @@ CC_FOR_BUILD = @CC_FOR_BUILD@ + BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE + + # Native linker and preprocessor flags. For x-fragment overrides. +-BUILD_LDFLAGS=$(LDFLAGS) ++BUILD_LDFLAGS=@BUILD_LDFLAGS@ + BUILD_CPPFLAGS=$(INCLUDES) @BUILD_CPPFLAGS@ $(X_CPPFLAGS) + + # Actual name to use when installing a native compiler. +Index: gcc-4.3.3/gcc/configure +=================================================================== +--- gcc-4.3.3.orig/gcc/configure 2010-05-16 23:08:16.000000000 -0700 ++++ gcc-4.3.3/gcc/configure 2010-05-16 23:09:17.170555760 -0700 +@@ -458,7 +458,7 @@ ac_includes_default="\ + # include <unistd.h> + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_CPPFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical build_libsubdir build_subdir host_subdir target_subdir GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_warn cxx_compat_warn strict_warn warn_cflags nocommon_flag TREEBROWSER valgrind_path valgrind_path_defines valgrind_command coverage_flags enable_multilib enable_decimal_float enable_fixed_point enable_shared TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI datarootdir docdir htmldir SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX BISON NM AR COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext gthread_flags extra_modes_file extra_opt_files USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT host_cc_for_libada CROSS ALL SYSTEM_HEADER_DIR inhibit_libc CC_FOR_BUILD BUILD_CFLAGS BUILD_LDFLAGS BUILD_CPPFLAGS STMP_FIXINC STMP_FIXPROTO collect2 LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN ac_ct_AR STRIP ac_ct_STRIP lt_ECHO objdir enable_fast_install gcc_cv_as ORIGINAL_AS_FOR_TARGET gcc_cv_ld ORIGINAL_LD_FOR_TARGET gcc_cv_nm ORIGINAL_NM_FOR_TARGET gcc_cv_objdump libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar slibdir subdirs srcdir all_compilers all_gtfiles all_lang_makefrags all_lang_makefiles all_languages all_selected_languages build_exeext build_install_headers_dir build_xm_file_list build_xm_include_list build_xm_defines build_file_translate check_languages cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_headers_list extra_objs extra_parts extra_passes extra_programs float_h_file gcc_config_arguments gcc_gxx_include_dir host_exeext host_xm_file_list host_xm_include_list host_xm_defines out_host_hook_obj install lang_opt_files lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc out_file out_object_file thread_file tm_file_list tm_include_list tm_defines tm_p_file_list tm_p_include_list xm_file_list xm_include_list xm_defines c_target_objs cxx_target_objs target_cpu_default GMPLIBS GMPINC LIBOBJS LTLIBOBJS' + ac_subst_files='language_hooks' + + # Initialize some variables set by options. +@@ -12972,6 +12972,7 @@ else + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ ++ LDFLAGS="${LDFLAGS_FOR_BUILD}" \ + CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +@@ -13469,6 +13470,7 @@ fi + # These are the normal (build=host) settings: + CC_FOR_BUILD='$(CC)' + BUILD_CFLAGS='$(ALL_CFLAGS)' ++BUILD_LDFLAGS='$(LDFLAGS)' + BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' + STMP_FIXINC=stmp-fixinc + +@@ -13488,6 +13490,7 @@ if test x$build != x$host || test "x$cov + then + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' + BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' ++ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' + + if test "x$TARGET_SYSTEM_ROOT" = x; then + if test "x$STMP_FIXPROTO" != x; then +@@ -14066,13 +14069,13 @@ if test "${lt_cv_nm_interface+set}" = se + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:14069: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:14072: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:14072: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:14075: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:14075: output\"" >&5) ++ (eval echo "\"\$as_me:14078: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" +@@ -15127,7 +15130,7 @@ ia64-*-hpux*) + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 15130 "configure"' > conftest.$ac_ext ++ echo '#line 15133 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -15747,11 +15750,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:15750: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:15753: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:15754: \$? = $ac_status" >&5 ++ echo "$as_me:15757: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -16069,11 +16072,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16072: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16075: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:16076: \$? = $ac_status" >&5 ++ echo "$as_me:16079: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -16174,11 +16177,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16177: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16180: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:16181: \$? = $ac_status" >&5 ++ echo "$as_me:16184: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -16229,11 +16232,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:16232: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16235: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:16236: \$? = $ac_status" >&5 ++ echo "$as_me:16239: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -19026,7 +19029,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19029 "configure" ++#line 19032 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -19126,7 +19129,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 19129 "configure" ++#line 19132 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -23936,6 +23939,7 @@ s,@SYSTEM_HEADER_DIR@,$SYSTEM_HEADER_DIR + s,@inhibit_libc@,$inhibit_libc,;t t + s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t + s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t ++s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t + s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t + s,@STMP_FIXINC@,$STMP_FIXINC,;t t + s,@STMP_FIXPROTO@,$STMP_FIXPROTO,;t t +Index: gcc-4.3.3/gcc/configure.ac +=================================================================== +--- gcc-4.3.3.orig/gcc/configure.ac 2010-05-16 23:08:16.000000000 -0700 ++++ gcc-4.3.3/gcc/configure.ac 2010-05-16 23:09:17.180525673 -0700 +@@ -1480,6 +1480,7 @@ else + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ ++ LDFLAGS="${LDFLAGS_FOR_BUILD}" \ + CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias +@@ -1776,6 +1777,7 @@ AC_SUBST(inhibit_libc) + # These are the normal (build=host) settings: + CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) + BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) ++BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) + BUILD_CPPFLAGS='$(ALL_CPPFLAGS)' AC_SUBST(BUILD_CPPFLAGS) + STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC) + +@@ -1795,6 +1797,7 @@ if test x$build != x$host || test "x$cov + then + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' + BUILD_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)' ++ BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' + + if test "x$TARGET_SYSTEM_ROOT" = x; then + if test "x$STMP_FIXPROTO" != x; then diff --git a/recipes/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch b/recipes/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch index a7722cbfc4..d915b911ba 100644 --- a/recipes/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch +++ b/recipes/gcc/gcc-4.3.3/zecke-xgcc-cpp.patch @@ -2,27 +2,27 @@ upstream: n/a comment: Use the preprocessor we have just compiled instead the one of the system. There might be incompabilities between us and them. -Index: gcc-4.3.1/Makefile.in +Index: gcc-4.3.3/Makefile.in =================================================================== ---- gcc-4.3.1.orig/Makefile.in 2008-08-19 01:09:56.000000000 -0700 -+++ gcc-4.3.1/Makefile.in 2008-08-19 01:13:27.000000000 -0700 -@@ -204,6 +204,7 @@ +--- gcc-4.3.3.orig/Makefile.in 2010-05-16 17:27:06.000000000 -0700 ++++ gcc-4.3.3/Makefile.in 2010-05-16 18:50:32.363015133 -0700 +@@ -204,6 +204,7 @@ BASE_TARGET_EXPORTS = \ AR="$(AR_FOR_TARGET)"; export AR; \ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ + CPP="$(CC_FOR_TARGET) -E"; export CPP; \ - CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ -Index: gcc-4.3.1/Makefile.tpl +Index: gcc-4.3.3/Makefile.tpl =================================================================== ---- gcc-4.3.1.orig/Makefile.tpl 2008-08-21 00:07:58.000000000 -0700 -+++ gcc-4.3.1/Makefile.tpl 2008-08-21 00:09:52.000000000 -0700 -@@ -223,6 +223,7 @@ +--- gcc-4.3.3.orig/Makefile.tpl 2010-05-16 17:27:06.000000000 -0700 ++++ gcc-4.3.3/Makefile.tpl 2010-05-16 18:49:57.221575513 -0700 +@@ -207,6 +207,7 @@ BASE_TARGET_EXPORTS = \ AR="$(AR_FOR_TARGET)"; export AR; \ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ + CPP="$(CC_FOR_TARGET) -E"; export CPP; \ - CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \ + CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ diff --git a/recipes/gcc/gcc-4.3.4.inc b/recipes/gcc/gcc-4.3.4.inc index 186edce2ff..b8df9f06f6 100644 --- a/recipes/gcc/gcc-4.3.4.inc +++ b/recipes/gcc/gcc-4.3.4.inc @@ -8,90 +8,94 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r8" +INC_PR = "r11" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://fedora/gcc43-c++-builtin-redecl.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ia64-libunwind.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-nomulti.patch;patch=1;pnum=0 \ - file://fedora/gcc43-ppc32-retaddr.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr27898.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr32139.patch;patch=1;pnum=0 \ - file://fedora/gcc43-pr33763.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh330771.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh341221.patch;patch=1;pnum=0 \ - file://fedora/gcc43-cpp-pragma.patch;patch=1;pnum=0 \ - file://fedora/gcc43-java-debug-iface-type.patch;patch=1;pnum=0 \ - file://fedora/gcc43-libgomp-speedup.patch;patch=1;pnum=0 \ - file://fedora/gcc43-i386-libgomp.patch;patch=1;pnum=0 \ - file://fedora/gcc43-rh251682.patch;patch=1;pnum=0 \ - file://debian/arm-unbreak-eabi-armv4t.dpatch;patch=1 \ - file://debian/libstdc++-pic.dpatch;patch=1;pnum=0 \ - file://debian/gcc-ice-hack.dpatch;patch=1;pnum=0 \ - file://debian/pr30961.dpatch;patch=1;pnum=0 \ - file://100-uclibc-conf.patch;patch=1 \ - file://103-uclibc-conf-noupstream.patch;patch=1 \ - file://200-uclibc-locale.patch;patch=1 \ - file://203-uclibc-locale-no__x.patch;patch=1 \ - file://204-uclibc-locale-wchar_fix.patch;patch=1 \ - file://205-uclibc-locale-update.patch;patch=1 \ - file://301-missing-execinfo_h.patch;patch=1 \ - file://302-c99-snprintf.patch;patch=1 \ - file://303-c99-complex-ugly-hack.patch;patch=1 \ - file://304-index_macro.patch;patch=1 \ - file://305-libmudflap-susv3-legacy.patch;patch=1 \ - file://306-libstdc++-namespace.patch;patch=1 \ - file://307-locale_facets.patch;patch=1 \ - file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://740-sh-pr24836.patch;patch=1 \ - file://800-arm-bigendian.patch;patch=1 \ - file://904-flatten-switch-stmt-00.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gfortran-4.3.x.patch;patch=1 \ - file://gcc-4.0.2-e300c2c3.patch;patch=1 \ -# file://pr34130.patch;patch=1 \ -# file://fortran-static-linking.patch;patch=1 \ - file://gcc-arm-frename-registers.patch;patch=1 \ - file://gcc-4.3.4-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ + file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \ + file://fedora/gcc43-ia64-libunwind.patch;striplevel=0 \ + file://fedora/gcc43-java-nomulti.patch;striplevel=0 \ + file://fedora/gcc43-ppc32-retaddr.patch;striplevel=0 \ + file://fedora/gcc43-pr27898.patch;striplevel=0 \ + file://fedora/gcc43-pr32139.patch;striplevel=0 \ + file://fedora/gcc43-pr33763.patch;striplevel=0 \ + file://fedora/gcc43-rh330771.patch;striplevel=0 \ + file://fedora/gcc43-rh341221.patch;striplevel=0 \ + file://fedora/gcc43-cpp-pragma.patch;striplevel=0 \ + file://fedora/gcc43-java-debug-iface-type.patch;striplevel=0 \ + file://fedora/gcc43-libgomp-speedup.patch;striplevel=0 \ + file://fedora/gcc43-i386-libgomp.patch;striplevel=0 \ + file://fedora/gcc43-rh251682.patch;striplevel=0 \ + file://debian/arm-unbreak-eabi-armv4t.dpatch;apply=yes \ + file://debian/armel-atomic-builtins.dpatch;apply=yes;striplevel=0 \ + file://debian/libstdc++-pic.dpatch;apply=yes;striplevel=0 \ + file://debian/gcc-ice-hack.dpatch;apply=yes;striplevel=0 \ + file://debian/pr30961.dpatch;apply=yes;striplevel=0 \ + file://100-uclibc-conf.patch \ + file://103-uclibc-conf-noupstream.patch \ + file://200-uclibc-locale.patch \ + file://203-uclibc-locale-no__x.patch \ + file://204-uclibc-locale-wchar_fix.patch \ + file://205-uclibc-locale-update.patch \ + file://301-missing-execinfo_h.patch \ + file://302-c99-snprintf.patch \ + file://303-c99-complex-ugly-hack.patch \ + file://304-index_macro.patch \ + file://305-libmudflap-susv3-legacy.patch \ + file://306-libstdc++-namespace.patch \ + file://307-locale_facets.patch \ + file://602-sdk-libstdc++-includes.patch \ + file://740-sh-pr24836.patch \ + file://800-arm-bigendian.patch \ + file://904-flatten-switch-stmt-00.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch \ + file://cache-amnesia.patch \ + file://gfortran-4.3.x.patch \ + file://gcc-4.0.2-e300c2c3.patch \ +# file://pr34130.patch \ +# file://fortran-static-linking.patch \ + file://gcc-arm-frename-registers.patch \ + file://gcc-4.3.4-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://zecke-xgcc-cpp.patch \ + file://gcc-4.3.x-fix-EXTRA_BUILD.patch \ + file://gcc-flags-for-build.patch \ + file://Makefile.in.patch \ " -SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " +SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch " -SRC_URI_append_sh4 = " file://sh_unwind.patch;patch=1 \ - file://gcc-4.2.3-linux-multilib-fix.patch;patch=1 \ +SRC_URI_append_sh4 = " file://sh_unwind.patch \ + file://gcc-4.2.3-linux-multilib-fix.patch \ " SRC_URI_append_ep93xx = " \ - file://ep93xx/arm-crunch-readme.patch;patch=1 \ - file://ep93xx/arm-crunch-saveregs.patch;patch=1 \ - file://ep93xx/arm-crunch-scratch.patch;patch=1 \ - file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch;patch=1 \ - file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch;patch=1 \ - file://ep93xx/arm-crunch-20000320.patch;patch=1 \ - file://ep93xx/arm-crunch-disable-cmpdi.patch;patch=1 \ - file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch;patch=1 \ - file://ep93xx/arm-crunch-fp_consts.patch;patch=1 \ - file://ep93xx/arm-crunch-neg-enable.patch;patch=1 \ - file://ep93xx/arm-crunch-neg-protect.patch;patch=1 \ - file://ep93xx/arm-crunch-repair-truncxfsi.patch;patch=1 \ - file://ep93xx/arm-crunch-floatsi-no-scratch.patch;patch=1 \ - file://ep93xx/arm-crunch-movsf-movdf-Uy.patch;patch=1 \ - file://ep93xx/arm-crunch-drop-thumb2.patch;patch=1 \ - file://ep93xx/arm-crunch-arm_dbx_register_number.patch;patch=1 \ - file://ep93xx/arm-crunch-pipeline.patch;patch=1 \ - file://ep93xx/arm-crunch-ccmav-mode.patch;patch=1 \ - file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch;patch=1 \ - file://ep93xx/arm-crunch-mieee.patch;patch=1 \ - file://ep93xx/arm-size-bugfix.patch;patch=1 \ - file://ep93xx/arm-prologue_use-length.patch;patch=1 \ - file://ep93xx/arm-crunch-cftruncd32-attr.patch;patch=1 \ - file://ep93xx/arm-crunch-fix-cirrus-reorg7.patch;patch=1 \ - file://ep93xx/arm-crunch-cirrus-di-flag.patch;patch=1 \ - file://ep93xx/arm-crunch-disable-floatsi.patch;patch=1 \ + file://ep93xx/arm-crunch-readme.patch \ + file://ep93xx/arm-crunch-saveregs.patch \ + file://ep93xx/arm-crunch-scratch.patch \ + file://ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch \ + file://ep93xx/arm-crunch-eabi-mvf0-scratch-ieee754.patch \ + file://ep93xx/arm-crunch-20000320.patch \ + file://ep93xx/arm-crunch-disable-cmpdi.patch \ + file://ep93xx/arm-crunch-fix-64bit-const-offsets.patch \ + file://ep93xx/arm-crunch-fp_consts.patch \ + file://ep93xx/arm-crunch-neg-enable.patch \ + file://ep93xx/arm-crunch-neg-protect.patch \ + file://ep93xx/arm-crunch-repair-truncxfsi.patch \ + file://ep93xx/arm-crunch-floatsi-no-scratch.patch \ + file://ep93xx/arm-crunch-movsf-movdf-Uy.patch \ + file://ep93xx/arm-crunch-drop-thumb2.patch \ + file://ep93xx/arm-crunch-arm_dbx_register_number.patch \ + file://ep93xx/arm-crunch-pipeline.patch \ + file://ep93xx/arm-crunch-ccmav-mode.patch \ + file://ep93xx/arm-crunch-cfcpy-with-cfsh64.patch \ + file://ep93xx/arm-crunch-mieee.patch \ + file://ep93xx/arm-size-bugfix.patch \ + file://ep93xx/arm-prologue_use-length.patch \ + file://ep93xx/arm-crunch-cftruncd32-attr.patch \ + file://ep93xx/arm-crunch-fix-cirrus-reorg7.patch \ + file://ep93xx/arm-crunch-cirrus-di-flag.patch \ + file://ep93xx/arm-crunch-disable-floatsi.patch \ " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.3.4/Makefile.in.patch b/recipes/gcc/gcc-4.3.4/Makefile.in.patch new file mode 100644 index 0000000000..4c11a64b2d --- /dev/null +++ b/recipes/gcc/gcc-4.3.4/Makefile.in.patch @@ -0,0 +1,29 @@ +Index: gcc-4.3.1/gcc/Makefile.in +=================================================================== +--- gcc-4.3.1.orig/gcc/Makefile.in ++++ gcc-4.3.1/gcc/Makefile.in +@@ -575,7 +575,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -901,9 +901,13 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) ++ $(CPPINC) $(DECNUMINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.3.4/debian/armel-atomic-builtins.dpatch b/recipes/gcc/gcc-4.3.4/debian/armel-atomic-builtins.dpatch new file mode 100644 index 0000000000..f514375a75 --- /dev/null +++ b/recipes/gcc/gcc-4.3.4/debian/armel-atomic-builtins.dpatch @@ -0,0 +1,350 @@ +#! /bin/sh -e + +# DP: Atomic builtins using kernel helpers for ARM Linux/EABI. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +This patch implements the atomic builtins described at: + + http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Atomic-Builtins.html + +for ARM EABI Linux. This implementation uses the kernel helpers +__kernel_cmpxchg and __kernel_dmb, and so should work on any +architecture which supports those. (More-efficient versions are possible +using ldrex/strex on architectures >=v6, but those are not written yet.) + +Atomic operations are provided for data sizes of 1, 2 and 4 bytes (but +not 8 bytes). The implementation uses actual functions +(__sync_fetch_and_add_2, etc.) rather than expanding code inline. + +Tested with cross to arm-none-linux-gnueabi, and with some additional +hand-written tests which hopefully exercised the atomicity of the +operations sufficiently. + +OK for mainline? + +Julian + +ChangeLog + + gcc/ + * config/arm/t-linux-eabi (LIB2FUNCS_STATIC_EXTRA): Add + config/arm/linux-atomic.c. + * config/arm/linux-atomic.c: New. + +Index: gcc/config/arm/linux-atomic.c +=================================================================== +--- gcc/config/arm/linux-atomic.c (revision 0) ++++ gcc/config/arm/linux-atomic.c (revision 0) +@@ -0,0 +1,280 @@ ++/* Linux-specific atomic operations for ARM EABI. ++ Copyright (C) 2008 Free Software Foundation, Inc. ++ Contributed by CodeSourcery. ++ ++This file is part of GCC. ++ ++GCC 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, 51 Franklin Street, Fifth Floor, Boston, MA ++02110-1301, USA. */ ++ ++/* Kernel helper for compare-and-exchange. */ ++typedef int (__kernel_cmpxchg_t) (int oldval, int newval, int *ptr); ++#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0) ++ ++/* Kernel helper for memory barrier. */ ++typedef void (__kernel_dmb_t) (void); ++#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) ++ ++/* Note: we implement byte, short and int versions of atomic operations using ++ the above kernel helpers, but there is no support for "long long" (64-bit) ++ operations as yet. */ ++ ++#define HIDDEN __attribute__ ((visibility ("hidden"))) ++ ++#ifdef __ARMEL__ ++#define INVERT_MASK_1 0 ++#define INVERT_MASK_2 0 ++#else ++#define INVERT_MASK_1 24 ++#define INVERT_MASK_2 16 ++#endif ++ ++#define MASK_1 0xffu ++#define MASK_2 0xffffu ++ ++#define FETCH_AND_OP_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_fetch_and_##OP##_4 (int *ptr, int val) \ ++ { \ ++ int failure, tmp; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return tmp; \ ++ } ++ ++FETCH_AND_OP_WORD (add, , +) ++FETCH_AND_OP_WORD (sub, , -) ++FETCH_AND_OP_WORD (or, , |) ++FETCH_AND_OP_WORD (and, , &) ++FETCH_AND_OP_WORD (xor, , ^) ++FETCH_AND_OP_WORD (nand, ~, &) ++ ++#define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH ++#define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH ++ ++/* Implement both __sync_<op>_and_fetch and __sync_fetch_and_<op> for ++ subword-sized quantities. */ ++ ++#define SUBWORD_SYNC_OP(OP, PFX_OP, INF_OP, TYPE, WIDTH, RETURN) \ ++ TYPE HIDDEN \ ++ NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE val) \ ++ { \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ unsigned int mask, shift, oldval, newval; \ ++ int failure; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = ((PFX_OP ((oldval & mask) >> shift) \ ++ INF_OP (unsigned int) val) << shift) & mask; \ ++ newval |= oldval & ~mask; \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (RETURN & mask) >> shift; \ ++ } ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, oldval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval) ++SUBWORD_SYNC_OP (or, , |, short, 2, oldval) ++SUBWORD_SYNC_OP (and, , &, short, 2, oldval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, oldval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, oldval) ++SUBWORD_SYNC_OP (or, , |, char, 1, oldval) ++SUBWORD_SYNC_OP (and, , &, char, 1, oldval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, oldval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, oldval) ++ ++#define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \ ++ int HIDDEN \ ++ __sync_##OP##_and_fetch_4 (int *ptr, int val) \ ++ { \ ++ int tmp, failure; \ ++ \ ++ do { \ ++ tmp = *ptr; \ ++ failure = __kernel_cmpxchg (tmp, PFX_OP tmp INF_OP val, ptr); \ ++ } while (failure != 0); \ ++ \ ++ return PFX_OP tmp INF_OP val; \ ++ } ++ ++OP_AND_FETCH_WORD (add, , +) ++OP_AND_FETCH_WORD (sub, , -) ++OP_AND_FETCH_WORD (or, , |) ++OP_AND_FETCH_WORD (and, , &) ++OP_AND_FETCH_WORD (xor, , ^) ++OP_AND_FETCH_WORD (nand, ~, &) ++ ++SUBWORD_SYNC_OP (add, , +, short, 2, newval) ++SUBWORD_SYNC_OP (sub, , -, short, 2, newval) ++SUBWORD_SYNC_OP (or, , |, short, 2, newval) ++SUBWORD_SYNC_OP (and, , &, short, 2, newval) ++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval) ++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval) ++ ++SUBWORD_SYNC_OP (add, , +, char, 1, newval) ++SUBWORD_SYNC_OP (sub, , -, char, 1, newval) ++SUBWORD_SYNC_OP (or, , |, char, 1, newval) ++SUBWORD_SYNC_OP (and, , &, char, 1, newval) ++SUBWORD_SYNC_OP (xor, , ^, char, 1, newval) ++SUBWORD_SYNC_OP (nand, ~, &, char, 1, newval) ++ ++int HIDDEN ++__sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int actual_oldval, fail; ++ ++ while (1) ++ { ++ actual_oldval = *ptr; ++ ++ if (oldval != actual_oldval) ++ return actual_oldval; ++ ++ fail = __kernel_cmpxchg (actual_oldval, newval, ptr); ++ ++ if (!fail) ++ return oldval; ++ } ++} ++ ++#define SUBWORD_VAL_CAS(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ int *wordptr = (int *)((unsigned int) ptr & ~3), fail; \ ++ unsigned int mask, shift, actual_oldval, actual_newval; \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ while (1) \ ++ { \ ++ actual_oldval = *wordptr; \ ++ \ ++ if (((actual_oldval & mask) >> shift) != (unsigned int) oldval) \ ++ return (actual_oldval & mask) >> shift; \ ++ \ ++ actual_newval = (actual_oldval & ~mask) \ ++ | (((unsigned int) newval << shift) & mask); \ ++ \ ++ fail = __kernel_cmpxchg (actual_oldval, actual_newval, \ ++ wordptr); \ ++ \ ++ if (!fail) \ ++ return oldval; \ ++ } \ ++ } ++ ++SUBWORD_VAL_CAS (short, 2) ++SUBWORD_VAL_CAS (char, 1) ++ ++typedef unsigned char bool; ++ ++bool HIDDEN ++__sync_bool_compare_and_swap_4 (int *ptr, int oldval, int newval) ++{ ++ int failure = __kernel_cmpxchg (oldval, newval, ptr); ++ return (failure == 0); ++} ++ ++#define SUBWORD_BOOL_CAS(TYPE, WIDTH) \ ++ bool HIDDEN \ ++ __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval, \ ++ TYPE newval) \ ++ { \ ++ TYPE actual_oldval \ ++ = __sync_val_compare_and_swap_##WIDTH (ptr, oldval, newval); \ ++ return (oldval == actual_oldval); \ ++ } ++ ++SUBWORD_BOOL_CAS (short, 2) ++SUBWORD_BOOL_CAS (char, 1) ++ ++void HIDDEN ++__sync_synchronize (void) ++{ ++ __kernel_dmb (); ++} ++ ++int HIDDEN ++__sync_lock_test_and_set_4 (int *ptr, int val) ++{ ++ int failure, oldval; ++ ++ do { ++ oldval = *ptr; ++ failure = __kernel_cmpxchg (oldval, val, ptr); ++ } while (failure != 0); ++ ++ return oldval; ++} ++ ++#define SUBWORD_TEST_AND_SET(TYPE, WIDTH) \ ++ TYPE HIDDEN \ ++ __sync_lock_test_and_set_##WIDTH (TYPE *ptr, TYPE val) \ ++ { \ ++ int failure; \ ++ unsigned int oldval, newval, shift, mask; \ ++ int *wordptr = (int *) ((unsigned int) ptr & ~3); \ ++ \ ++ shift = (((unsigned int) ptr & 3) << 3) ^ INVERT_MASK_##WIDTH; \ ++ mask = MASK_##WIDTH << shift; \ ++ \ ++ do { \ ++ oldval = *wordptr; \ ++ newval = (oldval & ~mask) \ ++ | (((unsigned int) val << shift) & mask); \ ++ failure = __kernel_cmpxchg (oldval, newval, wordptr); \ ++ } while (failure != 0); \ ++ \ ++ return (oldval & mask) >> shift; \ ++ } ++ ++SUBWORD_TEST_AND_SET (short, 2) ++SUBWORD_TEST_AND_SET (char, 1) ++ ++#define SYNC_LOCK_RELEASE(TYPE, WIDTH) \ ++ void HIDDEN \ ++ __sync_lock_release_##WIDTH (TYPE *ptr) \ ++ { \ ++ *ptr = 0; \ ++ __kernel_dmb (); \ ++ } ++ ++SYNC_LOCK_RELEASE (int, 4) ++SYNC_LOCK_RELEASE (short, 2) ++SYNC_LOCK_RELEASE (char, 1) +Index: gcc/config/arm/t-linux-eabi +=================================================================== +--- gcc/config/arm/t-linux-eabi (revision 136167) ++++ gcc/config/arm/t-linux-eabi (working copy) +@@ -12,3 +12,5 @@ LIB1ASMFUNCS := $(filter-out _dvmd_tls,$ + # Multilib the standard Linux files. Don't include crti.o or crtn.o, + # which are provided by glibc. + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o ++ ++LIB2FUNCS_STATIC_EXTRA += $(srcdir)/config/arm/linux-atomic.c + + diff --git a/recipes/gcc/gcc-4.3.4/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch b/recipes/gcc/gcc-4.3.4/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch new file mode 100644 index 0000000000..6849d46cd4 --- /dev/null +++ b/recipes/gcc/gcc-4.3.4/gcc-4.4-20090519-arm-eabi-atomic-builtins-unbreak-v2.patch @@ -0,0 +1,52 @@ +--- gcc-4.4-20090519/gcc/config/arm/linux-eabi.h.~1~ 2007-11-08 14:44:09.000000000 +0100 ++++ gcc-4.4-20090519/gcc/config/arm/linux-eabi.h 2009-05-22 20:38:51.000000000 +0200 +@@ -72,6 +72,49 @@ + do not use -lfloat. */ + #undef LIBGCC_SPEC + ++/* Some symbols are only in the static libgcc. Override REAL_LIBGCC_SPEC ++ to always pass -lgcc to the linker, even for --shared-libgcc, otherwise ++ shared libraries break. */ ++#ifdef ENABLE_SHARED_LIBGCC ++ ++#ifndef USE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 0 ++#endif ++ ++#if USE_LD_AS_NEEDED ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed} \ ++ %{shared-libgcc:-lgcc_s -lgcc}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_1 "\ ++ %{!shared: \ ++ %{!shared-libgcc:-lgcc -lgcc_eh} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" ++#endif ++ ++#ifdef LINK_EH_SPEC ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared: \ ++ %{!shared-libgcc:-lgcc} \ ++ %{shared-libgcc:-lgcc_s -lgcc}}" /* always append -lgcc */ ++#else ++#define REAL_LIBGCC_SPEC_2 "\ ++ %{shared:-lgcc_s -lgcc}" /* always append -lgcc */ ++#endif ++ ++#define REAL_LIBGCC_SPEC " \ ++ %{static|static-libgcc:-lgcc -lgcc_eh} \ ++ %{!static:%{!static-libgcc: \ ++ "REAL_LIBGCC_SPEC_1" \ ++ "REAL_LIBGCC_SPEC_2" \ ++ }}" ++ ++#else /* !ENABLE_SHARED_LIBGCC */ ++ ++#define REAL_LIBGCC_SPEC " -lgcc " ++ ++#endif /* !ENABLE_SHARED_LIBGCC */ ++ + /* Clear the instruction cache from `beg' to `end'. This makes an + inline system call to SYS_cacheflush. */ + #undef CLEAR_INSN_CACHE diff --git a/recipes/gcc/gcc-4.4.1.inc b/recipes/gcc/gcc-4.4.1.inc index c84c339653..8cfb47fe83 100644 --- a/recipes/gcc/gcc-4.4.1.inc +++ b/recipes/gcc/gcc-4.4.1.inc @@ -8,23 +8,23 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r8" - -FILESPATHPKG .= ":gcc-$PV" +INC_PR = "r10" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://100-uclibc-conf.patch;patch=1 \ - file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \ - file://gcc-disable-linux-unwind-with-libc-inhibit.patch;patch=1 \ - file://gcc-link-libgcc-with-libm.patch;patch=1 \ - file://gcc-improve-tls-macro.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ - file://gcc-ppc_single_precision_regs.patch;patch=1 \ - file://gcc-ppc_add_d_constraint.patch;patch=1 \ - file://gcc-pr41175.patch;patch=1 \ - file://gcc-armv4-pass-fix-v4bx-to-ld.patch;patch=1 \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://100-uclibc-conf.patch \ + file://gcc-uclibc-locale-ctype_touplow_t.patch \ + file://gcc-disable-linux-unwind-with-libc-inhibit.patch \ + file://gcc-link-libgcc-with-libm.patch \ + file://gcc-improve-tls-macro.patch \ + file://cache-amnesia.patch \ + file://gcc-flags-for-build.patch \ + file://gcc-ppc_single_precision_regs.patch \ + file://gcc-ppc_add_d_constraint.patch \ + file://gcc-pr41175.patch \ + file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ + file://gcc-4.3.3-fix-EXTRA_BUILD.patch \ + file://Makefile.in.patch \ " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.4.1/Makefile.in.patch b/recipes/gcc/gcc-4.4.1/Makefile.in.patch new file mode 100644 index 0000000000..13ae6c5d33 --- /dev/null +++ b/recipes/gcc/gcc-4.4.1/Makefile.in.patch @@ -0,0 +1,30 @@ +Index: gcc-4.4.4/gcc/Makefile.in +=================================================================== +--- gcc-4.4.4.orig/gcc/Makefile.in ++++ gcc-4.4.4/gcc/Makefile.in +@@ -596,7 +596,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -940,10 +940,14 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) \ ++ $(CPPINC) $(DECNUMINC) \ + $(PPLINC) $(CLOOGINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.4.2.inc b/recipes/gcc/gcc-4.4.2.inc index 1ecdd53abf..3bb9f53899 100644 --- a/recipes/gcc/gcc-4.4.2.inc +++ b/recipes/gcc/gcc-4.4.2.inc @@ -8,23 +8,23 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r2" - -FILESPATHPKG .= ":gcc-$PV" +INC_PR = "r4" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://100-uclibc-conf.patch;patch=1 \ - file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \ - file://gcc-disable-linux-unwind-with-libc-inhibit.patch;patch=1 \ - file://gcc-link-libgcc-with-libm.patch;patch=1 \ - file://gcc-improve-tls-macro.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ - file://gcc-ppc_single_precision_regs.patch;patch=1 \ - file://gcc-ppc_add_d_constraint.patch;patch=1 \ - file://gcc-pr41175.patch;patch=1 \ - file://gcc-armv4-pass-fix-v4bx-to-ld.patch;patch=1 \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://100-uclibc-conf.patch \ + file://gcc-uclibc-locale-ctype_touplow_t.patch \ + file://gcc-disable-linux-unwind-with-libc-inhibit.patch \ + file://gcc-link-libgcc-with-libm.patch \ + file://gcc-improve-tls-macro.patch \ + file://cache-amnesia.patch \ + file://gcc-flags-for-build.patch \ + file://gcc-ppc_single_precision_regs.patch \ + file://gcc-ppc_add_d_constraint.patch \ + file://gcc-pr41175.patch \ + file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ + file://gcc-4.3.3-fix-EXTRA_BUILD.patch \ + file://Makefile.in.patch \ " # Language Overrides FORTRAN = "" diff --git a/recipes/gcc/gcc-4.4.2/Makefile.in.patch b/recipes/gcc/gcc-4.4.2/Makefile.in.patch new file mode 100644 index 0000000000..13ae6c5d33 --- /dev/null +++ b/recipes/gcc/gcc-4.4.2/Makefile.in.patch @@ -0,0 +1,30 @@ +Index: gcc-4.4.4/gcc/Makefile.in +=================================================================== +--- gcc-4.4.4.orig/gcc/Makefile.in ++++ gcc-4.4.4/gcc/Makefile.in +@@ -596,7 +596,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -940,10 +940,14 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) \ ++ $(CPPINC) $(DECNUMINC) \ + $(PPLINC) $(CLOOGINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.4.3.inc b/recipes/gcc/gcc-4.4.3.inc deleted file mode 100644 index c9aa7e20a4..0000000000 --- a/recipes/gcc/gcc-4.4.3.inc +++ /dev/null @@ -1,46 +0,0 @@ -# No armeb and thumb patches - really needs checking -DEFAULT_PREFERENCE = "-999" -ARM_INSTRUCTION_SET = "arm" - -require gcc-common.inc -LICENSE = "GPLv3" - -DEPENDS = "mpfr gmp" -NATIVEDEPS = "mpfr-native gmp-native" - -INC_PR = "r0" - -FILESPATHPKG .= ":gcc-$PV" - -SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=gcc443tarbz2 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://100-uclibc-conf.patch;patch=1 \ - file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \ - file://gcc-disable-linux-unwind-with-libc-inhibit.patch;patch=1 \ - file://gcc-link-libgcc-with-libm.patch;patch=1 \ - file://gcc-improve-tls-macro.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ - file://gcc-ppc_single_precision_regs.patch;patch=1 \ - file://gcc-ppc_add_d_constraint.patch;patch=1 \ - file://gcc-pr41175.patch;patch=1 \ - file://gcc-armv4-pass-fix-v4bx-to-ld.patch;patch=1 \ - " -SRC_URI[gcc443tarbz2.md5sum] = "fe1ca818fc6d2caeffc9051fe67ff103" -SRC_URI[gcc443tarbz2.sha256sum] = "97ed664694b02b4d58ac2cafe443d02a388f9cb3645e7778843b5086a5fec040" - -# Language Overrides -FORTRAN = "" -JAVA = "" - -EXTRA_OECONF_BASE = " --enable-libssp \ - --disable-bootstrap --disable-libgomp \ - --disable-libmudflap" - -EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no" -EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp" - -EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibc = " ${@base_contains('TARGET_ARCH', 'powerpc', '--without-long-double-128', '',d)}" diff --git a/recipes/gcc/gcc-4.4.3/gcc-uclibc-locale-ctype_touplow_t.patch b/recipes/gcc/gcc-4.4.3/gcc-uclibc-locale-ctype_touplow_t.patch deleted file mode 100644 index ffb37d2976..0000000000 --- a/recipes/gcc/gcc-4.4.3/gcc-uclibc-locale-ctype_touplow_t.patch +++ /dev/null @@ -1,52 +0,0 @@ -Index: gcc-4.4.1/libstdc++-v3/config/locale/generic/c_locale.h -=================================================================== ---- gcc-4.4.1.orig/libstdc++-v3/config/locale/generic/c_locale.h 2009-08-06 23:38:32.398265633 -0700 -+++ gcc-4.4.1/libstdc++-v3/config/locale/generic/c_locale.h 2009-08-06 23:41:09.778242281 -0700 -@@ -41,12 +41,17 @@ - - #include <clocale> - #include <cstddef> -+#include <features.h> -+#include <ctype.h> - - #define _GLIBCXX_NUM_CATEGORIES 0 - - _GLIBCXX_BEGIN_NAMESPACE(std) -- -- typedef int* __c_locale; -+#ifdef __UCLIBC__ -+ typedef __ctype_touplow_t* __c_locale; -+#else -+ typedef int* __c_locale; -+#endif - - // Convert numeric value of type double and long double to string and - // return length of string. If vsnprintf is available use it, otherwise -Index: gcc-4.4.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h -=================================================================== ---- gcc-4.4.1.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2009-08-06 23:42:27.402242608 -0700 -+++ gcc-4.4.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2009-08-06 23:43:44.842241959 -0700 -@@ -33,14 +33,21 @@ - */ - - // Information as gleaned from /usr/include/ctype.h -- -+ -+#include <features.h> -+#include <ctype.h> -+ - _GLIBCXX_BEGIN_NAMESPACE(std) - - /// @brief Base class for ctype. - struct ctype_base - { - // Non-standard typedefs. -- typedef const int* __to_type; -+#ifdef __UCLIBC__ -+ typedef const __ctype_touplow_t* __to_type; -+#else -+ typedef const int* __to_type; -+#endif - - // NB: Offsets into ctype<char>::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. diff --git a/recipes/gcc/gcc-4.4.4.inc b/recipes/gcc/gcc-4.4.4.inc new file mode 100644 index 0000000000..51337e1a44 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4.inc @@ -0,0 +1,46 @@ +# No armeb and thumb patches - really needs checking +DEFAULT_PREFERENCE = "-999" +ARM_INSTRUCTION_SET = "arm" + +require gcc-common.inc +LICENSE = "GPLv3" + +DEPENDS = "mpfr gmp" +NATIVEDEPS = "mpfr-native gmp-native" + +INC_PR = "r5" + +SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=gcc444tarbz2 \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://100-uclibc-conf.patch \ + file://gcc-uclibc-locale-ctype_touplow_t.patch \ + file://gcc-disable-linux-unwind-with-libc-inhibit.patch \ + file://gcc-link-libgcc-with-libm.patch \ + file://gcc-improve-tls-macro.patch \ + file://cache-amnesia.patch \ + file://gcc-flags-for-build.patch \ + file://gcc-ppc_single_precision_regs.patch \ + file://gcc-ppc_add_d_constraint.patch \ + file://gcc-pr41175.patch \ + file://gcc-armv4-pass-fix-v4bx-to-ld.patch \ + file://gcc-add-t-slibgcc-libgcc.patch \ + file://gcc-4.3.3-fix-EXTRA_BUILD.patch \ + file://Makefile.in.patch \ + " +SRC_URI[gcc444tarbz2.md5sum] = "7ff5ce9e5f0b088ab48720bbd7203530" +SRC_URI[gcc444tarbz2.sha256sum] = "e1c13696b45752ad3f652304fab5120a43a8a5c0f438d3bda78cf16b620c0c58" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +EXTRA_OECONF_BASE = " --enable-libssp \ + --disable-bootstrap --disable-libgomp \ + --disable-libmudflap" + +EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no" +EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp" + +EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float " +EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float " +EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float " diff --git a/recipes/gcc/gcc-4.4.3/100-uclibc-conf.patch b/recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch index 0b799607e8..0b799607e8 100644 --- a/recipes/gcc/gcc-4.4.3/100-uclibc-conf.patch +++ b/recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch diff --git a/recipes/gcc/gcc-4.4.4/Makefile.in.patch b/recipes/gcc/gcc-4.4.4/Makefile.in.patch new file mode 100644 index 0000000000..13ae6c5d33 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/Makefile.in.patch @@ -0,0 +1,30 @@ +Index: gcc-4.4.4/gcc/Makefile.in +=================================================================== +--- gcc-4.4.4.orig/gcc/Makefile.in ++++ gcc-4.4.4/gcc/Makefile.in +@@ -596,7 +596,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -940,10 +940,14 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) \ ++ $(CPPINC) $(DECNUMINC) \ + $(PPLINC) $(CLOOGINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.4.3/cache-amnesia.patch b/recipes/gcc/gcc-4.4.4/cache-amnesia.patch index d5281ea575..d5281ea575 100644 --- a/recipes/gcc/gcc-4.4.3/cache-amnesia.patch +++ b/recipes/gcc/gcc-4.4.4/cache-amnesia.patch diff --git a/recipes/gcc/gcc-4.4.3/fortran-cross-compile-hack.patch b/recipes/gcc/gcc-4.4.4/fortran-cross-compile-hack.patch index b3d38ad983..b3d38ad983 100644 --- a/recipes/gcc/gcc-4.4.3/fortran-cross-compile-hack.patch +++ b/recipes/gcc/gcc-4.4.4/fortran-cross-compile-hack.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/recipes/gcc/gcc-4.4.4/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch index f33e6c1ea6..f33e6c1ea6 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch diff --git a/recipes/gcc/gcc-4.4.4/gcc-add-t-slibgcc-libgcc.patch b/recipes/gcc/gcc-4.4.4/gcc-add-t-slibgcc-libgcc.patch new file mode 100644 index 0000000000..c0020b30c4 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-add-t-slibgcc-libgcc.patch @@ -0,0 +1,87 @@ +This is a backport of commit revision 151568 from trunk into 4.4 +the changes for config/t-slibgcc-elf-ver are already available in 4.4 +and t-slibgcc-libgcc is available in 4.4.4 +so they dont reflect in the patch as they are mentioned in the changelog +message. + +This patch converts the libgcc_s.so to a linker script stub which should +let static libgcc link in on affected architectures they should include +t-slibgcc-libgcc in there tmake_file variable. For OE its ppc for now +which has this problem when using libtool and -Os flag. + +-Khem + +2009-09-09 Jakub Jelinek <jakub@redhat.com> + + * config/t-slibgcc-elf-ver (SHLIB_MAKE_SOLINK, SHLIB_INSTALL_SOLINK): + New variables. + (SHLIB_LINK, SHLIB_INSTALL): Use them. + * config/t-slibgcc-libgcc: New file. + * config.gcc (powerpc*-*-linux*, powerpc*-*-gnu*): Use it. + +Index: gcc-4.4.4/gcc/config.gcc +=================================================================== +--- gcc-4.4.4.orig/gcc/config.gcc 2010-08-27 21:04:18.246053928 +0000 ++++ gcc-4.4.4/gcc/config.gcc 2010-08-27 21:48:06.258158384 +0000 +@@ -1745,12 +1745,12 @@ + tm_file="rs6000/secureplt.h ${tm_file}" + fi + extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt" +- tmake_file="t-dfprules rs6000/t-fprules ${tmake_file} rs6000/t-ppccomm rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp" ++ tmake_file="t-dfprules rs6000/t-fprules ${tmake_file} rs6000/t-ppccomm rs6000/t-linux64 t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp" + ;; + powerpc64-*-gnu*) + tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux64.h rs6000/gnu.h" + extra_options="${extra_options} rs6000/sysv4.opt rs6000/linux64.opt" +- tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-gnu rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp" ++ tmake_file="rs6000/t-fprules t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-linux64 rs6000/t-fprules-softfp soft-fp/t-softfp" + ;; + powerpc-*-darwin*) + extra_options="${extra_options} rs6000/darwin.opt" +@@ -1827,17 +1827,17 @@ + powerpc-*-linux*altivec*) + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h" + extra_options="${extra_options} rs6000/sysv4.opt" +- tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" ++ tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} t-slibgcc-libgcc rs6000/t-ppccomm" + ;; + powerpc-*-linux*spe*) + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxspe.h rs6000/e500.h" + extra_options="${extra_options} rs6000/sysv4.opt" +- tmake_file="t-dfprules rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" ++ tmake_file="t-dfprules rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} t-slibgcc-libgcc rs6000/t-ppccomm" + ;; + powerpc-*-linux*paired*) + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/750cl.h" + extra_options="${extra_options} rs6000/sysv4.opt" +- tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm" ++ tmake_file="rs6000/t-fprules rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} t-slibgcc-libgcc rs6000/t-ppccomm" + ;; + powerpc-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h" +@@ -1856,7 +1856,7 @@ + tm_file="${tm_file} rs6000/linux.h" + ;; + esac +- tmake_file="${tmake_file} rs6000/t-fprules-softfp soft-fp/t-softfp" ++ tmake_file="${tmake_file} t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp" + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +@@ -1864,14 +1864,14 @@ + powerpc-*-gnu-gnualtivec*) + tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h" + extra_options="${extra_options} rs6000/sysv4.opt" +- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm" ++ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm" + if test x$enable_threads = xyes; then + thread_file='posix' + fi + ;; + powerpc-*-gnu*) + tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/gnu.h" +- tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-gnu rs6000/t-ppccomm" ++ tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-libgcc t-gnu rs6000/t-ppccomm" + extra_options="${extra_options} rs6000/sysv4.opt" + if test x$enable_threads = xyes; then + thread_file='posix' diff --git a/recipes/gcc/gcc-4.4.4/gcc-arm-cp15-tpreg-for-TLS.patch b/recipes/gcc/gcc-4.4.4/gcc-arm-cp15-tpreg-for-TLS.patch new file mode 100644 index 0000000000..a3fbdcee3c --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-arm-cp15-tpreg-for-TLS.patch @@ -0,0 +1,217 @@ +Backport the below patch from trunk. This will let gcc use +Hard TLS register on ARMv7 so far it has been using soft access +this should help improve performance. + +2010-02-01 Richard Earnshaw <rearnsha@arm.com> + + * arm.c (FL_FOR_ARCH_7A): is also a superset of ARMv6K. + (arm_override_options): Allow automatic selection of the thread + pointer register if thumb2. + (legitimize_pic_address): Improve code sequences for Thumb2. + (arm_call_tls_get_addr): Likewise. + (legitimize_tls_address): Likewise. + * arm.md (pic_load_addr_arm): Delete. Replace with ... + (pic_load_addr_32bit): ... this. New named pattern. + * thumb2.md (pic_load_addr_thumb2): Delete. + (pic_load_dot_plus_four): Delete. + (tls_load_dot_plus_four): New named pattern. + + +Index: gcc-4.4.4/gcc/config/arm/arm.c +=================================================================== +--- gcc-4.4.4.orig/gcc/config/arm/arm.c 2010-02-18 05:13:03.000000000 -0800 ++++ gcc-4.4.4/gcc/config/arm/arm.c 2010-07-09 15:07:03.829739455 -0700 +@@ -495,7 +495,7 @@ static int thumb_call_reg_needed; + #define FL_FOR_ARCH6T2 (FL_FOR_ARCH6 | FL_THUMB2) + #define FL_FOR_ARCH6M (FL_FOR_ARCH6 & ~FL_NOTM) + #define FL_FOR_ARCH7 (FL_FOR_ARCH6T2 &~ FL_NOTM) +-#define FL_FOR_ARCH7A (FL_FOR_ARCH7 | FL_NOTM) ++#define FL_FOR_ARCH7A (FL_FOR_ARCH7 | FL_NOTM | FL_ARCH6K) + #define FL_FOR_ARCH7R (FL_FOR_ARCH7A | FL_DIV) + #define FL_FOR_ARCH7M (FL_FOR_ARCH7 | FL_DIV) + +@@ -1549,7 +1549,7 @@ arm_override_options (void) + /* Use the cp15 method if it is available. */ + if (target_thread_pointer == TP_AUTO) + { +- if (arm_arch6k && !TARGET_THUMB) ++ if (arm_arch6k && !TARGET_THUMB1) + target_thread_pointer = TP_CP15; + else + target_thread_pointer = TP_SOFT; +@@ -3634,10 +3634,8 @@ legitimize_pic_address (rtx orig, enum m + else + address = reg; + +- if (TARGET_ARM) +- emit_insn (gen_pic_load_addr_arm (address, orig)); +- else if (TARGET_THUMB2) +- emit_insn (gen_pic_load_addr_thumb2 (address, orig)); ++ if (TARGET_32BIT) ++ emit_insn (gen_pic_load_addr_32bit (address, orig)); + else /* TARGET_THUMB1 */ + emit_insn (gen_pic_load_addr_thumb1 (address, orig)); + +@@ -3814,7 +3812,7 @@ arm_load_pic_register (unsigned long sav + { + pic_rtx = gen_rtx_SYMBOL_REF (Pmode, VXWORKS_GOTT_BASE); + pic_rtx = gen_rtx_CONST (Pmode, pic_rtx); +- emit_insn (gen_pic_load_addr_arm (pic_reg, pic_rtx)); ++ emit_insn (gen_pic_load_addr_32bit (pic_reg, pic_rtx)); + + emit_insn (gen_rtx_SET (Pmode, pic_reg, gen_rtx_MEM (Pmode, pic_reg))); + +@@ -3837,29 +3835,13 @@ arm_load_pic_register (unsigned long sav + UNSPEC_GOTSYM_OFF); + pic_rtx = gen_rtx_CONST (Pmode, pic_rtx); + +- if (TARGET_ARM) +- { +- emit_insn (gen_pic_load_addr_arm (pic_reg, pic_rtx)); +- emit_insn (gen_pic_add_dot_plus_eight (pic_reg, pic_reg, labelno)); +- } +- else if (TARGET_THUMB2) ++ if (TARGET_32BIT) + { +- /* Thumb-2 only allows very limited access to the PC. Calculate the +- address in a temporary register. */ +- if (arm_pic_register != INVALID_REGNUM) +- { +- pic_tmp = gen_rtx_REG (SImode, +- thumb_find_work_register (saved_regs)); +- } ++ emit_insn (gen_pic_load_addr_32bit (pic_reg, pic_rtx)); ++ if (TARGET_ARM) ++ emit_insn (gen_pic_add_dot_plus_eight (pic_reg, pic_reg, labelno)); + else +- { +- gcc_assert (can_create_pseudo_p ()); +- pic_tmp = gen_reg_rtx (Pmode); +- } +- +- emit_insn (gen_pic_load_addr_thumb2 (pic_reg, pic_rtx)); +- emit_insn (gen_pic_load_dot_plus_four (pic_tmp, labelno)); +- emit_insn (gen_addsi3 (pic_reg, pic_reg, pic_tmp)); ++ emit_insn (gen_pic_add_dot_plus_four (pic_reg, pic_reg, labelno)); + } + else /* TARGET_THUMB1 */ + { +@@ -4499,14 +4481,7 @@ arm_call_tls_get_addr (rtx x, rtx reg, r + if (TARGET_ARM) + emit_insn (gen_pic_add_dot_plus_eight (reg, reg, labelno)); + else if (TARGET_THUMB2) +- { +- rtx tmp; +- /* Thumb-2 only allows very limited access to the PC. Calculate +- the address in a temporary register. */ +- tmp = gen_reg_rtx (SImode); +- emit_insn (gen_pic_load_dot_plus_four (tmp, labelno)); +- emit_insn (gen_addsi3(reg, reg, tmp)); +- } ++ emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno)); + else /* TARGET_THUMB1 */ + emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno)); + +@@ -4562,15 +4537,7 @@ legitimize_tls_address (rtx x, rtx reg) + if (TARGET_ARM) + emit_insn (gen_tls_load_dot_plus_eight (reg, reg, labelno)); + else if (TARGET_THUMB2) +- { +- rtx tmp; +- /* Thumb-2 only allows very limited access to the PC. Calculate +- the address in a temporary register. */ +- tmp = gen_reg_rtx (SImode); +- emit_insn (gen_pic_load_dot_plus_four (tmp, labelno)); +- emit_insn (gen_addsi3(reg, reg, tmp)); +- emit_move_insn (reg, gen_const_mem (SImode, reg)); +- } ++ emit_insn (gen_tls_load_dot_plus_four (reg, reg, labelno)); + else + { + emit_insn (gen_pic_add_dot_plus_four (reg, reg, labelno)); +Index: gcc-4.4.4/gcc/config/arm/arm.md +=================================================================== +--- gcc-4.4.4.orig/gcc/config/arm/arm.md 2010-02-18 05:13:03.000000000 -0800 ++++ gcc-4.4.4/gcc/config/arm/arm.md 2010-07-09 15:07:03.833742490 -0700 +@@ -5091,14 +5091,17 @@ + ;; the insn alone, and to force the minipool generation pass to then move + ;; the GOT symbol to memory. + +-(define_insn "pic_load_addr_arm" ++(define_insn "pic_load_addr_32bit" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (unspec:SI [(match_operand:SI 1 "" "mX")] UNSPEC_PIC_SYM))] +- "TARGET_ARM && flag_pic" ++ "TARGET_32BIT && flag_pic" + "ldr%?\\t%0, %1" + [(set_attr "type" "load1") +- (set (attr "pool_range") (const_int 4096)) +- (set (attr "neg_pool_range") (const_int 4084))] ++ (set_attr "pool_range" "4096") ++ (set (attr "neg_pool_range") ++ (if_then_else (eq_attr "is_thumb" "no") ++ (const_int 4084) ++ (const_int 0)))] + ) + + (define_insn "pic_load_addr_thumb1" +@@ -5116,7 +5119,7 @@ + (const_int 4) + (match_operand 2 "" "")] + UNSPEC_PIC_BASE))] +- "TARGET_THUMB1" ++ "TARGET_THUMB" + "* + (*targetm.asm_out.internal_label) (asm_out_file, \"LPIC\", + INTVAL (operands[2])); +Index: gcc-4.4.4/gcc/config/arm/thumb2.md +=================================================================== +--- gcc-4.4.4.orig/gcc/config/arm/thumb2.md 2010-02-24 06:50:43.000000000 -0800 ++++ gcc-4.4.4/gcc/config/arm/thumb2.md 2010-07-09 15:07:03.829739455 -0700 +@@ -243,37 +243,19 @@ + (set_attr "neg_pool_range" "*,*,*,*,0,*")] + ) + +-;; ??? We can probably do better with thumb2 +-(define_insn "pic_load_addr_thumb2" +- [(set (match_operand:SI 0 "s_register_operand" "=r") +- (unspec:SI [(match_operand:SI 1 "" "mX")] UNSPEC_PIC_SYM))] +- "TARGET_THUMB2 && flag_pic" +- "ldr%?\\t%0, %1" +- [(set_attr "type" "load1") +- (set_attr "pool_range" "4096") +- (set_attr "neg_pool_range" "0")] +-) +- +-;; Set reg to the address of this instruction plus four. The low two +-;; bits of the PC are always read as zero, so ensure the instructions is +-;; word aligned. +-(define_insn "pic_load_dot_plus_four" +- [(set (match_operand:SI 0 "register_operand" "=r") +- (unspec:SI [(const_int 4) +- (match_operand 1 "" "")] +- UNSPEC_PIC_BASE))] ++(define_insn "tls_load_dot_plus_four" ++ [(set (match_operand:SI 0 "register_operand" "=l,r") ++ (mem:SI (unspec:SI [(match_operand:SI 1 "register_operand" "+l,r") ++ (const_int 4) ++ (match_operand 2 "" "")] ++ UNSPEC_PIC_BASE)))] + "TARGET_THUMB2" + "* +- assemble_align(BITS_PER_WORD); + (*targetm.asm_out.internal_label) (asm_out_file, \"LPIC\", +- INTVAL (operands[1])); +- /* We use adr because some buggy gas assemble add r8, pc, #0 +- to add.w r8, pc, #0, not addw r8, pc, #0. */ +- asm_fprintf (asm_out_file, \"\\tadr\\t%r, %LLPIC%d + 4\\n\", +- REGNO(operands[0]), (int)INTVAL (operands[1])); +- return \"\"; ++ INTVAL (operands[2])); ++ return \"add\\t%1, %|pc\;ldr%?\\t%0, [%1]\"; + " +- [(set_attr "length" "6")] ++ [(set_attr "length" "4,6")] + ) + + ;; Thumb-2 always has load/store halfword instructions, so we can avoid a lot diff --git a/recipes/gcc/gcc-4.4.3/gcc-armv4-pass-fix-v4bx-to-ld.patch b/recipes/gcc/gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch index 37670375e8..37670375e8 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-armv4-pass-fix-v4bx-to-ld.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-disable-linux-unwind-with-libc-inhibit.patch b/recipes/gcc/gcc-4.4.4/gcc-disable-linux-unwind-with-libc-inhibit.patch index a6ba7a70ab..a6ba7a70ab 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-disable-linux-unwind-with-libc-inhibit.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-disable-linux-unwind-with-libc-inhibit.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-flags-for-build.patch b/recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch index 5193abecdb..5193abecdb 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-flags-for-build.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-improve-tls-macro.patch b/recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch index 88f110b030..88f110b030 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-improve-tls-macro.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-link-libgcc-with-libm.patch b/recipes/gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch index 51abdd8e9b..51abdd8e9b 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-link-libgcc-with-libm.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-ppc_add_d_constraint.patch b/recipes/gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch index 5e1da1ad09..5e1da1ad09 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-ppc_add_d_constraint.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-ppc_single_precision_regs.patch b/recipes/gcc/gcc-4.4.4/gcc-ppc_single_precision_regs.patch index 5b35d6e74c..5b35d6e74c 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-ppc_single_precision_regs.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-ppc_single_precision_regs.patch diff --git a/recipes/gcc/gcc-4.4.3/gcc-pr41175.patch b/recipes/gcc/gcc-4.4.4/gcc-pr41175.patch index 10da543958..10da543958 100644 --- a/recipes/gcc/gcc-4.4.3/gcc-pr41175.patch +++ b/recipes/gcc/gcc-4.4.4/gcc-pr41175.patch diff --git a/recipes/gcc/gcc-4.4.4/gcc-uclibc-locale-ctype_touplow_t.patch b/recipes/gcc/gcc-4.4.4/gcc-uclibc-locale-ctype_touplow_t.patch new file mode 100644 index 0000000000..00121c52e6 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-uclibc-locale-ctype_touplow_t.patch @@ -0,0 +1,67 @@ +Index: gcc-4.4.4/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- gcc-4.4.4.orig/libstdc++-v3/config/locale/generic/c_locale.h 2009-04-09 16:23:07.000000000 -0700 ++++ gcc-4.4.4/libstdc++-v3/config/locale/generic/c_locale.h 2010-05-18 03:37:42.003030691 -0700 +@@ -41,12 +41,17 @@ + + #include <clocale> + #include <cstddef> ++#include <features.h> ++#include <ctype.h> + + #define _GLIBCXX_NUM_CATEGORIES 0 + + _GLIBCXX_BEGIN_NAMESPACE(std) +- +- typedef int* __c_locale; ++#ifdef __UCLIBC__ ++ typedef __ctype_touplow_t* __c_locale; ++#else ++ typedef int* __c_locale; ++#endif + + // Convert numeric value of type double and long double to string and + // return length of string. If vsnprintf is available use it, otherwise +Index: gcc-4.4.4/libstdc++-v3/config/os/gnu-linux/ctype_base.h +=================================================================== +--- gcc-4.4.4.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2009-04-09 16:23:07.000000000 -0700 ++++ gcc-4.4.4/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-05-18 03:37:42.003030691 -0700 +@@ -33,14 +33,21 @@ + */ + + // Information as gleaned from /usr/include/ctype.h +- ++ ++#include <features.h> ++#include <ctype.h> ++ + _GLIBCXX_BEGIN_NAMESPACE(std) + + /// @brief Base class for ctype. + struct ctype_base + { + // Non-standard typedefs. +- typedef const int* __to_type; ++#ifdef __UCLIBC__ ++ typedef const __ctype_touplow_t* __to_type; ++#else ++ typedef const int* __to_type; ++#endif + + // NB: Offsets into ctype<char>::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. +Index: gcc-4.4.4/libstdc++-v3/config/locale/generic/c_locale.cc +=================================================================== +--- gcc-4.4.4.orig/libstdc++-v3/config/locale/generic/c_locale.cc 2010-05-18 03:32:27.120513925 -0700 ++++ gcc-4.4.4/libstdc++-v3/config/locale/generic/c_locale.cc 2010-05-18 03:36:35.890559135 -0700 +@@ -252,5 +252,10 @@ _GLIBCXX_END_NAMESPACE + #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT + #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ + extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) ++#ifdef __UCLIBC__ ++// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* ++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); ++#else + _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); ++#endif + #endif // _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/recipes/gcc/gcc-4.4.3/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.4.4/zecke-no-host-includes.patch index abf829c60d..abf829c60d 100644 --- a/recipes/gcc/gcc-4.4.3/zecke-no-host-includes.patch +++ b/recipes/gcc/gcc-4.4.4/zecke-no-host-includes.patch diff --git a/recipes/gcc/gcc-4.4.3/zecke-xgcc-cpp.patch b/recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch index a7722cbfc4..a7722cbfc4 100644 --- a/recipes/gcc/gcc-4.4.3/zecke-xgcc-cpp.patch +++ b/recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch diff --git a/recipes/gcc/gcc-4.5.0.inc b/recipes/gcc/gcc-4.5.0.inc deleted file mode 100644 index 42b039386c..0000000000 --- a/recipes/gcc/gcc-4.5.0.inc +++ /dev/null @@ -1,40 +0,0 @@ -DEFAULT_PREFERENCE = "-999" -ARM_INSTRUCTION_SET = "arm" - -require gcc-common.inc -LICENSE = "GPLv3" - -DEPENDS = "mpfr gmp libmpc" -NATIVEDEPS = "mpfr-native gmp-native libmpc-native" - -FILESPATHPKG .= ":gcc-$PV" - -INC_PR = "r1" - -SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=gcc450tarbz2 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://100-uclibc-conf.patch;patch=1 \ - file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ - " - -# Language Overrides -FORTRAN = "" -JAVA = "" - -EXTRA_OECONF_BASE = " --enable-libssp \ - --disable-bootstrap --disable-libgomp \ - --disable-libmudflap" - -SRC_URI[gcc450tarbz2.md5sum] = "ff27b7c4a5d5060c8a8543a44abca31f" -SRC_URI[gcc450tarbz2.sha256sum] = "8293e9efa68a8ec0fdd0dae9c9bd128a8e742566acd9c8fbcfe79d98ed3756c8" - -EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no" -EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp" - -EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibc = " ${@base_contains('TARGET_ARCH', 'powerpc', '--without-long-double-128', '',d)}" - diff --git a/recipes/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch b/recipes/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch deleted file mode 100644 index ffb37d2976..0000000000 --- a/recipes/gcc/gcc-4.5.0/gcc-uclibc-locale-ctype_touplow_t.patch +++ /dev/null @@ -1,52 +0,0 @@ -Index: gcc-4.4.1/libstdc++-v3/config/locale/generic/c_locale.h -=================================================================== ---- gcc-4.4.1.orig/libstdc++-v3/config/locale/generic/c_locale.h 2009-08-06 23:38:32.398265633 -0700 -+++ gcc-4.4.1/libstdc++-v3/config/locale/generic/c_locale.h 2009-08-06 23:41:09.778242281 -0700 -@@ -41,12 +41,17 @@ - - #include <clocale> - #include <cstddef> -+#include <features.h> -+#include <ctype.h> - - #define _GLIBCXX_NUM_CATEGORIES 0 - - _GLIBCXX_BEGIN_NAMESPACE(std) -- -- typedef int* __c_locale; -+#ifdef __UCLIBC__ -+ typedef __ctype_touplow_t* __c_locale; -+#else -+ typedef int* __c_locale; -+#endif - - // Convert numeric value of type double and long double to string and - // return length of string. If vsnprintf is available use it, otherwise -Index: gcc-4.4.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h -=================================================================== ---- gcc-4.4.1.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2009-08-06 23:42:27.402242608 -0700 -+++ gcc-4.4.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2009-08-06 23:43:44.842241959 -0700 -@@ -33,14 +33,21 @@ - */ - - // Information as gleaned from /usr/include/ctype.h -- -+ -+#include <features.h> -+#include <ctype.h> -+ - _GLIBCXX_BEGIN_NAMESPACE(std) - - /// @brief Base class for ctype. - struct ctype_base - { - // Non-standard typedefs. -- typedef const int* __to_type; -+#ifdef __UCLIBC__ -+ typedef const __ctype_touplow_t* __to_type; -+#else -+ typedef const int* __to_type; -+#endif - - // NB: Offsets into ctype<char>::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc new file mode 100644 index 0000000000..08d7058be9 --- /dev/null +++ b/recipes/gcc/gcc-4.5.inc @@ -0,0 +1,57 @@ +DEFAULT_PREFERENCE = "-999" +ARM_INSTRUCTION_SET = "arm" + +require gcc-common.inc +LICENSE = "GPLv3" + +DEPENDS = "mpfr gmp libmpc libelf" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native" + + +INC_PR = "r8" + +SRCREV = "163322" +PV = "4.5" +# BINV should be incremented after updating to a revision +# after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made +# the value will be minor-release+1 e.g. if minor release was +# 4.5.1 then the value below will be 2 which will mean 4.5.2 +# which will be next minor release and so on. + +BINV = "${PV}.2" +BRANCH = "gcc-4_5-branch" +PR_append = "+svnr${SRCPV}" + +SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://100-uclibc-conf.patch \ + file://gcc-uclibc-locale-ctype_touplow_t.patch \ + file://cache-amnesia.patch \ + file://gcc-flags-for-build.patch \ + file://libstdc++-emit-__cxa_end_cleanup-in-text.patch \ + file://arm-bswapsi2.patch \ + file://Makefile.in.patch \ + " + +# Language Overrides +FORTRAN = "" +JAVA = "" +rename_srcdir (){ + mv ${WORKDIR}/${BRANCH} ${WORKDIR}/gcc-${PV} +} + +do_unpack_append() { + bb.build.exec_func('rename_srcdir', d) +} + +EXTRA_OECONF_BASE = " --enable-lto \ + --enable-libssp \ + --disable-bootstrap --disable-libgomp \ + --disable-libmudflap" + +EXTRA_OECONF_INITIAL = "--disable-libmudflap --disable-libgomp --disable-libssp --enable-decimal-float=no" +EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-libssp" + +EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float " +EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float " +EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float " diff --git a/recipes/gcc/gcc-4.5.0/100-uclibc-conf.patch b/recipes/gcc/gcc-4.5/100-uclibc-conf.patch index 0b799607e8..0b799607e8 100644 --- a/recipes/gcc/gcc-4.5.0/100-uclibc-conf.patch +++ b/recipes/gcc/gcc-4.5/100-uclibc-conf.patch diff --git a/recipes/gcc/gcc-4.5/Makefile.in.patch b/recipes/gcc/gcc-4.5/Makefile.in.patch new file mode 100644 index 0000000000..45df47c5bf --- /dev/null +++ b/recipes/gcc/gcc-4.5/Makefile.in.patch @@ -0,0 +1,30 @@ +Index: gcc-4.5/gcc/Makefile.in +=================================================================== +--- gcc-4.5.orig/gcc/Makefile.in ++++ gcc-4.5/gcc/Makefile.in +@@ -656,7 +656,7 @@ LIBGCC2_INCLUDES = + TARGET_LIBGCC2_CFLAGS = + + # Options to use when compiling crtbegin/end. +-CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ ++CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(TARGET_INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ + $(INHIBIT_LIBC_CFLAGS) +@@ -1038,10 +1038,14 @@ BUILD_ERRORS = build/errors.o + # -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file + # currently being compiled, in both source trees, to be examined as well. + # libintl.h will be found in ../intl if we are using the included libintl. +-INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ ++# ++# TARGET_INCLUDES is added to avoid that GMPINC (which points to the host ++# include dir) is used for compiling libgcc.a ++TARGET_INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ \ +- $(CPPINC) $(GMPINC) $(DECNUMINC) \ ++ $(CPPINC) $(DECNUMINC) \ + $(PPLINC) $(CLOOGINC) $(LIBELFINC) ++INCLUDES = $(TARGET_INCLUDES) $(GMPINC) + + .c.o: + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION) diff --git a/recipes/gcc/gcc-4.5/arm-bswapsi2.patch b/recipes/gcc/gcc-4.5/arm-bswapsi2.patch new file mode 100644 index 0000000000..7ac61a6d63 --- /dev/null +++ b/recipes/gcc/gcc-4.5/arm-bswapsi2.patch @@ -0,0 +1,13 @@ +Index: gcc-4.5/gcc/config/arm/arm.md +=================================================================== +--- gcc-4.5.orig/gcc/config/arm/arm.md 2010-06-17 09:13:07.000000000 -0700 ++++ gcc-4.5/gcc/config/arm/arm.md 2010-06-22 08:08:45.397212002 -0700 +@@ -11267,7 +11267,7 @@ + (define_expand "bswapsi2" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))] +-"TARGET_EITHER" ++"TARGET_EITHER && (arm_arch6 && !optimize_size)" + " + if (!arm_arch6) + { diff --git a/recipes/gcc/gcc-4.5.0/cache-amnesia.patch b/recipes/gcc/gcc-4.5/cache-amnesia.patch index b889f9b6ca..b889f9b6ca 100644 --- a/recipes/gcc/gcc-4.5.0/cache-amnesia.patch +++ b/recipes/gcc/gcc-4.5/cache-amnesia.patch diff --git a/recipes/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch b/recipes/gcc/gcc-4.5/fortran-cross-compile-hack.patch index 348c77006f..348c77006f 100644 --- a/recipes/gcc/gcc-4.5.0/fortran-cross-compile-hack.patch +++ b/recipes/gcc/gcc-4.5/fortran-cross-compile-hack.patch diff --git a/recipes/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/recipes/gcc/gcc-4.5/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch index f33e6c1ea6..f33e6c1ea6 100644 --- a/recipes/gcc/gcc-4.5.0/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch +++ b/recipes/gcc/gcc-4.5/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch diff --git a/recipes/gcc/gcc-4.5.0/gcc-flags-for-build.patch b/recipes/gcc/gcc-4.5/gcc-flags-for-build.patch index 98b3ecf2e1..51892855af 100644 --- a/recipes/gcc/gcc-4.5.0/gcc-flags-for-build.patch +++ b/recipes/gcc/gcc-4.5/gcc-flags-for-build.patch @@ -1,7 +1,7 @@ -Index: gcc-4.5+svnr155680/Makefile.def +Index: gcc-4.5/Makefile.def =================================================================== ---- gcc-4.5+svnr155680.orig/Makefile.def 2010-01-13 01:02:22.627540169 -0800 -+++ gcc-4.5+svnr155680/Makefile.def 2010-01-13 01:05:24.260056951 -0800 +--- gcc-4.5.orig/Makefile.def ++++ gcc-4.5/Makefile.def @@ -240,6 +240,7 @@ flags_to_pass = { flag= AWK ; }; flags_to_pass = { flag= BISON ; }; flags_to_pass = { flag= CC_FOR_BUILD ; }; @@ -10,11 +10,11 @@ Index: gcc-4.5+svnr155680/Makefile.def flags_to_pass = { flag= CXX_FOR_BUILD ; }; flags_to_pass = { flag= EXPECT ; }; flags_to_pass = { flag= FLEX ; }; -Index: gcc-4.5+svnr155680/gcc/Makefile.in +Index: gcc-4.5/gcc/Makefile.in =================================================================== ---- gcc-4.5+svnr155680.orig/gcc/Makefile.in 2010-01-13 01:02:22.675542832 -0800 -+++ gcc-4.5+svnr155680/gcc/Makefile.in 2010-01-13 01:05:24.264047000 -0800 -@@ -755,7 +755,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS) +--- gcc-4.5.orig/gcc/Makefile.in ++++ gcc-4.5/gcc/Makefile.in +@@ -766,7 +766,7 @@ BUILD_LINKERFLAGS = $(BUILD_CFLAGS) # Native linker and preprocessor flags. For x-fragment overrides. BUILD_LDFLAGS=@BUILD_LDFLAGS@ @@ -23,11 +23,11 @@ Index: gcc-4.5+svnr155680/gcc/Makefile.in # Actual name to use when installing a native compiler. GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') -Index: gcc-4.5+svnr155680/gcc/configure.ac +Index: gcc-4.5/gcc/configure.ac =================================================================== ---- gcc-4.5+svnr155680.orig/gcc/configure.ac 2010-01-13 01:02:22.687541624 -0800 -+++ gcc-4.5+svnr155680/gcc/configure.ac 2010-01-13 01:06:55.711583352 -0800 -@@ -1774,16 +1774,18 @@ AC_SUBST(inhibit_libc) +--- gcc-4.5.orig/gcc/configure.ac ++++ gcc-4.5/gcc/configure.ac +@@ -1798,16 +1798,18 @@ AC_SUBST(inhibit_libc) # Also, we cannot run fixincludes. # These are the normal (build=host) settings: @@ -50,11 +50,11 @@ Index: gcc-4.5+svnr155680/gcc/configure.ac fi # Expand extra_headers to include complete path. -Index: gcc-4.5+svnr155680/Makefile.in +Index: gcc-4.5/Makefile.in =================================================================== ---- gcc-4.5+svnr155680.orig/Makefile.in 2010-01-13 01:02:22.639539865 -0800 -+++ gcc-4.5+svnr155680/Makefile.in 2010-01-13 01:05:24.288038715 -0800 -@@ -328,6 +328,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ +--- gcc-4.5.orig/Makefile.in ++++ gcc-4.5/Makefile.in +@@ -333,6 +333,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ AS_FOR_BUILD = @AS_FOR_BUILD@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @@ -62,7 +62,7 @@ Index: gcc-4.5+svnr155680/Makefile.in CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ -@@ -657,6 +658,7 @@ BASE_FLAGS_TO_PASS = \ +@@ -662,6 +663,7 @@ BASE_FLAGS_TO_PASS = \ "BISON=$(BISON)" \ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ @@ -70,11 +70,11 @@ Index: gcc-4.5+svnr155680/Makefile.in "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ "EXPECT=$(EXPECT)" \ "FLEX=$(FLEX)" \ -Index: gcc-4.5+svnr155680/gcc/configure +Index: gcc-4.5/gcc/configure =================================================================== ---- gcc-4.5+svnr155680.orig/gcc/configure 2010-01-13 01:02:22.663539713 -0800 -+++ gcc-4.5+svnr155680/gcc/configure 2010-01-13 01:07:24.315537016 -0800 -@@ -705,6 +705,7 @@ SED +--- gcc-4.5.orig/gcc/configure ++++ gcc-4.5/gcc/configure +@@ -707,6 +707,7 @@ SED LIBTOOL collect2 STMP_FIXINC @@ -82,7 +82,7 @@ Index: gcc-4.5+svnr155680/gcc/configure BUILD_LDFLAGS BUILD_CFLAGS CC_FOR_BUILD -@@ -10911,6 +10912,7 @@ fi +@@ -10982,6 +10983,7 @@ fi CC_FOR_BUILD='$(CC)' BUILD_CFLAGS='$(ALL_CFLAGS)' BUILD_LDFLAGS='$(LDFLAGS)' @@ -90,7 +90,7 @@ Index: gcc-4.5+svnr155680/gcc/configure STMP_FIXINC=stmp-fixinc # And these apply if build != host, or we are generating coverage data -@@ -10918,6 +10920,7 @@ if test x$build != x$host || test "x$cov +@@ -10989,6 +10991,7 @@ if test x$build != x$host || test "x$cov then BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' @@ -98,29 +98,29 @@ Index: gcc-4.5+svnr155680/gcc/configure fi # Expand extra_headers to include complete path. -@@ -17037,7 +17040,7 @@ else +@@ -17108,7 +17111,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF --#line 17040 "configure" -+#line 17043 "configure" +-#line 17111 "configure" ++#line 17114 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -@@ -17143,7 +17146,7 @@ else +@@ -17214,7 +17217,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF --#line 17146 "configure" -+#line 17149 "configure" +-#line 17217 "configure" ++#line 17220 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -Index: gcc-4.5+svnr155680/Makefile.tpl +Index: gcc-4.5/Makefile.tpl =================================================================== ---- gcc-4.5+svnr155680.orig/Makefile.tpl 2010-01-13 01:02:22.603540396 -0800 -+++ gcc-4.5+svnr155680/Makefile.tpl 2010-01-13 01:05:24.332038114 -0800 -@@ -331,6 +331,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ +--- gcc-4.5.orig/Makefile.tpl ++++ gcc-4.5/Makefile.tpl +@@ -336,6 +336,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ AS_FOR_BUILD = @AS_FOR_BUILD@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @@ -128,10 +128,10 @@ Index: gcc-4.5+svnr155680/Makefile.tpl CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ -Index: gcc-4.5+svnr155680/configure +Index: gcc-4.5/configure =================================================================== ---- gcc-4.5+svnr155680.orig/configure 2010-01-13 01:02:22.615539634 -0800 -+++ gcc-4.5+svnr155680/configure 2010-01-13 01:07:18.940037187 -0800 +--- gcc-4.5.orig/configure ++++ gcc-4.5/configure @@ -651,6 +651,7 @@ GCJ_FOR_BUILD DLLTOOL_FOR_BUILD CXX_FOR_BUILD @@ -140,7 +140,7 @@ Index: gcc-4.5+svnr155680/configure CFLAGS_FOR_BUILD CC_FOR_BUILD AS_FOR_BUILD -@@ -7862,6 +7863,7 @@ esac +@@ -8036,6 +8037,7 @@ esac # our build compiler if desired. if test x"${build}" = x"${host}" ; then CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} @@ -148,19 +148,19 @@ Index: gcc-4.5+svnr155680/configure CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi -@@ -7940,6 +7942,7 @@ done +@@ -8101,6 +8103,7 @@ done + - # Generate default definitions for YACC, M4, LEX and other programs that run - # on the build machine. These are used if the Makefile can't locate these - # programs in objdir. -Index: gcc-4.5+svnr155680/configure.ac + + + +Index: gcc-4.5/configure.ac =================================================================== ---- gcc-4.5+svnr155680.orig/configure.ac 2010-01-13 01:02:22.651540130 -0800 -+++ gcc-4.5+svnr155680/configure.ac 2010-01-13 01:05:24.340037763 -0800 -@@ -3022,6 +3022,7 @@ esac +--- gcc-4.5.orig/configure.ac ++++ gcc-4.5/configure.ac +@@ -3089,6 +3089,7 @@ esac # our build compiler if desired. if test x"${build}" = x"${host}" ; then CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} @@ -168,7 +168,7 @@ Index: gcc-4.5+svnr155680/configure.ac CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi -@@ -3087,6 +3088,7 @@ AC_SUBST(AR_FOR_BUILD) +@@ -3155,6 +3156,7 @@ AC_SUBST(AR_FOR_BUILD) AC_SUBST(AS_FOR_BUILD) AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) diff --git a/recipes/gcc/gcc-4.5/gcc-uclibc-locale-ctype_touplow_t.patch b/recipes/gcc/gcc-4.5/gcc-uclibc-locale-ctype_touplow_t.patch new file mode 100644 index 0000000000..4f94fc9d66 --- /dev/null +++ b/recipes/gcc/gcc-4.5/gcc-uclibc-locale-ctype_touplow_t.patch @@ -0,0 +1,67 @@ +Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:30:53.993316002 -0700 ++++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.h 2010-06-30 22:31:26.043316001 -0700 +@@ -41,12 +41,17 @@ + + #include <clocale> + #include <cstddef> ++#include <features.h> ++#include <ctype.h> + + #define _GLIBCXX_NUM_CATEGORIES 0 + + _GLIBCXX_BEGIN_NAMESPACE(std) +- +- typedef int* __c_locale; ++#ifdef __UCLIBC__ ++ typedef __ctype_touplow_t* __c_locale; ++#else ++ typedef int* __c_locale; ++#endif + + // Convert numeric value of type double and long double to string and + // return length of string. If vsnprintf is available use it, otherwise +Index: gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h +=================================================================== +--- gcc-4.5.orig/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:30:54.013316002 -0700 ++++ gcc-4.5/libstdc++-v3/config/os/gnu-linux/ctype_base.h 2010-06-30 22:31:26.053316001 -0700 +@@ -33,14 +33,21 @@ + */ + + // Information as gleaned from /usr/include/ctype.h +- ++ ++#include <features.h> ++#include <ctype.h> ++ + _GLIBCXX_BEGIN_NAMESPACE(std) + + /// @brief Base class for ctype. + struct ctype_base + { + // Non-standard typedefs. +- typedef const int* __to_type; ++#ifdef __UCLIBC__ ++ typedef const __ctype_touplow_t* __to_type; ++#else ++ typedef const int* __to_type; ++#endif + + // NB: Offsets into ctype<char>::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. +Index: gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc +=================================================================== +--- gcc-4.5.orig/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-28 12:12:42.000000000 -0700 ++++ gcc-4.5/libstdc++-v3/config/locale/generic/c_locale.cc 2010-06-30 22:31:26.063316001 -0700 +@@ -256,5 +256,10 @@ _GLIBCXX_END_NAMESPACE + #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT + #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \ + extern "C" void ldbl (void) __attribute__ ((alias (#dbl))) ++#ifdef __UCLIBC__ ++// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int* ++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs); ++#else + _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi); ++#endif + #endif // _GLIBCXX_LONG_DOUBLE_COMPAT diff --git a/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch b/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch new file mode 100644 index 0000000000..ada36a5914 --- /dev/null +++ b/recipes/gcc/gcc-4.5/libstdc++-emit-__cxa_end_cleanup-in-text.patch @@ -0,0 +1,40 @@ +2010-06-07 Khem Raj <raj.khem@gmail.com> + + * libsupc++/eh_arm.cc (__cxa_end_cleanup): Use .pushsection/.popsection + to emit inline assembly into .text section. + +Index: gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc +=================================================================== +--- gcc-4.5.orig/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-04 23:20:18.000000000 -0700 ++++ gcc-4.5/libstdc++-v3/libsupc++/eh_arm.cc 2010-06-08 11:27:34.247541722 -0700 +@@ -157,22 +157,26 @@ __gnu_end_cleanup(void) + // Assembly wrapper to call __gnu_end_cleanup without clobbering r1-r3. + // Also push r4 to preserve stack alignment. + #ifdef __thumb__ +-asm (".global __cxa_end_cleanup\n" ++asm (" .pushsection .text.__cxa_end_cleanup\n" ++" .global __cxa_end_cleanup\n" + " .type __cxa_end_cleanup, \"function\"\n" + " .thumb_func\n" + "__cxa_end_cleanup:\n" + " push\t{r1, r2, r3, r4}\n" + " bl\t__gnu_end_cleanup\n" + " pop\t{r1, r2, r3, r4}\n" +-" bl\t_Unwind_Resume @ Never returns\n"); ++" bl\t_Unwind_Resume @ Never returns\n" ++" .popsection\n"); + #else +-asm (".global __cxa_end_cleanup\n" ++asm (" .pushsection .text.__cxa_end_cleanup\n" ++" .global __cxa_end_cleanup\n" + " .type __cxa_end_cleanup, \"function\"\n" + "__cxa_end_cleanup:\n" + " stmfd\tsp!, {r1, r2, r3, r4}\n" + " bl\t__gnu_end_cleanup\n" + " ldmfd\tsp!, {r1, r2, r3, r4}\n" +-" bl\t_Unwind_Resume @ Never returns\n"); ++" bl\t_Unwind_Resume @ Never returns\n" ++" .popsection\n"); + #endif + + #endif diff --git a/recipes/gcc/gcc-4.5.0/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.5/zecke-no-host-includes.patch index 4ccf35f627..4ccf35f627 100644 --- a/recipes/gcc/gcc-4.5.0/zecke-no-host-includes.patch +++ b/recipes/gcc/gcc-4.5/zecke-no-host-includes.patch diff --git a/recipes/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch b/recipes/gcc/gcc-4.5/zecke-xgcc-cpp.patch index a7722cbfc4..a7722cbfc4 100644 --- a/recipes/gcc/gcc-4.5.0/zecke-xgcc-cpp.patch +++ b/recipes/gcc/gcc-4.5/zecke-xgcc-cpp.patch diff --git a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb index 249621ef27..7a1402f993 100644 --- a/recipes/gcc/gcc-canadian-sdk_4.2.4.bb +++ b/recipes/gcc/gcc-canadian-sdk_4.2.4.bb @@ -14,11 +14,11 @@ DEPENDS = "gmp-canadian mpfr-canadian" require gcc-configure-canadian-sdk.inc require gcc-package-sdk.inc -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1 \ - file://pr22133-mingw-path-fixup.patch;patch=1 \ - file://pr33281-mingw-host-fragment.patch;patch=1 \ - file://pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch;patch=1 \ - file://canadian-build-modules-configure.patch;patch=1 \ +SRC_URI_append = "file://fortran-cross-compile-hack.patch \ + file://pr22133-mingw-path-fixup.patch \ + file://pr33281-mingw-host-fragment.patch \ + file://pr35916-mingw-__USE_MINGW_ACCESS-everywhere.patch \ + file://canadian-build-modules-configure.patch \ " EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ diff --git a/recipes/gcc/gcc-common.inc b/recipes/gcc/gcc-common.inc index 7aee542461..ffd4dd3146 100644 --- a/recipes/gcc/gcc-common.inc +++ b/recipes/gcc/gcc-common.inc @@ -9,6 +9,8 @@ inherit autotools gettext FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" +COMPATIBLE_TARGET_SYS ?= "(?!nios2)" + # When making a Canadian SDK, we use these files too to make the compiler # for building for the new host part. So only obey TARGET_FPU for the # real target. diff --git a/recipes/gcc/gcc-configure-common.inc b/recipes/gcc/gcc-configure-common.inc index fe8b48655d..bad70a4094 100644 --- a/recipes/gcc/gcc-configure-common.inc +++ b/recipes/gcc/gcc-configure-common.inc @@ -21,10 +21,7 @@ OBJC ?= ",objc" # hidden symbols in libgcc.a which linker complains # when linking shared libraries further in the build like (gnutls) -OPTSPACE_linux-gnuspe ?= "" -OPTSPACE_linux-uclibcspe ?= "" -OPTSPACE ?= "--enable-target-optspace" - +OPTSPACE = "${@base_contains('TARGET_ARCH', 'powerpc', '', '--enable-target-optspace',d)}" # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran' FORTRAN ?= ",f77" LANGUAGES ?= "c,c++${OBJC}${FORTRAN}${JAVA}" @@ -39,7 +36,7 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, --enable-shared \ --enable-languages=${LANGUAGES} \ --enable-threads=posix \ - --enable-multilib \ + --disable-multilib \ --enable-c99 \ --enable-long-long \ --enable-symvers=gnu \ diff --git a/recipes/gcc/gcc-configure-cross.inc b/recipes/gcc/gcc-configure-cross.inc index 8b97b097ef..c3c2b665e4 100644 --- a/recipes/gcc/gcc-configure-cross.inc +++ b/recipes/gcc/gcc-configure-cross.inc @@ -2,10 +2,9 @@ require gcc-configure-common.inc USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}' -EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \ - --with-gxx-include-dir=${STAGING_DIR_TARGET}/${target_includedir}/c++ \ - --with-sysroot=${STAGING_DIR_TARGET} \ - --with-build-sysroot=${STAGING_DIR_TARGET}" +EXTRA_OECONF_PATHS = "--with-sysroot=${STAGING_DIR_TARGET} \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ + --with-build-time-tools=${STAGING_BINDIR_CROSS}" do_configure_prepend () { export CC="${BUILD_CC}" diff --git a/recipes/gcc/gcc-configure-sdk.inc b/recipes/gcc/gcc-configure-sdk.inc index 205b1067ef..328e780082 100644 --- a/recipes/gcc/gcc-configure-sdk.inc +++ b/recipes/gcc/gcc-configure-sdk.inc @@ -5,23 +5,23 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}' USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibceabi", "no", "", d )}' EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \ - --with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \ + --with-build-time-tools=${TOOLCHAIN_PATH}/${TARGET_SYS}/bin \ --with-build-sysroot=${STAGING_DIR_TARGET}" # # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse. # -export AR_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ar" -export AS_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/as" -export DLLTOOL_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/dlltool" -export LD_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ld" -export LIPO_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/lipo" -export NM_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/nm" -export OBJDUMP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/objdump" -export RANLIB_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/ranlib" -export STRIP_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/strip" -export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres" +export AR_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ar" +export AS_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/as" +export DLLTOOL_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/dlltool" +export LD_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ld" +export LIPO_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/lipo" +export NM_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/nm" +export OBJDUMP_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/objdump" +export RANLIB_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ranlib" +export STRIP_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/strip" +export WINDRES_FOR_TARGET = "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/windres" # # We need to override this and make sure the compiler can find staging diff --git a/recipes/gcc/gcc-cross-initial.inc b/recipes/gcc/gcc-cross-initial.inc index 97002f9784..b153322f71 100644 --- a/recipes/gcc/gcc-cross-initial.inc +++ b/recipes/gcc/gcc-cross-initial.inc @@ -12,11 +12,10 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \ --disable-multilib \ --disable-__cxa_atexit \ --enable-languages=c \ - --enable-target-optspace \ --program-prefix=${TARGET_PREFIX} \ - --with-sysroot=${STAGING_DIR_TARGET} \ - --with-build-sysroot=${STAGING_DIR_TARGET} \ + ${EXTRA_OECONF_PATHS} \ ${EXTRA_OECONF_INITIAL} \ + ${OPTSPACE} \ ${@get_gcc_fpu_setting(bb, d)} \ ${@get_gcc_mips_plt_setting(bb, d)}" diff --git a/recipes/gcc/gcc-cross-initial_4.4.3.bb b/recipes/gcc/gcc-cross-initial_4.4.4.bb index 1639511362..1639511362 100644 --- a/recipes/gcc/gcc-cross-initial_4.4.3.bb +++ b/recipes/gcc/gcc-cross-initial_4.4.4.bb diff --git a/recipes/gcc/gcc-cross-initial_4.5.0.bb b/recipes/gcc/gcc-cross-initial_4.5.bb index 1639511362..1639511362 100644 --- a/recipes/gcc/gcc-cross-initial_4.5.0.bb +++ b/recipes/gcc/gcc-cross-initial_4.5.bb diff --git a/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb index 2019def10c..110212be8d 100644 --- a/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb +++ b/recipes/gcc/gcc-cross-initial_csl-arm-2007q3.bb @@ -5,5 +5,6 @@ S = "${WORKDIR}/gcc-4.2" # Hack till we fix *libc properly do_install_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ + install -d ${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/${BINV}/include/ + ln -sf ${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/recipes/gcc/gcc-cross-intermediate.inc b/recipes/gcc/gcc-cross-intermediate.inc index 0c06d6f9da..6dbdb94581 100644 --- a/recipes/gcc/gcc-cross-intermediate.inc +++ b/recipes/gcc/gcc-cross-intermediate.inc @@ -10,10 +10,9 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${target_prefix} \ --disable-multilib \ --disable-threads \ --enable-languages=c \ - --enable-target-optspace \ --program-prefix=${TARGET_PREFIX} \ - --with-sysroot=${STAGING_DIR_TARGET} \ - --with-build-sysroot=${STAGING_DIR_TARGET} \ + ${EXTRA_OECONF_PATHS} \ + ${OPTSPACE} \ ${EXTRA_OECONF_INTERMEDIATE} \ ${@get_gcc_fpu_setting(bb, d)} \ ${@get_gcc_mips_plt_setting(bb, d)}" diff --git a/recipes/gcc/gcc-cross-intermediate_4.4.3.bb b/recipes/gcc/gcc-cross-intermediate_4.4.4.bb index eb59de9461..eb59de9461 100644 --- a/recipes/gcc/gcc-cross-intermediate_4.4.3.bb +++ b/recipes/gcc/gcc-cross-intermediate_4.4.4.bb diff --git a/recipes/gcc/gcc-cross-intermediate_4.5.0.bb b/recipes/gcc/gcc-cross-intermediate_4.5.bb index eb59de9461..eb59de9461 100644 --- a/recipes/gcc/gcc-cross-intermediate_4.5.0.bb +++ b/recipes/gcc/gcc-cross-intermediate_4.5.bb diff --git a/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb index 7bcf5d2396..b80ab0cc02 100644 --- a/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb +++ b/recipes/gcc/gcc-cross-intermediate_csl-arm-2007q3.bb @@ -5,5 +5,6 @@ S = "${WORKDIR}/gcc-4.2" # Hack till we fix *libc properly do_install_append() { - ln -sf ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/include/ + install -d ${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/${BINV}/include + ln -sf ${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/${BINV}/include-fixed/* ${TOOLCHAIN_PATH}/lib/gcc/${TARGET_SYS}/${BINV}/include/ } diff --git a/recipes/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb b/recipes/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb index 07da82eda8..c7dda1de3b 100644 --- a/recipes/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb +++ b/recipes/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb @@ -1,4 +1,4 @@ require gcc-cross-initial_${PV}.bb require gcc-cross-kernel.inc -SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1" +SRC_URI += "file://gcc-3.4.4-makefile-fix.patch" diff --git a/recipes/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb b/recipes/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb index e8051dde22..700839cbec 100644 --- a/recipes/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb +++ b/recipes/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb @@ -9,5 +9,5 @@ require gcc-cross-kernel.inc PR = "r3" -SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1" +SRC_URI += "file://gcc-3.4.4-makefile-fix.patch" diff --git a/recipes/gcc/gcc-cross-kernel.inc b/recipes/gcc/gcc-cross-kernel.inc index c0a8de77cc..370ba781dc 100644 --- a/recipes/gcc/gcc-cross-kernel.inc +++ b/recipes/gcc/gcc-cross-kernel.inc @@ -5,10 +5,6 @@ DEPENDS += "gcc-cross" PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}" -do_install () { - : -} - do_compile () { # This compiler is only for the kernel. Don't bother running fixincludes. mkdir -p gcc @@ -16,8 +12,8 @@ do_compile () { oe_runmake } -do_stage () { +do_install () { cd gcc - oe_runmake installdirs install-common install-headers install-libgcc - install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV} + oe_runmake 'DESTDIR=${D}' installdirs install-common install-headers install-libgcc + install -m 0755 xgcc ${D}${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gcc-${PV} } diff --git a/recipes/gcc/gcc-cross-sdk_3.3.4.bb b/recipes/gcc/gcc-cross-sdk_3.3.4.bb index 331941753c..b9fca30d68 100644 --- a/recipes/gcc/gcc-cross-sdk_3.3.4.bb +++ b/recipes/gcc/gcc-cross-sdk_3.3.4.bb @@ -5,5 +5,5 @@ inherit sdk require gcc-${PV}.inc require gcc-cross-sdk.inc -SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1' +SRC_URI += 'file://sdk-libstdc++-includes.patch' diff --git a/recipes/gcc/gcc-cross-sdk_3.4.3.bb b/recipes/gcc/gcc-cross-sdk_3.4.3.bb index e6b84bea8a..b1ca74bd0b 100644 --- a/recipes/gcc/gcc-cross-sdk_3.4.3.bb +++ b/recipes/gcc/gcc-cross-sdk_3.4.3.bb @@ -3,4 +3,4 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross-sdk.inc -SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1' +SRC_URI += 'file://sdk-libstdc++-includes.patch' diff --git a/recipes/gcc/gcc-cross-sdk_3.4.4.bb b/recipes/gcc/gcc-cross-sdk_3.4.4.bb index 75c41db6df..bb07bd36b6 100644 --- a/recipes/gcc/gcc-cross-sdk_3.4.4.bb +++ b/recipes/gcc/gcc-cross-sdk_3.4.4.bb @@ -3,11 +3,11 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross-sdk.inc -SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1' +SRC_URI += 'file://sdk-libstdc++-includes.patch' do_compile_prepend () { mkdir -p gcc - ln -s ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as - ln -s ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld + ln -s ${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}as gcc/as + ln -s ${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}ld gcc/ld } diff --git a/recipes/gcc/gcc-cross-sdk_4.4.3.bb b/recipes/gcc/gcc-cross-sdk_4.4.4.bb index 44abbcf75b..44abbcf75b 100644 --- a/recipes/gcc/gcc-cross-sdk_4.4.3.bb +++ b/recipes/gcc/gcc-cross-sdk_4.4.4.bb diff --git a/recipes/gcc/gcc-cross-sdk_4.5.0.bb b/recipes/gcc/gcc-cross-sdk_4.5.0.bb deleted file mode 100644 index a316cd282e..0000000000 --- a/recipes/gcc/gcc-cross-sdk_4.5.0.bb +++ /dev/null @@ -1,10 +0,0 @@ -PR = "r2" - -inherit sdk - -require gcc-${PV}.inc -require gcc-cross-sdk.inc - -EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ - --disable-libgomp --disable-libmudflap \ - --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross-sdk_4.5.bb b/recipes/gcc/gcc-cross-sdk_4.5.bb new file mode 100644 index 0000000000..e8ef4e2616 --- /dev/null +++ b/recipes/gcc/gcc-cross-sdk_4.5.bb @@ -0,0 +1,9 @@ +PR = "r4" + +inherit sdk + +require gcc-${PV}.inc +require gcc-cross-sdk.inc + +EXTRA_OECONF += " --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} --with-system-zlib" + diff --git a/recipes/gcc/gcc-cross.inc b/recipes/gcc/gcc-cross.inc index 44917f0dde..ec11fe1299 100644 --- a/recipes/gcc/gcc-cross.inc +++ b/recipes/gcc/gcc-cross.inc @@ -3,9 +3,5 @@ inherit cross DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${NATIVEDEPS}" PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" -do_stage () { - use_do_install_for_stage -} - require gcc-configure-cross.inc require gcc-package-cross.inc diff --git a/recipes/gcc/gcc-cross_4.1.1.bb b/recipes/gcc/gcc-cross_4.1.1.bb index 9204c2ead9..1864078f71 100644 --- a/recipes/gcc/gcc-cross_4.1.1.bb +++ b/recipes/gcc/gcc-cross_4.1.1.bb @@ -3,6 +3,6 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.1.2.bb b/recipes/gcc/gcc-cross_4.1.2.bb index a982717c64..d2038c71b9 100644 --- a/recipes/gcc/gcc-cross_4.1.2.bb +++ b/recipes/gcc/gcc-cross_4.1.2.bb @@ -3,7 +3,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF_append_avr32= " --disable-libmudflap " diff --git a/recipes/gcc/gcc-cross_4.2.1.bb b/recipes/gcc/gcc-cross_4.2.1.bb index e992448b98..359a817d70 100644 --- a/recipes/gcc/gcc-cross_4.2.1.bb +++ b/recipes/gcc/gcc-cross_4.2.1.bb @@ -1,9 +1,9 @@ -PR = "r21" +PR = "${INC_PR}.0" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.2.2.bb b/recipes/gcc/gcc-cross_4.2.2.bb index 8ab533b380..30c1d78912 100644 --- a/recipes/gcc/gcc-cross_4.2.2.bb +++ b/recipes/gcc/gcc-cross_4.2.2.bb @@ -3,7 +3,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.2.3.bb b/recipes/gcc/gcc-cross_4.2.3.bb index 0157034dd3..13dec2718e 100644 --- a/recipes/gcc/gcc-cross_4.2.3.bb +++ b/recipes/gcc/gcc-cross_4.2.3.bb @@ -3,7 +3,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.2.4.bb b/recipes/gcc/gcc-cross_4.2.4.bb index 0157034dd3..13dec2718e 100644 --- a/recipes/gcc/gcc-cross_4.2.4.bb +++ b/recipes/gcc/gcc-cross_4.2.4.bb @@ -3,7 +3,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.3.1.bb b/recipes/gcc/gcc-cross_4.3.1.bb index 1aa62aca56..1c191faedb 100644 --- a/recipes/gcc/gcc-cross_4.3.1.bb +++ b/recipes/gcc/gcc-cross_4.3.1.bb @@ -3,7 +3,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.3.2.bb b/recipes/gcc/gcc-cross_4.3.2.bb index 3edd35e9eb..322a203bf4 100644 --- a/recipes/gcc/gcc-cross_4.3.2.bb +++ b/recipes/gcc/gcc-cross_4.3.2.bb @@ -2,7 +2,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.3.3.bb b/recipes/gcc/gcc-cross_4.3.3.bb index 154bbc2fb4..c8e2f9bc10 100644 --- a/recipes/gcc/gcc-cross_4.3.3.bb +++ b/recipes/gcc/gcc-cross_4.3.3.bb @@ -2,7 +2,7 @@ PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.3.4.bb b/recipes/gcc/gcc-cross_4.3.4.bb index fc0c9a3c4c..7edb21b3ff 100644 --- a/recipes/gcc/gcc-cross_4.3.4.bb +++ b/recipes/gcc/gcc-cross_4.3.4.bb @@ -2,7 +2,7 @@ PR = "${INC_PR}.0" require gcc-${PV}.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --enable-cheaders=c_std --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.4.1.bb b/recipes/gcc/gcc-cross_4.4.1.bb index aa17095a13..fce459b494 100644 --- a/recipes/gcc/gcc-cross_4.4.1.bb +++ b/recipes/gcc/gcc-cross_4.4.1.bb @@ -2,7 +2,7 @@ require gcc-${PV}.inc require gcc-cross4.inc PR = "${INC_PR}.1" -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.4.2.bb b/recipes/gcc/gcc-cross_4.4.2.bb index aa17095a13..fce459b494 100644 --- a/recipes/gcc/gcc-cross_4.4.2.bb +++ b/recipes/gcc/gcc-cross_4.4.2.bb @@ -2,7 +2,7 @@ require gcc-${PV}.inc require gcc-cross4.inc PR = "${INC_PR}.1" -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.4.3.bb b/recipes/gcc/gcc-cross_4.4.4.bb index 5331c43574..4309fd4baf 100644 --- a/recipes/gcc/gcc-cross_4.4.3.bb +++ b/recipes/gcc/gcc-cross_4.4.4.bb @@ -1,8 +1,8 @@ require gcc-${PV}.inc require gcc-cross4.inc -PR = "${INC_PR}.1" +PR = "${INC_PR}.0" -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" diff --git a/recipes/gcc/gcc-cross_4.5.0.bb b/recipes/gcc/gcc-cross_4.5.bb index 3ffaa3adb4..a2da4a88e8 100644 --- a/recipes/gcc/gcc-cross_4.5.0.bb +++ b/recipes/gcc/gcc-cross_4.5.bb @@ -1,10 +1,9 @@ -PR = "r0" +PR = "r1" require gcc-${PV}.inc require gcc-cross4.inc -DEPENDS += "libmpc-native" - -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +NATIVEDEPS += "libmpc-native libelf-native" +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} --with-system-zlib" diff --git a/recipes/gcc/gcc-cross_csl-arm-2007q3.bb b/recipes/gcc/gcc-cross_csl-arm-2007q3.bb index 09453c05c1..c155fc2995 100644 --- a/recipes/gcc/gcc-cross_csl-arm-2007q3.bb +++ b/recipes/gcc/gcc-cross_csl-arm-2007q3.bb @@ -3,7 +3,7 @@ PR = "r6" require gcc-csl-arm-2007q3.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-multilib --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" @@ -14,9 +14,9 @@ LDFLAGS = "" # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain do_compile_prepend() { - ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/ - ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/ - ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure } diff --git a/recipes/gcc/gcc-cross_csl-arm-2008q1.bb b/recipes/gcc/gcc-cross_csl-arm-2008q1.bb index 3c359161f8..11f6aff10b 100644 --- a/recipes/gcc/gcc-cross_csl-arm-2008q1.bb +++ b/recipes/gcc/gcc-cross_csl-arm-2008q1.bb @@ -3,7 +3,7 @@ PR = "r5" require gcc-csl-arm-2008q1.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-multilib --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" @@ -14,9 +14,9 @@ LDFLAGS = "" # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain do_compile_prepend() { - ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/ - ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/ - ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure } diff --git a/recipes/gcc/gcc-cross_csl-arm-2008q3.bb b/recipes/gcc/gcc-cross_csl-arm-2008q3.bb index 905883d54c..c3d1af8ad8 100644 --- a/recipes/gcc/gcc-cross_csl-arm-2008q3.bb +++ b/recipes/gcc/gcc-cross_csl-arm-2008q3.bb @@ -3,7 +3,7 @@ PR = "r1" require gcc-csl-arm-2008q3.inc require gcc-cross4.inc -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += "--disable-multilib --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" @@ -14,9 +14,9 @@ LDFLAGS = "" # staging-linkage and cross-linkage recipes don't work anymore, so do it by hand for this backwards CSL toolchain do_compile_prepend() { - ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${CROSS_DIR}/${TARGET_SYS}/lib/ - ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${CROSS_DIR}/${TARGET_SYS}/lib/ - ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${CROSS_DIR}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}${target_libdir}/crt*.o ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}${target_libdir}/ld-* ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ + ln -sf ${STAGING_DIR_TARGET}/lib/libc* ${TOOLCHAIN_PATH}/${TARGET_SYS}/lib/ sed -i -e 's:gcc_no_link=yes:gcc_no_link=no:' ${S}/libstdc++-v3/configure } diff --git a/recipes/gcc/gcc-cross_svn.bb b/recipes/gcc/gcc-cross_svn.bb index 3ffaa3adb4..825a7bde8a 100644 --- a/recipes/gcc/gcc-cross_svn.bb +++ b/recipes/gcc/gcc-cross_svn.bb @@ -4,7 +4,7 @@ require gcc-cross4.inc DEPENDS += "libmpc-native" -SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 " +SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch " EXTRA_OECONF += " --disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native} --with-system-zlib" diff --git a/recipes/gcc/gcc-csl-arm-2005q3.inc b/recipes/gcc/gcc-csl-arm-2005q3.inc index 4ed1c05a71..3e9f3db2e8 100644 --- a/recipes/gcc/gcc-csl-arm-2005q3.inc +++ b/recipes/gcc/gcc-csl-arm-2005q3.inc @@ -7,10 +7,10 @@ PV_chinook-compat = "3.4.4cs2005q3.2" FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm" SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2005q3-2-arm-none-eabi.src.tar.bz2;name=archive \ - file://gcc_optab_arm.patch;patch=1 \ - file://gcc-3.4.4-eabi-bigendian.patch;patch=1 \ - file://libstdc++_configure.patch;patch=1 \ - file://demangle.patch;patch=1 \ + file://gcc_optab_arm.patch \ + file://gcc-3.4.4-eabi-bigendian.patch \ + file://libstdc++_configure.patch \ + file://demangle.patch \ " S = "${WORKDIR}/gcc-2005q3" diff --git a/recipes/gcc/gcc-csl-arm-2006q1.inc b/recipes/gcc/gcc-csl-arm-2006q1.inc index b20331a43f..daf242d401 100644 --- a/recipes/gcc/gcc-csl-arm-2006q1.inc +++ b/recipes/gcc/gcc-csl-arm-2006q1.inc @@ -6,8 +6,8 @@ PV = "4.1.0+csl-arm-2006q1-6" FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm" SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2006q1-6-arm-none-eabi.src.tar.bz2;name=archive \ - file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \ - file://gcc-new-makeinfo.patch;patch=1" +# file://gcc-configure-no-fortran.patch \ + file://gcc-new-makeinfo.patch" S = "${WORKDIR}/gcc-2006q1" diff --git a/recipes/gcc/gcc-csl-arm-2007q3.inc b/recipes/gcc/gcc-csl-arm-2007q3.inc index f637ad932e..dfee6f74fa 100644 --- a/recipes/gcc/gcc-csl-arm-2007q3.inc +++ b/recipes/gcc/gcc-csl-arm-2007q3.inc @@ -3,34 +3,34 @@ require gcc-common.inc BINV = "4.2.1" PV = "4.2.1+csl-arm-2007q3-53" -FILESPATH = "${FILE_DIRNAME}/gcc-csl-arm-2007q3:${FILE_DIRNAME}/gcc-csl-arm" +FILESPATHPKG =. "gcc-csl-arm-2007q3:gcc-csl-arm:" SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2007q3-53-arm-none-eabi.src.tar.bz2;name=archive \ - file://gcc-new-makeinfo.patch;patch=1 \ -# file://100-uclibc-conf.patch;patch=1 \ -# file://103-uclibc-conf-noupstream.patch;patch=1 \ -# file://200-uclibc-locale.patch;patch=1 \ -# file://203-uclibc-locale-no__x.patch;patch=1 \ -# file://204-uclibc-locale-wchar_fix.patch;patch=1 \ -# file://205-uclibc-locale-update.patch;patch=1 \ -# file://300-libstdc++-pic.patch;patch=1 \ -# file://302-c99-snprintf.patch;patch=1 \ -# file://303-c99-complex-ugly-hack.patch;patch=1 \ -# file://304-index_macro.patch;patch=1 \ -# file://305-libmudflap-susv3-legacy.patch;patch=1 \ -# file://306-libstdc++-namespace.patch;patch=1 \ -# file://307-locale_facets.patch;patch=1 \ -# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ -# file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ -# file://gfortran.patch;patch=1 \ -# file://fortran-static-linking.patch;patch=1 \ -# file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \ -# file://gcc-new-makeinfo.patch;patch=1 \ - file://gcc-Os-fix.diff;patch=1 \ + file://gcc-new-makeinfo.patch \ +# file://100-uclibc-conf.patch \ +# file://103-uclibc-conf-noupstream.patch \ +# file://200-uclibc-locale.patch \ +# file://203-uclibc-locale-no__x.patch \ +# file://204-uclibc-locale-wchar_fix.patch \ +# file://205-uclibc-locale-update.patch \ +# file://300-libstdc++-pic.patch \ +# file://302-c99-snprintf.patch \ +# file://303-c99-complex-ugly-hack.patch \ +# file://304-index_macro.patch \ +# file://305-libmudflap-susv3-legacy.patch \ +# file://306-libstdc++-namespace.patch \ +# file://307-locale_facets.patch \ +# file://402-libbackend_dep_gcov-iov.h.patch \ +# file://602-sdk-libstdc++-includes.patch \ + file://gcc41-configure.in.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://zecke-xgcc-cpp.patch \ +# file://gfortran.patch \ +# file://fortran-static-linking.patch \ +# file://gcc-configure-no-fortran.patch \ +# file://gcc-new-makeinfo.patch \ + file://gcc-Os-fix.diff \ " diff --git a/recipes/gcc/gcc-csl-arm-2008q1.inc b/recipes/gcc/gcc-csl-arm-2008q1.inc index a0d4ec6eb6..be686a880b 100644 --- a/recipes/gcc/gcc-csl-arm-2008q1.inc +++ b/recipes/gcc/gcc-csl-arm-2008q1.inc @@ -6,29 +6,29 @@ PV = "4.2.3+csl-arm-2008q1-126" FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm" SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2008q1-126-arm-none-eabi.src.tar.bz2;name=archive \ -# file://100-uclibc-conf.patch;patch=1 \ -# file://103-uclibc-conf-noupstream.patch;patch=1 \ -# file://200-uclibc-locale.patch;patch=1 \ -# file://203-uclibc-locale-no__x.patch;patch=1 \ -# file://204-uclibc-locale-wchar_fix.patch;patch=1 \ -# file://205-uclibc-locale-update.patch;patch=1 \ -# file://300-libstdc++-pic.patch;patch=1 \ -# file://302-c99-snprintf.patch;patch=1 \ -# file://303-c99-complex-ugly-hack.patch;patch=1 \ -# file://304-index_macro.patch;patch=1 \ -# file://305-libmudflap-susv3-legacy.patch;patch=1 \ -# file://306-libstdc++-namespace.patch;patch=1 \ -# file://307-locale_facets.patch;patch=1 \ -# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \ -# file://602-sdk-libstdc++-includes.patch;patch=1 \ - file://gcc41-configure.in.patch;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://zecke-xgcc-cpp.patch;patch=1 \ -# file://gfortran-4.3.x.patch;patch=1 \ -# file://fortran-static-linking.patch;patch=1 \ -# file://gcc-configure-no-fortran.patch;patch=1;pnum=1 \ -# file://gcc-new-makeinfo.patch;patch=1 \ +# file://100-uclibc-conf.patch \ +# file://103-uclibc-conf-noupstream.patch \ +# file://200-uclibc-locale.patch \ +# file://203-uclibc-locale-no__x.patch \ +# file://204-uclibc-locale-wchar_fix.patch \ +# file://205-uclibc-locale-update.patch \ +# file://300-libstdc++-pic.patch \ +# file://302-c99-snprintf.patch \ +# file://303-c99-complex-ugly-hack.patch \ +# file://304-index_macro.patch \ +# file://305-libmudflap-susv3-legacy.patch \ +# file://306-libstdc++-namespace.patch \ +# file://307-locale_facets.patch \ +# file://402-libbackend_dep_gcov-iov.h.patch \ +# file://602-sdk-libstdc++-includes.patch \ + file://gcc41-configure.in.patch \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://zecke-xgcc-cpp.patch \ +# file://gfortran-4.3.x.patch \ +# file://fortran-static-linking.patch \ +# file://gcc-configure-no-fortran.patch \ +# file://gcc-new-makeinfo.patch \ " diff --git a/recipes/gcc/gcc-csl-arm-2008q3.inc b/recipes/gcc/gcc-csl-arm-2008q3.inc index acfad31284..79a9f8feba 100644 --- a/recipes/gcc/gcc-csl-arm-2008q3.inc +++ b/recipes/gcc/gcc-csl-arm-2008q3.inc @@ -6,13 +6,13 @@ PV = "4.3.2+csl-arm-2008q3-39" FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm-2008q3" SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2008q3-39-arm-none-eabi.src.tar.bz2;name=archive \ - file://gcc-csl-2008q3-hotfix.diff;patch=1 \ - file://arm-nolibfloat.patch;patch=1 \ - file://arm-softfloat.patch;patch=1 \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ - file://gcc-4.3.1-SYSROOT_CFLAGS_FOR_TARGET.patch;patch=1 \ - file://gfortran-4.3.x.patch;patch=1 \ + file://gcc-csl-2008q3-hotfix.diff \ + file://arm-nolibfloat.patch \ + file://arm-softfloat.patch \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://gcc-flags-for-build.patch \ + file://gcc-4.3.1-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://gfortran-4.3.x.patch \ " diff --git a/recipes/gcc/gcc-native.inc b/recipes/gcc/gcc-native.inc index 63b7375e96..82c6da0e9a 100644 --- a/recipes/gcc/gcc-native.inc +++ b/recipes/gcc/gcc-native.inc @@ -16,11 +16,7 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${prefix} \ --program-prefix=${TARGET_PREFIX}" do_install () { - : -} - -do_stage () { cd gcc - oe_runmake install-common install-headers install-libgcc - install -m 0755 xgcc ${STAGING_BINDIR}/gcc-${PV} + oe_runmake 'DESTDIR=${D}' install-common install-headers install-libgcc + install -m 0755 xgcc ${D}${STAGING_BINDIR}/gcc-${PV} } diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc index 5236928d83..0c4ea2d69a 100644 --- a/recipes/gcc/gcc-package-cross.inc +++ b/recipes/gcc/gcc-package-cross.inc @@ -17,7 +17,6 @@ FILES_libstdc++ = "${target_libdir}/libstdc++.so.*" do_install () { oe_runmake 'DESTDIR=${D}' install - install -d ${D}${target_base_libdir} install -d ${D}${target_libdir} @@ -39,15 +38,18 @@ do_install () { # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 # gfortran is fully backwards compatible. This is a safe and practical solution. - if [ -f ${D}${CROSS_DIR}/bin/${TARGET_PREFIX}gfortran ]; then + if [ -f ${D}${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gfortran ]; then currdir="$PWD" - cd ${D}${CROSS_DIR}/bin/ + cd ${D}${TOOLCHAIN_PATH}/bin/ ln -sf ${TARGET_PREFIX}gfortran ${TARGET_PREFIX}g77 || true - if [ -d ${CROSS_DIR}/${TARGET_SYS}/bin/ ] ; then - cd ${CROSS_DIR}/${TARGET_SYS}/bin/ + if [ -d ${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ ] ; then + cd ${TOOLCHAIN_PATH}/${TARGET_SYS}/bin/ ln -sf gfortran g77 || true fi cd $currdir fi + # We use libiberty from binutils or binutils-cross + rm -f ${D}${libdir}/libiberty.a + rm -f ${D}${target_libdir}/libiberty.a } diff --git a/recipes/gcc/gcc-package-sdk.inc b/recipes/gcc/gcc-package-sdk.inc index dd32ec7561..014897a52d 100644 --- a/recipes/gcc/gcc-package-sdk.inc +++ b/recipes/gcc/gcc-package-sdk.inc @@ -55,8 +55,14 @@ do_install () { # Manually run the target stripper since we won't get it run by # the packaging. if [ "x${OLD_PACKAGE_STRIP}" != "xno" ]; then - ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libstdc++.so.* - ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libg2c.so.* || true - ${TARGET_PREFIX}strip ${D}${prefix}/${TARGET_SYS}/lib/libgcc_s.so.* + for soFile in ${D}${prefix}/${TARGET_SYS}/lib/libstdc++.so.* ${D}${prefix}/${TARGET_SYS}/lib/libg2c.so.* ${D}${prefix}/${TARGET_SYS}/lib/libgcc_s.so.*; do + if echo ${soFile} | grep '.py$' ; then + echo "Not stripping .py file ${soFile}" + elif echo ${soFile} | grep '*' ; then + echo "Not stripping non-existent mask ${soFile}" + else + ${TARGET_PREFIX}strip ${soFile} + fi + done fi } diff --git a/recipes/gcc/gcc-svn.inc b/recipes/gcc/gcc-svn.inc index eff9306787..2e24d63c1a 100644 --- a/recipes/gcc/gcc-svn.inc +++ b/recipes/gcc/gcc-svn.inc @@ -14,11 +14,11 @@ PV = "4.6+svnr${SRCPV}" FILESPATHPKG .= ":gcc-svn" SRC_URI = "svn://gcc.gnu.org/svn/gcc;module=trunk \ - file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch;patch=1 \ - file://100-uclibc-conf.patch;patch=1 \ - file://gcc-uclibc-locale-ctype_touplow_t.patch;patch=1 \ - file://cache-amnesia.patch;patch=1 \ - file://gcc-flags-for-build.patch;patch=1 \ + file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://100-uclibc-conf.patch \ + file://gcc-uclibc-locale-ctype_touplow_t.patch \ + file://cache-amnesia.patch \ + file://gcc-flags-for-build.patch \ " # Language Overrides @@ -42,5 +42,3 @@ do_unpack_append() { EXTRA_OECONF_append_linux-uclibc = " --disable-decimal-float " EXTRA_OECONF_append_linux-uclibceabi = " --disable-decimal-float " EXTRA_OECONF_append_linux-uclibcspe = " --disable-decimal-float " -EXTRA_OECONF_append_linux-uclibc = " ${@base_contains('TARGET_ARCH', 'powerpc', '--without-long-double-128', '',d)}" - diff --git a/recipes/gcc/gcc_4.2.1.bb b/recipes/gcc/gcc_4.2.1.bb index 9951efd424..94faba1213 100644 --- a/recipes/gcc/gcc_4.2.1.bb +++ b/recipes/gcc/gcc_4.2.1.bb @@ -1,4 +1,4 @@ -PR = "r15" +PR = "${INC_PR}.0" require gcc-${PV}.inc require gcc-configure-target.inc diff --git a/recipes/gcc/gcc_4.2.2.bb b/recipes/gcc/gcc_4.2.2.bb index 2153f272ee..30713f8a47 100644 --- a/recipes/gcc/gcc_4.2.2.bb +++ b/recipes/gcc/gcc_4.2.2.bb @@ -4,6 +4,6 @@ require gcc-${PV}.inc require gcc-configure-target.inc require gcc-package-target.inc -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.2.3.bb b/recipes/gcc/gcc_4.2.3.bb index 1da86a3fc5..6fe30282d6 100644 --- a/recipes/gcc/gcc_4.2.3.bb +++ b/recipes/gcc/gcc_4.2.3.bb @@ -4,7 +4,7 @@ require gcc-${PV}.inc require gcc-configure-target.inc require gcc-package-target.inc -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.2.4.bb b/recipes/gcc/gcc_4.2.4.bb index 1da86a3fc5..6fe30282d6 100644 --- a/recipes/gcc/gcc_4.2.4.bb +++ b/recipes/gcc/gcc_4.2.4.bb @@ -4,7 +4,7 @@ require gcc-${PV}.inc require gcc-configure-target.inc require gcc-package-target.inc -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.3.1.bb b/recipes/gcc/gcc_4.3.1.bb index 6b20b47f1a..442c273ffc 100644 --- a/recipes/gcc/gcc_4.3.1.bb +++ b/recipes/gcc/gcc_4.3.1.bb @@ -4,7 +4,7 @@ require gcc-${PV}.inc require gcc-configure-target.inc require gcc-package-target.inc -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.3.2.bb b/recipes/gcc/gcc_4.3.2.bb index 60180755c9..c73dfc1c84 100644 --- a/recipes/gcc/gcc_4.3.2.bb +++ b/recipes/gcc/gcc_4.3.2.bb @@ -8,6 +8,6 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.3.3.bb b/recipes/gcc/gcc_4.3.3.bb index 4001767860..274f474d37 100644 --- a/recipes/gcc/gcc_4.3.3.bb +++ b/recipes/gcc/gcc_4.3.3.bb @@ -8,7 +8,7 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.3.4.bb b/recipes/gcc/gcc_4.3.4.bb index b360ed84e9..ec20085d90 100644 --- a/recipes/gcc/gcc_4.3.4.bb +++ b/recipes/gcc/gcc_4.3.4.bb @@ -8,6 +8,6 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.4.1.bb b/recipes/gcc/gcc_4.4.1.bb index 85606ce4a5..52b09cf661 100644 --- a/recipes/gcc/gcc_4.4.1.bb +++ b/recipes/gcc/gcc_4.4.1.bb @@ -8,7 +8,7 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.4.2.bb b/recipes/gcc/gcc_4.4.2.bb index 65a73cd68a..d1d50adacf 100644 --- a/recipes/gcc/gcc_4.4.2.bb +++ b/recipes/gcc/gcc_4.4.2.bb @@ -8,7 +8,7 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.4.3.bb b/recipes/gcc/gcc_4.4.4.bb index 8b29e4a420..271e9d152d 100644 --- a/recipes/gcc/gcc_4.4.3.bb +++ b/recipes/gcc/gcc_4.4.4.bb @@ -8,6 +8,6 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_4.5.0.bb b/recipes/gcc/gcc_4.5.bb index 55725b0044..ad71ada0f9 100644 --- a/recipes/gcc/gcc_4.5.0.bb +++ b/recipes/gcc/gcc_4.5.bb @@ -1,4 +1,4 @@ -PR = "r0" +PR = "${INC_PR}.1" require gcc-${PV}.inc require gcc-configure-target.inc require gcc-package-target.inc @@ -6,8 +6,10 @@ require gcc-package-target.inc # Gcc 4.3.3 installs crt* in a '4.3.1' dir.... FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ + ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto1 \ + ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto-wrapper \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/gcc_svn.bb b/recipes/gcc/gcc_svn.bb index 55725b0044..40e1f7c3e5 100644 --- a/recipes/gcc/gcc_svn.bb +++ b/recipes/gcc/gcc_svn.bb @@ -8,6 +8,6 @@ FILES_${PN} += "\ ${gcclibdir}/${TARGET_SYS}/*/*.o \ " -SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1" +SRC_URI_append = "file://fortran-cross-compile-hack.patch" ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}" diff --git a/recipes/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb b/recipes/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb index 0117106e5a..acdccc82f5 100644 --- a/recipes/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb +++ b/recipes/gcc/mingw-gcc-canadian-cross-initial_3.4.5-20060117-2.bb @@ -3,5 +3,5 @@ require gcc-canadian-cross-initial.inc SRC_URI = "\ ${SOURCEFORGE_MIRROR}/mingw/gcc-core-${PV}-src.tar.gz;name=core \ - file://includedir.patch;patch=1 \ + file://includedir.patch \ " diff --git a/recipes/gcc/mingw-gcc_3.4.5-20060117-2.bb b/recipes/gcc/mingw-gcc_3.4.5-20060117-2.bb index 2a62056698..0c0c74f75b 100644 --- a/recipes/gcc/mingw-gcc_3.4.5-20060117-2.bb +++ b/recipes/gcc/mingw-gcc_3.4.5-20060117-2.bb @@ -16,7 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/mingw/gcc-core-${PV}-src.tar.gz;name=core \ ${SOURCEFORGE_MIRROR}/mingw/gcc-java-${PV}-src.tar.gz;name=java \ ${SOURCEFORGE_MIRROR}/mingw/gcc-objc-${PV}-src.tar.gz;name=objc \ ${SOURCEFORGE_MIRROR}/mingw/gcc-ada-${PV}-src.tar.gz;name=ada \ - file://includedir.patch;patch=1 \ + file://includedir.patch \ " |