From 192f7db5aa57125e714585bd7ce0e9a2c6c5922c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 11 May 2010 16:51:55 -0700 Subject: gcc-4.4.4: Move gcc 4.4.3 recipes to gcc 4.4.4 * Reset INC_PR and update checksums. Signed-off-by: Khem Raj --- recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch | 37 + recipes/gcc/gcc-4.4.4/cache-amnesia.patch | 31 + .../gcc/gcc-4.4.4/fortran-cross-compile-hack.patch | 30 + .../gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 31 + .../gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch | 28 + ...cc-disable-linux-unwind-with-libc-inhibit.patch | 35 + recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch | 279 +++++ recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch | 691 +++++++++++ .../gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch | 261 +++++ .../gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch | 1216 ++++++++++++++++++++ .../gcc-4.4.4/gcc-ppc_single_precision_regs.patch | 60 + recipes/gcc/gcc-4.4.4/gcc-pr41175.patch | 1172 +++++++++++++++++++ .../gcc-uclibc-locale-ctype_touplow_t.patch | 52 + recipes/gcc/gcc-4.4.4/zecke-no-host-includes.patch | 31 + recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch | 28 + 15 files changed, 3982 insertions(+) create mode 100644 recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch create mode 100644 recipes/gcc/gcc-4.4.4/cache-amnesia.patch create mode 100644 recipes/gcc/gcc-4.4.4/fortran-cross-compile-hack.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-disable-linux-unwind-with-libc-inhibit.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-ppc_single_precision_regs.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-pr41175.patch create mode 100644 recipes/gcc/gcc-4.4.4/gcc-uclibc-locale-ctype_touplow_t.patch create mode 100644 recipes/gcc/gcc-4.4.4/zecke-no-host-includes.patch create mode 100644 recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch (limited to 'recipes/gcc/gcc-4.4.4') diff --git a/recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch b/recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch new file mode 100644 index 0000000000..0b799607e8 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/100-uclibc-conf.patch @@ -0,0 +1,37 @@ +Index: gcc-4.3.1/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.3.1.orig/contrib/regression/objs-gcc.sh 2007-12-24 15:18:57.000000000 -0800 ++++ gcc-4.3.1/contrib/regression/objs-gcc.sh 2008-08-16 01:15:12.000000000 -0700 +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +Index: gcc-4.3.1/libjava/classpath/ltconfig +=================================================================== +--- gcc-4.3.1.orig/libjava/classpath/ltconfig 2007-06-03 16:18:43.000000000 -0700 ++++ gcc-4.3.1/libjava/classpath/ltconfig 2008-08-16 01:15:12.000000000 -0700 +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/recipes/gcc/gcc-4.4.4/cache-amnesia.patch b/recipes/gcc/gcc-4.4.4/cache-amnesia.patch new file mode 100644 index 0000000000..d5281ea575 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/cache-amnesia.patch @@ -0,0 +1,31 @@ +--- + gcc/configure | 2 +- + gcc/configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: gcc-4.4.1/gcc/configure.ac +=================================================================== +--- gcc-4.4.1.orig/gcc/configure.ac 2009-03-24 10:46:03.000000000 -0700 ++++ gcc-4.4.1/gcc/configure.ac 2009-09-04 19:23:39.751461633 -0700 +@@ -1455,7 +1455,7 @@ + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- ${realsrcdir}/configure \ ++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias + CFLAGS="${saved_CFLAGS}" +Index: gcc-4.4.1/gcc/configure +=================================================================== +--- gcc-4.4.1.orig/gcc/configure 2009-03-24 10:46:03.000000000 -0700 ++++ gcc-4.4.1/gcc/configure 2009-09-04 19:25:37.831459717 -0700 +@@ -13531,7 +13531,7 @@ + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ + LDFLAGS="${LDFLAGS_FOR_BUILD}" \ +- ${realsrcdir}/configure \ ++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias + CFLAGS="${saved_CFLAGS}" diff --git a/recipes/gcc/gcc-4.4.4/fortran-cross-compile-hack.patch b/recipes/gcc/gcc-4.4.4/fortran-cross-compile-hack.patch new file mode 100644 index 0000000000..b3d38ad983 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/fortran-cross-compile-hack.patch @@ -0,0 +1,30 @@ +* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used + used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross + directory. + +diff --git a/libgfortran/configure b/libgfortran/configure +index f7d86fb..d0966ec 100755 +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -4475,6 +4475,6 @@ exec 5>>./config.log + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + ac_ext=${FC_SRCEXT-f} + ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5' +\ No newline at end of file +diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac +index 4661306..9f83e55 100644 +--- a/libgfortran/configure.ac ++++ b/libgfortran/configure.ac +@@ -140,7 +140,7 @@ AC_SUBST(enable_static) + + # We need gfortran to compile parts of the library + #AC_PROG_FC(gfortran) +-FC="$GFORTRAN" ++#FC="$GFORTRAN" + AC_PROG_FC(gfortran) + + # extra LD Flags which are required for targets diff --git a/recipes/gcc/gcc-4.4.4/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 new file mode 100644 index 0000000000..f33e6c1ea6 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch @@ -0,0 +1,31 @@ +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: gcc-4.3.1/configure.ac +=================================================================== +--- gcc-4.3.1.orig/configure.ac 2008-07-21 12:29:18.000000000 -0700 ++++ gcc-4.3.1/configure.ac 2008-07-21 12:29:35.000000000 -0700 +@@ -2352,7 +2352,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in +Index: gcc-4.3.1/configure +=================================================================== +--- gcc-4.3.1.orig/configure 2008-07-21 12:29:48.000000000 -0700 ++++ gcc-4.3.1/configure 2008-07-21 12:29:59.000000000 -0700 +@@ -5841,7 +5841,7 @@ fi + # for target_alias and gcc doesn't manage it consistently. + target_configargs="--cache-file=./config.cache ${target_configargs}" + +-FLAGS_FOR_TARGET= ++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" + case " $target_configdirs " in + *" newlib "*) + case " $target_configargs " in diff --git a/recipes/gcc/gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch b/recipes/gcc/gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch new file mode 100644 index 0000000000..37670375e8 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-armv4-pass-fix-v4bx-to-ld.patch @@ -0,0 +1,28 @@ +The LINK_SPEC for linux gets overwritten by linux-eabi.h which +means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result +the option is not passed to linker when chosing march=armv4 +This patch redefines this in linux-eabi.h and reinserts it +for eabi defaulting toolchains. + +We might want to send it upstream + +-Khem +Index: gcc-4.4.1/gcc/config/arm/linux-eabi.h +=================================================================== +--- gcc-4.4.1.orig/gcc/config/arm/linux-eabi.h 2009-10-09 12:25:06.142471730 -0700 ++++ gcc-4.4.1/gcc/config/arm/linux-eabi.h 2009-10-09 12:28:57.564946305 -0700 +@@ -63,10 +63,13 @@ + #undef GLIBC_DYNAMIC_LINKER + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" + ++#undef TARGET_FIX_V4BX_SPEC ++#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4:--fix-v4bx}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +-#define LINK_SPEC LINUX_TARGET_LINK_SPEC ++#define LINK_SPEC LINUX_TARGET_LINK_SPEC TARGET_FIX_V4BX_SPEC + + /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we + do not use -lfloat. */ diff --git a/recipes/gcc/gcc-4.4.4/gcc-disable-linux-unwind-with-libc-inhibit.patch b/recipes/gcc/gcc-4.4.4/gcc-disable-linux-unwind-with-libc-inhibit.patch new file mode 100644 index 0000000000..a6ba7a70ab --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-disable-linux-unwind-with-libc-inhibit.patch @@ -0,0 +1,35 @@ +Backport this patch + +2009-04-02 Andrew Stubbs + + * config/sh/linux-unwind.h: Disable when inhibit_libc is defined. + + +http://gcc.gnu.org/viewcvs?view=rev&revision=145442 + +To get gcc compiled for SH + +-Khem +Index: gcc-4.4.1/gcc/config/sh/linux-unwind.h +=================================================================== +--- gcc-4.4.1.orig/gcc/config/sh/linux-unwind.h 2009-08-08 10:21:35.943210469 -0700 ++++ gcc-4.4.1/gcc/config/sh/linux-unwind.h 2009-08-08 10:22:18.643210817 -0700 +@@ -24,7 +24,11 @@ + + + /* Do code reading to identify a signal frame, and set the frame +- state data appropriately. See unwind-dw2.c for the structs. */ ++ state data appropriately. See unwind-dw2.c for the structs. ++ Don't use this at all if inhibit_libc is used. */ ++ ++#ifndef inhibit_libc ++ + + #include + #include +@@ -248,3 +252,5 @@ + return _URC_NO_REASON; + } + #endif /* defined (__SH5__) */ ++ ++#endif /* inhibit_libc */ diff --git a/recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch b/recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch new file mode 100644 index 0000000000..5193abecdb --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-flags-for-build.patch @@ -0,0 +1,279 @@ +Index: gcc-4.4.1/Makefile.def +=================================================================== +--- gcc-4.4.1.orig/Makefile.def 2009-04-24 21:10:29.000000000 -0700 ++++ gcc-4.4.1/Makefile.def 2009-09-04 19:48:48.544457885 -0700 +@@ -227,6 +227,7 @@ + flags_to_pass = { flag= BISON ; }; + flags_to_pass = { flag= CC_FOR_BUILD ; }; + flags_to_pass = { flag= CFLAGS_FOR_BUILD ; }; ++flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; }; + flags_to_pass = { flag= CXX_FOR_BUILD ; }; + flags_to_pass = { flag= EXPECT ; }; + flags_to_pass = { flag= FLEX ; }; +Index: gcc-4.4.1/gcc/Makefile.in +=================================================================== +--- gcc-4.4.1.orig/gcc/Makefile.in 2009-05-21 16:17:37.000000000 -0700 ++++ gcc-4.4.1/gcc/Makefile.in 2009-09-04 19:48:48.544457885 -0700 +@@ -695,7 +695,7 @@ + + # Native linker and preprocessor flags. For x-fragment overrides. + BUILD_LDFLAGS=@BUILD_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.4.1/gcc/configure.ac +=================================================================== +--- gcc-4.4.1.orig/gcc/configure.ac 2009-09-04 19:44:39.460457838 -0700 ++++ gcc-4.4.1/gcc/configure.ac 2009-09-04 19:48:48.548458814 -0700 +@@ -1745,10 +1745,11 @@ + # 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 +@@ -1766,6 +1767,7 @@ + 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.4.1/Makefile.in +=================================================================== +--- gcc-4.4.1.orig/Makefile.in 2009-04-24 21:10:29.000000000 -0700 ++++ gcc-4.4.1/Makefile.in 2009-09-04 19:48:48.560478778 -0700 +@@ -288,6 +288,7 @@ + AS_FOR_BUILD = @AS_FOR_BUILD@ + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ + CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ + CXX_FOR_BUILD = @CXX_FOR_BUILD@ + DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ +@@ -528,6 +529,7 @@ + "BISON=$(BISON)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ ++ "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \ + "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ + "EXPECT=$(EXPECT)" \ + "FLEX=$(FLEX)" \ +Index: gcc-4.4.1/gcc/configure +=================================================================== +--- gcc-4.4.1.orig/gcc/configure 2009-09-04 19:44:39.464458137 -0700 ++++ gcc-4.4.1/gcc/configure 2009-09-04 19:50:28.600466982 -0700 +@@ -458,7 +458,7 @@ + # include + #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 GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_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 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 OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 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 gcc_cv_readelf 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 fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC 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 GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP loose_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 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 OBJDUMP ac_ct_OBJDUMP ac_ct_AR STRIP ac_ct_STRIP lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 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 gcc_cv_readelf 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 fortran_target_objs target_cpu_default GMPLIBS GMPINC PPLLIBS PPLINC CLOOGLIBS CLOOGINC LIBOBJS LTLIBOBJS' + ac_subst_files='language_hooks' + ac_pwd=`pwd` + +@@ -14025,6 +14025,7 @@ + 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. +@@ -14043,6 +14044,7 @@ + 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 +@@ -14509,13 +14511,13 @@ + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:14512: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:14514: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:14515: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:14517: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:14518: output\"" >&5) ++ (eval echo "\"\$as_me:14520: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" +@@ -15672,7 +15674,7 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 15675 "configure"' > conftest.$ac_ext ++ echo '#line 15677 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -16971,11 +16973,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:16974: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:16976: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:16978: \$? = $ac_status" >&5 ++ echo "$as_me:16980: \$? = $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. +@@ -17310,11 +17312,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:17313: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17315: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:17317: \$? = $ac_status" >&5 ++ echo "$as_me:17319: \$? = $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. +@@ -17415,11 +17417,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:17418: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17420: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:17422: \$? = $ac_status" >&5 ++ echo "$as_me:17424: \$? = $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 +@@ -17470,11 +17472,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:17473: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:17475: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:17477: \$? = $ac_status" >&5 ++ echo "$as_me:17479: \$? = $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 +@@ -20282,7 +20284,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 20285 "configure" ++#line 20287 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -20378,7 +20380,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 20381 "configure" ++#line 20383 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -25544,6 +25546,7 @@ + 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.4.1/Makefile.tpl +=================================================================== +--- gcc-4.4.1.orig/Makefile.tpl 2009-04-14 01:57:33.000000000 -0700 ++++ gcc-4.4.1/Makefile.tpl 2009-09-04 19:48:48.572480864 -0700 +@@ -291,6 +291,7 @@ + AS_FOR_BUILD = @AS_FOR_BUILD@ + CC_FOR_BUILD = @CC_FOR_BUILD@ + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ ++CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ + CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ + CXX_FOR_BUILD = @CXX_FOR_BUILD@ + DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ +Index: gcc-4.4.1/configure +=================================================================== +--- gcc-4.4.1.orig/configure 2009-09-04 19:44:36.588457634 -0700 ++++ gcc-4.4.1/configure 2009-09-04 19:50:39.904468246 -0700 +@@ -272,7 +272,7 @@ + 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 TOPLEVEL_CONFIGURE_ARGUMENTS 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 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 extra_mpfr_configure_flags ppllibs pplinc clooglibs clooginc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR 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 TOPLEVEL_CONFIGURE_ARGUMENTS 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 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 extra_mpfr_configure_flags ppllibs pplinc clooglibs clooginc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR 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' + ac_pwd=`pwd` + +@@ -6312,6 +6312,7 @@ + # our build compiler if desired. + if test x"${build}" = x"${host}" ; then + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} ++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} + CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} + fi +@@ -6390,6 +6391,7 @@ + + + ++ + # 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. +@@ -13279,6 +13281,7 @@ + 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 ++s,@CPPFLAGS_FOR_BUILD@,$CPPFLAGS_FOR_BUILD,;t t + 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.4.1/configure.ac +=================================================================== +--- gcc-4.4.1.orig/configure.ac 2009-09-04 19:44:36.584475215 -0700 ++++ gcc-4.4.1/configure.ac 2009-09-04 19:48:48.576467893 -0700 +@@ -2613,6 +2613,7 @@ + # our build compiler if desired. + if test x"${build}" = x"${host}" ; then + CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} ++ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} + CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} + LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} + fi +@@ -2678,6 +2679,7 @@ + AC_SUBST(AS_FOR_BUILD) + AC_SUBST(CC_FOR_BUILD) + AC_SUBST(CFLAGS_FOR_BUILD) ++AC_SUBST(CPPFLAGS_FOR_BUILD) + AC_SUBST(CXXFLAGS_FOR_BUILD) + AC_SUBST(CXX_FOR_BUILD) + AC_SUBST(DLLTOOL_FOR_BUILD) diff --git a/recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch b/recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch new file mode 100644 index 0000000000..88f110b030 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-improve-tls-macro.patch @@ -0,0 +1,691 @@ +This is fudge of following patches from trunk + +http://gcc.gnu.org/ml/gcc-cvs/2009-07/msg00629.html +http://gcc.gnu.org/ml/gcc-cvs/2009-07/msg00606.html + +It improved the TLS support detection by performing link step +because so far it was only probing assembler to determine +if TLS was supported. + +-Khem +Index: gcc-4.4.1/config/tls.m4 +=================================================================== +--- gcc-4.4.1.orig/config/tls.m4 2009-01-22 20:58:03.000000000 -0800 ++++ gcc-4.4.1/config/tls.m4 2009-08-28 15:14:00.419824470 -0700 +@@ -1,5 +1,6 @@ + dnl Check whether the target supports TLS. + AC_DEFUN([GCC_CHECK_TLS], [ ++ AC_REQUIRE([AC_CANONICAL_HOST]) + GCC_ENABLE(tls, yes, [], [Use thread-local storage]) + AC_CACHE_CHECK([whether the target supports thread-local storage], + gcc_cv_have_tls, [ +@@ -66,7 +67,24 @@ + [dnl This is the cross-compiling case. Assume libc supports TLS if the + dnl binutils and the compiler do. + AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], +- [gcc_cv_have_tls=yes], [gcc_cv_have_tls=no]) ++ [chktls_save_LDFLAGS="$LDFLAGS" ++ dnl Shared library options may depend on the host; this check ++ dnl is only known to be needed for GNU/Linux. ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ dnl If -shared works, test if TLS works in a shared library. ++ AC_LINK_IFELSE([int f() { return 0; }], ++ [AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }], ++ [gcc_cv_have_tls=yes], ++ [gcc_cv_have_tls=no])], ++ [gcc_cv_have_tls=yes]) ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS"], [gcc_cv_have_tls=no]) + ] + )]) + if test "$enable_tls $gcc_cv_have_tls" = "yes yes"; then +Index: gcc-4.4.1/libgomp/configure +=================================================================== +--- gcc-4.4.1.orig/libgomp/configure 2009-08-28 16:08:56.936822000 -0700 ++++ gcc-4.4.1/libgomp/configure 2009-08-28 16:11:50.135833432 -0700 +@@ -17859,6 +17859,7 @@ + + # See if we support thread-local storage. + ++ + # Check whether --enable-tls or --disable-tls was given. + if test "${enable_tls+set}" = set; then + enableval="$enable_tls" +@@ -17906,6 +17907,64 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ cat >conftest.$ac_ext <<_ACEOF ++int f() { return 0; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ cat >conftest.$ac_ext <<_ACEOF ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_have_tls=yes + else + echo "$as_me: failed program was:" >&5 +@@ -17915,6 +17974,24 @@ + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=yes ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + else +Index: gcc-4.4.1/libjava/configure +=================================================================== +--- gcc-4.4.1.orig/libjava/configure 2009-08-28 16:08:57.052863152 -0700 ++++ gcc-4.4.1/libjava/configure 2009-08-28 16:12:46.668833365 -0700 +@@ -27600,6 +27600,7 @@ + + # See if we support thread-local storage. + ++ + # Check whether --enable-tls or --disable-tls was given. + if test "${enable_tls+set}" = set; then + enableval="$enable_tls" +@@ -27652,6 +27653,74 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++int f() { return 0; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_have_tls=yes + else + echo "$as_me: failed program was:" >&5 +@@ -27661,6 +27730,24 @@ + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=yes ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + else +Index: gcc-4.4.1/libmudflap/configure +=================================================================== +--- gcc-4.4.1.orig/libmudflap/configure 2009-08-28 16:08:57.116862217 -0700 ++++ gcc-4.4.1/libmudflap/configure 2009-08-28 16:12:53.952833418 -0700 +@@ -12740,6 +12740,7 @@ + + # See if we support thread-local storage. + ++ + # Check whether --enable-tls or --disable-tls was given. + if test "${enable_tls+set}" = set; then + enableval="$enable_tls" +@@ -12787,6 +12788,64 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ cat >conftest.$ac_ext <<_ACEOF ++int f() { return 0; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ cat >conftest.$ac_ext <<_ACEOF ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_have_tls=yes + else + echo "$as_me: failed program was:" >&5 +@@ -12796,6 +12855,24 @@ + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=yes ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + else +Index: gcc-4.4.1/libstdc++-v3/configure +=================================================================== +--- gcc-4.4.1.orig/libstdc++-v3/configure 2009-08-28 16:08:57.176853506 -0700 ++++ gcc-4.4.1/libstdc++-v3/configure 2009-08-28 16:13:08.792833271 -0700 +@@ -40678,6 +40678,7 @@ + + # For TLS support. + ++ + # Check whether --enable-tls or --disable-tls was given. + if test "${enable_tls+set}" = set; then + enableval="$enable_tls" +@@ -40730,6 +40731,74 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++int f() { return 0; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_have_tls=yes + else + echo "$as_me: failed program was:" >&5 +@@ -40739,6 +40808,24 @@ + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=yes ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + else +@@ -76874,6 +76961,7 @@ + + + ++ + # Check whether --enable-tls or --disable-tls was given. + if test "${enable_tls+set}" = set; then + enableval="$enable_tls" +@@ -76926,6 +77014,74 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++int f() { return 0; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_have_tls=yes + else + echo "$as_me: failed program was:" >&5 +@@ -76935,6 +77091,24 @@ + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=yes ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + else +@@ -94489,6 +94663,7 @@ + _ACEOF + + ++ + # Check whether --enable-tls or --disable-tls was given. + if test "${enable_tls+set}" = set; then + enableval="$enable_tls" +@@ -94541,6 +94716,74 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then ++ chktls_save_LDFLAGS="$LDFLAGS" ++ case $host in ++ *-*-linux*) ++ LDFLAGS="-shared -Wl,--no-undefined $LDFLAGS" ++ ;; ++ esac ++ chktls_save_CFLAGS="$CFLAGS" ++ CFLAGS="-fPIC $CFLAGS" ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++int f() { return 0; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ if test x$gcc_no_link = xyes; then ++ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 ++echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++cat >conftest.$ac_ext <<_ACEOF ++__thread int a; int b; int f() { return a = b; } ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then + gcc_cv_have_tls=yes + else + echo "$as_me: failed program was:" >&5 +@@ -94550,6 +94793,24 @@ + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=yes ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ CFLAGS="$chktls_save_CFLAGS" ++ LDFLAGS="$chktls_save_LDFLAGS" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_have_tls=no ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + + else diff --git a/recipes/gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch b/recipes/gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch new file mode 100644 index 0000000000..51abdd8e9b --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-link-libgcc-with-libm.patch @@ -0,0 +1,261 @@ + + +Delivered-To: listarch-gcc-patches at gcc dot gnu dot org +Received: (qmail 27356 invoked by alias); 7 Oct 2008 18:11:15 -0000 +Received: (qmail 27347 invoked by uid 22791); 7 Oct 2008 18:11:13 -0000 +X-Spam-Check-By: sourceware.org +Received: from fg-out-1718.google.com (HELO fg-out-1718.google.com) (72.14.220.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 07 Oct 2008 18:10:20 +0000 +Received: by fg-out-1718.google.com with SMTP id e21so2412591fga.28 for ; Tue, 07 Oct 2008 11:10:15 -0700 (PDT) +Received: by 10.181.25.18 with SMTP id c18mr5278303bkj.61.1223403015435; Tue, 07 Oct 2008 11:10:15 -0700 (PDT) +Received: from s42.loc (85-127-249-102.dynamic.xdsl-line.inode.at [85.127.249.102]) by mx.google.com with ESMTPS id b17sm14173957fka.7.2008.10.07.11.10.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Oct 2008 11:10:14 -0700 (PDT) +Received: from cow by s42.loc with local (Exim 4.69) (envelope-from ) id 1KnH0l-00050F-7O; Tue, 07 Oct 2008 20:10:19 +0200 +Date: Tue, 7 Oct 2008 20:10:19 +0200 +From: Bernhard Reutner-Fischer +To: Ian Lance Taylor +Cc: gcc-patches at gcc dot gnu dot org +Subject: Re: [PATCH] link libgcc_s.so against a lib containing copysignl on powerpc-*-linux-uclibc +Message-ID: <20081007181019.GB5178@mx.loc> +References: <20081007141721.GG9250@mx.loc> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" +Content-Disposition: inline +In-Reply-To: +User-Agent: Mutt/1.5.18 (2008-05-17) +Mailing-List: contact gcc-patches-help at gcc dot gnu dot org; run by ezmlm +Precedence: bulk +List-Id: +List-Archive: +List-Post: +List-Help: +Sender: gcc-patches-owner at gcc dot gnu dot org +Delivered-To: mailing list gcc-patches at gcc dot gnu dot org + + +--rwEMma7ioTxnRzrJ +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +On Tue, Oct 07, 2008 at 09:39:31AM -0700, Ian Lance Taylor wrote: +>Bernhard Reutner-Fischer writes: +> +>> gcc/ChangeLog: +>> +>> 2008-10-07 Bernhard Reutner-Fischer <> +>> +>> * config/t-slibgcc-elf-ver (SHLIB_LC): Also link against +>> @libgcc_libm@. +>> +>> libgcc/ChangeLog: +>> +>> 2008-10-07 Bernhard Reutner-Fischer <> +>> +>> * configure.ac (libgcc_cv_copysignl_lib, LIBGCC_LIBM): New +>> variables to denote if we are on powerpc-uclibc where libm +>> functions live in libm. +>> * Makefile.in (LIBGCC_LIBM): Set. +>> (libgcc_s$(SHLIB_EXT)): Substitute @libgcc_libm@ with +>> $(LIBGCC_LIBM). +>> * (configure): Regenerate. +> +> +>> +# On powerpc libgcc_s references copysignl which is a libm function but +>> +# glibc apparently also provides it via libc as opposed to uClibc where +>> +# it lives in libm. +>> +dnl save_LIBS="$LIBS" +>> +dnl LIBS= +>> +dnl AC_SEARCH_LIBS(copysignl, m) +>> +dnl LIBGCC_LIBS="$LIBS" +>> +dnl LIBS="$save_LIBS" +>> +dnl AC_SUBST(LIBGCC_LIBS) +> +>Why don't you run these commands listed as dnl? + +I don't have a working compiler here yet and GCC_NO_EXECUTABLES. I can +only assemble, not link (we're about to build the libgcc for the +compiler here). +> +>> +AC_CACHE_CHECK([for library containing copysignl], +>> + libgcc_cv_copysignl_lib, [ +>> + echo '#include ' > conftest.c +>> + case $target_alias in +>> + *powerpc*) +>> + echo 'int the_libc = __UCLIBC__;' >> conftest.c +>> + ;; +>> + *) +>> + echo 'int the_libc; /* dummy */' >> conftest.c +>> + ;; +>> + esac +>> + libgcc_cv_copysignl_lib="-lc" +>> + if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) +>> + then +>> + libgcc_cv_copysignl_lib="-lm" +>> + fi +> +>AC_TRY_COMMAND is not part of the documented set of autoconf +>commands. And this test seems reversed: shouldn't you add -lm if +>AC_TRY_COMMAND fails? + +AC_TRY_COMMAND is used in the same file to check visibility support. +An alternative would be to run nm(1), but for that i need to know the +location of libc and libm so AC_TRY_COMMAND was easier. + +The test is supposed to +- pass only on powerpc-*-*-uclibc* +- fail otherwise +so yes, that isn't quite right and should drop the case statement and +check something like __UCLIBC__ + __powerpc__ instead (or use #if +!defined\n#else\n#error glibm\n#endif but that would be more echo +invocations). + + +>I don't see any reason to write shell code that tests $target_alias + +true. + +>(and shouldn't it be $host_alias anyhow)? Just write C code that does +>"#ifdef PPC"? + +It can't be the host_alias, we can as well build either a +build=host=i386,target=ppc (cross-compiler) or a +build=i386,host=target=ppc ("native" compiler, cross-compiled). +> +>The basic idea seems fine, though. + +Thanks. I'm attaching an updated patch, ChangeLog remains the same. +Ok for trunk? + +--rwEMma7ioTxnRzrJ +Content-Type: text/x-diff; charset=us-ascii +Content-Disposition: attachment; filename="820-powerpc-softfloat-libm_for_copysignl.patch" + +Index: gcc-4.4.3/gcc/config/t-slibgcc-elf-ver +=================================================================== +--- gcc-4.4.3.orig/gcc/config/t-slibgcc-elf-ver 2010-01-04 07:13:08.000000000 -0800 ++++ gcc-4.4.3/gcc/config/t-slibgcc-elf-ver 2010-02-03 12:03:53.424789774 -0800 +@@ -9,7 +9,7 @@ SHLIB_MAP = @shlib_map_file@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_DIR = @multilib_dir@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +-SHLIB_LC = -lc ++SHLIB_LC = @libgcc_libm@ -lc + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) +Index: gcc-4.4.3/libgcc/configure +=================================================================== +--- gcc-4.4.3.orig/libgcc/configure 2008-11-20 09:13:01.000000000 -0800 ++++ gcc-4.4.3/libgcc/configure 2010-02-03 12:02:35.727326054 -0800 +@@ -272,7 +272,7 @@ PACKAGE_STRING='GNU C Runtime Library 1. + PACKAGE_BUGREPORT='' + + ac_unique_file="static-object.mk" +-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 libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls tmake_file extra_parts asm_hidden_op 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 libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls LIBGCC_LIBM tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS' + ac_subst_files='' + ac_pwd=`pwd` + +@@ -3547,6 +3547,39 @@ if test "$enable_tls $gcc_cv_have_cc_tls + fi + + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++ ++ + # Conditionalize the makefile for this target machine. + tmake_file_= + for f in ${tmake_file} +@@ -4267,6 +4300,7 @@ s,@enable_decimal_float@,$enable_decimal + s,@fixed_point@,$fixed_point,;t t + s,@vis_hide@,$vis_hide,;t t + s,@set_have_cc_tls@,$set_have_cc_tls,;t t ++s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t + s,@tmake_file@,$tmake_file,;t t + s,@extra_parts@,$extra_parts,;t t + s,@asm_hidden_op@,$asm_hidden_op,;t t +Index: gcc-4.4.3/libgcc/configure.ac +=================================================================== +--- gcc-4.4.3.orig/libgcc/configure.ac 2008-11-20 09:13:01.000000000 -0800 ++++ gcc-4.4.3/libgcc/configure.ac 2010-02-03 12:02:35.727326054 -0800 +@@ -223,6 +223,27 @@ if test "$enable_tls $gcc_cv_have_cc_tls + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK([for library containing copysignl], ++ libgcc_cv_copysignl_lib, [ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # Conditionalize the makefile for this target machine. + tmake_file_= + for f in ${tmake_file} +Index: gcc-4.4.3/libgcc/Makefile.in +=================================================================== +--- gcc-4.4.3.orig/libgcc/Makefile.in 2009-04-09 16:23:07.000000000 -0700 ++++ gcc-4.4.3/libgcc/Makefile.in 2010-02-03 12:02:35.727326054 -0800 +@@ -39,6 +39,7 @@ enable_shared = @enable_shared@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + +@@ -787,9 +788,10 @@ libgcc_s$(SHLIB_EXT): $(libgcc-s-objects + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects),$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use diff --git a/recipes/gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch b/recipes/gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch new file mode 100644 index 0000000000..5e1da1ad09 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-ppc_add_d_constraint.patch @@ -0,0 +1,1216 @@ +Index: gcc-4.4.1/gcc/doc/md.texi +=================================================================== +--- gcc-4.4.1.orig/gcc/doc/md.texi 2009-10-06 14:08:35.847313399 -0700 ++++ gcc-4.4.1/gcc/doc/md.texi 2009-10-06 14:09:12.087313658 -0700 +@@ -1901,8 +1901,11 @@ Any constant whose absolute value is no + @item b + Address base register + ++@item d ++Floating point register (containing 64-bit value) ++ + @item f +-Floating point register ++Floating point register (containing 32-bit value) + + @item v + Vector register +Index: gcc-4.4.1/gcc/config/rs6000/constraints.md +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/constraints.md 2009-10-06 14:08:35.827340958 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/constraints.md 2009-10-06 14:09:12.087313658 -0700 +@@ -23,6 +23,10 @@ + ? FLOAT_REGS : NO_REGS" + "@internal") + ++(define_register_constraint "d" "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT ++ ? FLOAT_REGS : NO_REGS" ++ "@internal") ++ + (define_register_constraint "b" "BASE_REGS" + "@internal") + +Index: gcc-4.4.1/gcc/config/rs6000/dfp.md +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/dfp.md 2009-10-06 14:08:35.797315564 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/dfp.md 2009-10-06 14:09:12.087313658 -0700 +@@ -105,7 +105,7 @@ + + (define_insn "movsd_store" + [(set (match_operand:DD 0 "nonimmediate_operand" "=m") +- (unspec:DD [(match_operand:SD 1 "input_operand" "f")] ++ (unspec:DD [(match_operand:SD 1 "input_operand" "d")] + UNSPEC_MOVSD_STORE))] + "(gpc_reg_operand (operands[0], DDmode) + || gpc_reg_operand (operands[1], SDmode)) +@@ -128,15 +128,15 @@ + ;; Hardware support for decimal floating point operations. + + (define_insn "extendsddd2" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") + (float_extend:DD (match_operand:SD 1 "gpc_reg_operand" "f")))] + "TARGET_DFP" + "dctdp %0,%1" + [(set_attr "type" "fp")]) + + (define_expand "extendsdtd2" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (float_extend:TD (match_operand:SD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (float_extend:TD (match_operand:SD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + { + rtx tmp = gen_reg_rtx (DDmode); +@@ -147,7 +147,7 @@ + + (define_insn "truncddsd2" + [(set (match_operand:SD 0 "gpc_reg_operand" "=f") +- (float_truncate:SD (match_operand:DD 1 "gpc_reg_operand" "f")))] ++ (float_truncate:SD (match_operand:DD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "drsp %0,%1" + [(set_attr "type" "fp")]) +@@ -159,8 +159,8 @@ + "") + + (define_insn "*negdd2_fpr" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (neg:DD (match_operand:DD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (neg:DD (match_operand:DD 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS" + "fneg %0,%1" + [(set_attr "type" "fp")]) +@@ -172,15 +172,15 @@ + "") + + (define_insn "*absdd2_fpr" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (abs:DD (match_operand:DD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (abs:DD (match_operand:DD 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS" + "fabs %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "*nabsdd2_fpr" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (neg:DD (abs:DD (match_operand:DF 1 "gpc_reg_operand" "f"))))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (neg:DD (abs:DD (match_operand:DF 1 "gpc_reg_operand" "d"))))] + "TARGET_HARD_FLOAT && TARGET_FPRS" + "fnabs %0,%1" + [(set_attr "type" "fp")]) +@@ -281,8 +281,8 @@ + ;; The "??" is a kludge until we can figure out a more reasonable way + ;; of handling these non-offsettable values. + (define_insn "*movdd_hardfloat32" +- [(set (match_operand:DD 0 "nonimmediate_operand" "=!r,??r,m,f,f,m,!r,!r,!r") +- (match_operand:DD 1 "input_operand" "r,m,r,f,m,f,G,H,F"))] ++ [(set (match_operand:DD 0 "nonimmediate_operand" "=!r,??r,m,d,d,m,!r,!r,!r") ++ (match_operand:DD 1 "input_operand" "r,m,r,d,m,d,G,H,F"))] + "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS + && (gpc_reg_operand (operands[0], DDmode) + || gpc_reg_operand (operands[1], DDmode))" +@@ -417,8 +417,8 @@ + ; ld/std require word-aligned displacements -> 'Y' constraint. + ; List Y->r and r->Y before r->r for reload. + (define_insn "*movdd_hardfloat64_mfpgpr" +- [(set (match_operand:DD 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r,r,f") +- (match_operand:DD 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F,f,r"))] ++ [(set (match_operand:DD 0 "nonimmediate_operand" "=Y,r,!r,d,d,m,*c*l,!r,*h,!r,!r,!r,r,d") ++ (match_operand:DD 1 "input_operand" "r,Y,r,d,m,d,r,h,0,G,H,F,d,r"))] + "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS + && (gpc_reg_operand (operands[0], DDmode) + || gpc_reg_operand (operands[1], DDmode))" +@@ -443,8 +443,8 @@ + ; ld/std require word-aligned displacements -> 'Y' constraint. + ; List Y->r and r->Y before r->r for reload. + (define_insn "*movdd_hardfloat64" +- [(set (match_operand:DD 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r") +- (match_operand:DD 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F"))] ++ [(set (match_operand:DD 0 "nonimmediate_operand" "=Y,r,!r,d,d,m,*c*l,!r,*h,!r,!r,!r") ++ (match_operand:DD 1 "input_operand" "r,Y,r,d,m,d,r,h,0,G,H,F"))] + "TARGET_POWERPC64 && !TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS + && (gpc_reg_operand (operands[0], DDmode) + || gpc_reg_operand (operands[1], DDmode))" +@@ -490,8 +490,8 @@ + "") + + (define_insn "*negtd2_fpr" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (neg:TD (match_operand:TD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (neg:TD (match_operand:TD 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS" + "fneg %0,%1" + [(set_attr "type" "fp")]) +@@ -503,15 +503,15 @@ + "") + + (define_insn "*abstd2_fpr" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (abs:TD (match_operand:TD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (abs:TD (match_operand:TD 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS" + "fabs %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "*nabstd2_fpr" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (neg:TD (abs:TD (match_operand:DF 1 "gpc_reg_operand" "f"))))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (neg:TD (abs:TD (match_operand:DF 1 "gpc_reg_operand" "d"))))] + "TARGET_HARD_FLOAT && TARGET_FPRS" + "fnabs %0,%1" + [(set_attr "type" "fp")]) +@@ -526,8 +526,8 @@ + ; otherwise reload, given m->f, will try to pick f->f and reload it, + ; which doesn't make progress. Likewise r->Y must be before r->r. + (define_insn_and_split "*movtd_internal" +- [(set (match_operand:TD 0 "nonimmediate_operand" "=o,f,f,r,Y,r") +- (match_operand:TD 1 "input_operand" "f,o,f,YGHF,r,r"))] ++ [(set (match_operand:TD 0 "nonimmediate_operand" "=o,d,d,r,Y,r") ++ (match_operand:TD 1 "input_operand" "d,o,d,YGHF,r,r"))] + "TARGET_HARD_FLOAT && TARGET_FPRS + && (gpc_reg_operand (operands[0], TDmode) + || gpc_reg_operand (operands[1], TDmode))" +@@ -540,8 +540,8 @@ + ;; Hardware support for decimal floating point operations. + + (define_insn "extendddtd2" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (float_extend:TD (match_operand:DD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (float_extend:TD (match_operand:DD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dctqpq %0,%1" + [(set_attr "type" "fp")]) +@@ -552,96 +552,96 @@ + ;; that the result is the first of the pair receiving the result of drdpq. + + (define_insn "trunctddd2" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (float_truncate:DD (match_operand:TD 1 "gpc_reg_operand" "f"))) +- (clobber (match_scratch:TD 2 "=f"))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (float_truncate:DD (match_operand:TD 1 "gpc_reg_operand" "d"))) ++ (clobber (match_scratch:TD 2 "=d"))] + "TARGET_DFP" + "drdpq %2,%1\;fmr %0,%2" + [(set_attr "type" "fp")]) + + (define_insn "adddd3" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (plus:DD (match_operand:DD 1 "gpc_reg_operand" "%f") +- (match_operand:DD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (plus:DD (match_operand:DD 1 "gpc_reg_operand" "%d") ++ (match_operand:DD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dadd %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "addtd3" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (plus:TD (match_operand:TD 1 "gpc_reg_operand" "%f") +- (match_operand:TD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (plus:TD (match_operand:TD 1 "gpc_reg_operand" "%d") ++ (match_operand:TD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "daddq %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "subdd3" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (minus:DD (match_operand:DD 1 "gpc_reg_operand" "f") +- (match_operand:DD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (minus:DD (match_operand:DD 1 "gpc_reg_operand" "d") ++ (match_operand:DD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dsub %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "subtd3" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (minus:TD (match_operand:TD 1 "gpc_reg_operand" "f") +- (match_operand:TD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (minus:TD (match_operand:TD 1 "gpc_reg_operand" "d") ++ (match_operand:TD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dsubq %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "muldd3" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (mult:DD (match_operand:DD 1 "gpc_reg_operand" "%f") +- (match_operand:DD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (mult:DD (match_operand:DD 1 "gpc_reg_operand" "%d") ++ (match_operand:DD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dmul %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "multd3" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (mult:TD (match_operand:TD 1 "gpc_reg_operand" "%f") +- (match_operand:TD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (mult:TD (match_operand:TD 1 "gpc_reg_operand" "%d") ++ (match_operand:TD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dmulq %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "divdd3" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (div:DD (match_operand:DD 1 "gpc_reg_operand" "f") +- (match_operand:DD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (div:DD (match_operand:DD 1 "gpc_reg_operand" "d") ++ (match_operand:DD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "ddiv %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "divtd3" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (div:TD (match_operand:TD 1 "gpc_reg_operand" "f") +- (match_operand:TD 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (div:TD (match_operand:TD 1 "gpc_reg_operand" "d") ++ (match_operand:TD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "ddivq %0,%1,%2" + [(set_attr "type" "fp")]) + + (define_insn "*cmpdd_internal1" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") +- (compare:CCFP (match_operand:DD 1 "gpc_reg_operand" "f") +- (match_operand:DD 2 "gpc_reg_operand" "f")))] ++ (compare:CCFP (match_operand:DD 1 "gpc_reg_operand" "d") ++ (match_operand:DD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dcmpu %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "*cmptd_internal1" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") +- (compare:CCFP (match_operand:TD 1 "gpc_reg_operand" "f") +- (match_operand:TD 2 "gpc_reg_operand" "f")))] ++ (compare:CCFP (match_operand:TD 1 "gpc_reg_operand" "d") ++ (match_operand:TD 2 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dcmpuq %0,%1,%2" + [(set_attr "type" "fpcompare")]) + + (define_insn "floatditd2" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (float:TD (match_operand:DI 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (float:TD (match_operand:DI 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dcffixq %0,%1" + [(set_attr "type" "fp")]) +@@ -650,8 +650,8 @@ + ;; This is the first stage of converting it to an integer type. + + (define_insn "ftruncdd2" +- [(set (match_operand:DD 0 "gpc_reg_operand" "=f") +- (fix:DD (match_operand:DD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DD 0 "gpc_reg_operand" "=d") ++ (fix:DD (match_operand:DD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "drintn. 0,%0,%1,1" + [(set_attr "type" "fp")]) +@@ -660,8 +660,8 @@ + ;; This is the second stage of converting decimal float to integer type. + + (define_insn "fixdddi2" +- [(set (match_operand:DI 0 "gpc_reg_operand" "=f") +- (fix:DI (match_operand:DD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DI 0 "gpc_reg_operand" "=d") ++ (fix:DI (match_operand:DD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dctfix %0,%1" + [(set_attr "type" "fp")]) +@@ -670,8 +670,8 @@ + ;; This is the first stage of converting it to an integer type. + + (define_insn "ftrunctd2" +- [(set (match_operand:TD 0 "gpc_reg_operand" "=f") +- (fix:TD (match_operand:TD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TD 0 "gpc_reg_operand" "=d") ++ (fix:TD (match_operand:TD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "drintnq. 0,%0,%1,1" + [(set_attr "type" "fp")]) +@@ -680,8 +680,8 @@ + ;; This is the second stage of converting decimal float to integer type. + + (define_insn "fixtddi2" +- [(set (match_operand:DI 0 "gpc_reg_operand" "=f") +- (fix:DI (match_operand:TD 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DI 0 "gpc_reg_operand" "=d") ++ (fix:DI (match_operand:TD 1 "gpc_reg_operand" "d")))] + "TARGET_DFP" + "dctfixq %0,%1" + [(set_attr "type" "fp")]) +Index: gcc-4.4.1/gcc/config/rs6000/rs6000.md +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/rs6000.md 2009-10-06 14:09:04.737313663 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/rs6000.md 2009-10-06 14:09:12.087313658 -0700 +@@ -5119,7 +5119,7 @@ + "") + + (define_insn_and_split "*extendsfdf2_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f,?f,f") ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d,?d,d") + (float_extend:DF (match_operand:SF 1 "reg_or_mem_operand" "0,f,m")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "@ +@@ -5142,7 +5142,7 @@ + + (define_insn "*truncdfsf2_fpr" + [(set (match_operand:SF 0 "gpc_reg_operand" "=f") +- (float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "f")))] ++ (float_truncate:SF (match_operand:DF 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "frsp %0,%1" + [(set_attr "type" "fp")]) +@@ -5616,7 +5616,7 @@ + + (define_insn "*fseldfsf4" + [(set (match_operand:SF 0 "gpc_reg_operand" "=f") +- (if_then_else:SF (ge (match_operand:DF 1 "gpc_reg_operand" "f") ++ (if_then_else:SF (ge (match_operand:DF 1 "gpc_reg_operand" "d") + (match_operand:DF 4 "zero_fp_constant" "F")) + (match_operand:SF 2 "gpc_reg_operand" "f") + (match_operand:SF 3 "gpc_reg_operand" "f")))] +@@ -5631,8 +5631,8 @@ + "") + + (define_insn "*negdf2_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (neg:DF (match_operand:DF 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "fneg %0,%1" + [(set_attr "type" "fp")]) +@@ -5644,15 +5644,15 @@ + "") + + (define_insn "*absdf2_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (abs:DF (match_operand:DF 1 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "fabs %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "*nabsdf2_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "f"))))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (neg:DF (abs:DF (match_operand:DF 1 "gpc_reg_operand" "d"))))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "fnabs %0,%1" + [(set_attr "type" "fp")]) +@@ -5665,9 +5665,9 @@ + "") + + (define_insn "*adddf3_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (plus:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "{fa|fadd} %0,%1,%2" + [(set_attr "type" "fp") +@@ -5681,9 +5681,9 @@ + "") + + (define_insn "*subdf3_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (minus:DF (match_operand:DF 1 "gpc_reg_operand" "f") +- (match_operand:DF 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (minus:DF (match_operand:DF 1 "gpc_reg_operand" "d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "{fs|fsub} %0,%1,%2" + [(set_attr "type" "fp") +@@ -5697,9 +5697,9 @@ + "") + + (define_insn "*muldf3_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "{fm|fmul} %0,%1,%2" + [(set_attr "type" "dmul") +@@ -5715,17 +5715,17 @@ + "") + + (define_insn "*divdf3_fpr" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (div:DF (match_operand:DF 1 "gpc_reg_operand" "f") +- (match_operand:DF 2 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (div:DF (match_operand:DF 1 "gpc_reg_operand" "d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && !TARGET_SIMPLE_FPU" + "{fd|fdiv} %0,%1,%2" + [(set_attr "type" "ddiv")]) + + (define_expand "recipdf3" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f") +- (match_operand:DF 2 "gpc_reg_operand" "f")] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")] + UNSPEC_FRES))] + "TARGET_RECIP && TARGET_HARD_FLOAT && TARGET_POPCNTB && !optimize_size + && flag_finite_math_only && !flag_trapping_math" +@@ -5735,37 +5735,37 @@ + }) + + (define_insn "fred" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRES))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "d")] UNSPEC_FRES))] + "TARGET_POPCNTB && flag_finite_math_only" + "fre %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f")) +- (match_operand:DF 3 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")) ++ (match_operand:DF 3 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT" + "{fma|fmadd} %0,%1,%2,%3" + [(set_attr "type" "dmul") + (set_attr "fp_type" "fp_maddsub_d")]) + + (define_insn "" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f")) +- (match_operand:DF 3 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")) ++ (match_operand:DF 3 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT" + "{fms|fmsub} %0,%1,%2,%3" + [(set_attr "type" "dmul") + (set_attr "fp_type" "fp_maddsub_d")]) + + (define_insn "" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (neg:DF (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f")) +- (match_operand:DF 3 "gpc_reg_operand" "f"))))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (neg:DF (plus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")) ++ (match_operand:DF 3 "gpc_reg_operand" "d"))))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT + && HONOR_SIGNED_ZEROS (DFmode)" + "{fnma|fnmadd} %0,%1,%2,%3" +@@ -5773,10 +5773,10 @@ + (set_attr "fp_type" "fp_maddsub_d")]) + + (define_insn "" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (minus:DF (mult:DF (neg:DF (match_operand:DF 1 "gpc_reg_operand" "f")) +- (match_operand:DF 2 "gpc_reg_operand" "f")) +- (match_operand:DF 3 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (minus:DF (mult:DF (neg:DF (match_operand:DF 1 "gpc_reg_operand" "d")) ++ (match_operand:DF 2 "gpc_reg_operand" "d")) ++ (match_operand:DF 3 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT + && ! HONOR_SIGNED_ZEROS (DFmode)" + "{fnma|fnmadd} %0,%1,%2,%3" +@@ -5784,10 +5784,10 @@ + (set_attr "fp_type" "fp_maddsub_d")]) + + (define_insn "" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (neg:DF (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f")) +- (match_operand:DF 3 "gpc_reg_operand" "f"))))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (neg:DF (minus:DF (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")) ++ (match_operand:DF 3 "gpc_reg_operand" "d"))))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT + && HONOR_SIGNED_ZEROS (DFmode)" + "{fnms|fnmsub} %0,%1,%2,%3" +@@ -5795,10 +5795,10 @@ + (set_attr "fp_type" "fp_maddsub_d")]) + + (define_insn "" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (minus:DF (match_operand:DF 3 "gpc_reg_operand" "f") +- (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%f") +- (match_operand:DF 2 "gpc_reg_operand" "f"))))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (minus:DF (match_operand:DF 3 "gpc_reg_operand" "d") ++ (mult:DF (match_operand:DF 1 "gpc_reg_operand" "%d") ++ (match_operand:DF 2 "gpc_reg_operand" "d"))))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_FUSED_MADD && TARGET_DOUBLE_FLOAT + && ! HONOR_SIGNED_ZEROS (DFmode)" + "{fnms|fnmsub} %0,%1,%2,%3" +@@ -5806,8 +5806,8 @@ + (set_attr "fp_type" "fp_maddsub_d")]) + + (define_insn "sqrtdf2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (sqrt:DF (match_operand:DF 1 "gpc_reg_operand" "d")))] + "(TARGET_PPC_GPOPT || TARGET_POWER2) && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT" + "fsqrt %0,%1" +@@ -5865,21 +5865,21 @@ + }") + + (define_insn "*fseldfdf4" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (if_then_else:DF (ge (match_operand:DF 1 "gpc_reg_operand" "f") ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (if_then_else:DF (ge (match_operand:DF 1 "gpc_reg_operand" "d") + (match_operand:DF 4 "zero_fp_constant" "F")) +- (match_operand:DF 2 "gpc_reg_operand" "f") +- (match_operand:DF 3 "gpc_reg_operand" "f")))] ++ (match_operand:DF 2 "gpc_reg_operand" "d") ++ (match_operand:DF 3 "gpc_reg_operand" "d")))] + "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "fsel %0,%1,%2,%3" + [(set_attr "type" "fp")]) + + (define_insn "*fselsfdf4" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") + (if_then_else:DF (ge (match_operand:SF 1 "gpc_reg_operand" "f") + (match_operand:SF 4 "zero_fp_constant" "F")) +- (match_operand:DF 2 "gpc_reg_operand" "f") +- (match_operand:DF 3 "gpc_reg_operand" "f")))] ++ (match_operand:DF 2 "gpc_reg_operand" "d") ++ (match_operand:DF 3 "gpc_reg_operand" "d")))] + "TARGET_PPC_GFXOPT && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_SINGLE_FLOAT" + "fsel %0,%1,%2,%3" + [(set_attr "type" "fp")]) +@@ -5935,12 +5935,12 @@ + }") + + (define_insn_and_split "*floatsidf2_internal" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=&f") ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=&d") + (float:DF (match_operand:SI 1 "gpc_reg_operand" "r"))) + (use (match_operand:SI 2 "gpc_reg_operand" "r")) +- (use (match_operand:DF 3 "gpc_reg_operand" "f")) ++ (use (match_operand:DF 3 "gpc_reg_operand" "d")) + (clobber (match_operand:DF 4 "offsettable_mem_operand" "=o")) +- (clobber (match_operand:DF 5 "gpc_reg_operand" "=&f")) ++ (clobber (match_operand:DF 5 "gpc_reg_operand" "=&d")) + (clobber (match_operand:SI 6 "gpc_reg_operand" "=&r"))] + "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "#" +@@ -6003,12 +6003,12 @@ + }") + + (define_insn_and_split "*floatunssidf2_internal" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=&f") ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=&d") + (unsigned_float:DF (match_operand:SI 1 "gpc_reg_operand" "r"))) + (use (match_operand:SI 2 "gpc_reg_operand" "r")) +- (use (match_operand:DF 3 "gpc_reg_operand" "f")) ++ (use (match_operand:DF 3 "gpc_reg_operand" "d")) + (clobber (match_operand:DF 4 "offsettable_mem_operand" "=o")) +- (clobber (match_operand:DF 5 "gpc_reg_operand" "=&f"))] ++ (clobber (match_operand:DF 5 "gpc_reg_operand" "=&d"))] + "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "#" + "&& (can_create_pseudo_p () || offsettable_nonstrict_memref_p (operands[4]))" +@@ -6072,8 +6072,8 @@ + + (define_insn_and_split "*fix_truncdfsi2_internal" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))) +- (clobber (match_operand:DI 2 "gpc_reg_operand" "=f")) ++ (fix:SI (match_operand:DF 1 "gpc_reg_operand" "d"))) ++ (clobber (match_operand:DI 2 "gpc_reg_operand" "=d")) + (clobber (match_operand:DI 3 "offsettable_mem_operand" "=o"))] + "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT" +@@ -6095,8 +6095,8 @@ + + (define_insn_and_split "fix_truncdfsi2_internal_gfxopt" + [(set (match_operand:SI 0 "memory_operand" "=Z") +- (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))) +- (clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))] ++ (fix:SI (match_operand:DF 1 "gpc_reg_operand" "d"))) ++ (clobber (match_operand:DI 2 "gpc_reg_operand" "=d"))] + "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT + && TARGET_PPC_GFXOPT" +@@ -6113,8 +6113,8 @@ + + (define_insn_and_split "fix_truncdfsi2_mfpgpr" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))) +- (clobber (match_operand:DI 2 "gpc_reg_operand" "=f")) ++ (fix:SI (match_operand:DF 1 "gpc_reg_operand" "d"))) ++ (clobber (match_operand:DI 2 "gpc_reg_operand" "=d")) + (clobber (match_operand:DI 3 "gpc_reg_operand" "=r"))] + "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT" +@@ -6131,8 +6131,8 @@ + ; because the first makes it clear that operand 0 is not live + ; before the instruction. + (define_insn "fctiwz" +- [(set (match_operand:DI 0 "gpc_reg_operand" "=f") +- (unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))] ++ [(set (match_operand:DI 0 "gpc_reg_operand" "=d") ++ (unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "d"))] + UNSPEC_FCTIWZ))] + "(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT" +@@ -6140,8 +6140,8 @@ + [(set_attr "type" "fp")]) + + (define_insn "btruncdf2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIZ))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "d")] UNSPEC_FRIZ))] + "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "friz %0,%1" + [(set_attr "type" "fp")]) +@@ -6154,8 +6154,8 @@ + [(set_attr "type" "fp")]) + + (define_insn "ceildf2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIP))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "d")] UNSPEC_FRIP))] + "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "frip %0,%1" + [(set_attr "type" "fp")]) +@@ -6168,8 +6168,8 @@ + [(set_attr "type" "fp")]) + + (define_insn "floordf2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIM))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "d")] UNSPEC_FRIM))] + "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "frim %0,%1" + [(set_attr "type" "fp")]) +@@ -6182,8 +6182,8 @@ + [(set_attr "type" "fp")]) + + (define_insn "rounddf2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "f")] UNSPEC_FRIN))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:DF 1 "gpc_reg_operand" "d")] UNSPEC_FRIN))] + "TARGET_FPRND && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "frin %0,%1" + [(set_attr "type" "fp")]) +@@ -6198,7 +6198,7 @@ + ; An UNSPEC is used so we don't have to support SImode in FP registers. + (define_insn "stfiwx" + [(set (match_operand:SI 0 "memory_operand" "=Z") +- (unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "f")] ++ (unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d")] + UNSPEC_STFIWX))] + "TARGET_PPC_GFXOPT" + "stfiwx %1,%y0" +@@ -6211,15 +6211,15 @@ + "") + + (define_insn "floatdidf2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (float:DF (match_operand:DI 1 "gpc_reg_operand" "!f#r")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (float:DF (match_operand:DI 1 "gpc_reg_operand" "!d#r")))] + "(TARGET_POWERPC64 || TARGET_XILINX_FPU) && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS" + "fcfid %0,%1" + [(set_attr "type" "fp")]) + + (define_insn "fix_truncdfdi2" +- [(set (match_operand:DI 0 "gpc_reg_operand" "=!f#r") +- (fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DI 0 "gpc_reg_operand" "=!d#r") ++ (fix:DI (match_operand:DF 1 "gpc_reg_operand" "d")))] + "(TARGET_POWERPC64 || TARGET_XILINX_FPU) && TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS" + "fctidz %0,%1" + [(set_attr "type" "fp")]) +@@ -6247,8 +6247,8 @@ + ;; from double rounding. + (define_insn_and_split "floatdisf2_internal1" + [(set (match_operand:SF 0 "gpc_reg_operand" "=f") +- (float:SF (match_operand:DI 1 "gpc_reg_operand" "!f#r"))) +- (clobber (match_scratch:DF 2 "=f"))] ++ (float:SF (match_operand:DI 1 "gpc_reg_operand" "!d#r"))) ++ (clobber (match_scratch:DF 2 "=d"))] + "TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT" + "#" + "&& reload_completed" +@@ -8497,8 +8497,8 @@ + ;; The "??" is a kludge until we can figure out a more reasonable way + ;; of handling these non-offsettable values. + (define_insn "*movdf_hardfloat32" +- [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,f,f,m,!r,!r,!r") +- (match_operand:DF 1 "input_operand" "r,m,r,f,m,f,G,H,F"))] ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=!r,??r,m,d,d,m,!r,!r,!r") ++ (match_operand:DF 1 "input_operand" "r,m,r,d,m,d,G,H,F"))] + "! TARGET_POWERPC64 && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT + && (gpc_reg_operand (operands[0], DFmode) + || gpc_reg_operand (operands[1], DFmode))" +@@ -8637,8 +8637,8 @@ + ; ld/std require word-aligned displacements -> 'Y' constraint. + ; List Y->r and r->Y before r->r for reload. + (define_insn "*movdf_hardfloat64_mfpgpr" +- [(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r,r,f") +- (match_operand:DF 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F,f,r"))] ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,d,d,m,*c*l,!r,*h,!r,!r,!r,r,d") ++ (match_operand:DF 1 "input_operand" "r,Y,r,d,m,d,r,h,0,G,H,F,d,r"))] + "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT + && (gpc_reg_operand (operands[0], DFmode) +@@ -8664,8 +8664,8 @@ + ; ld/std require word-aligned displacements -> 'Y' constraint. + ; List Y->r and r->Y before r->r for reload. + (define_insn "*movdf_hardfloat64" +- [(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,f,f,m,*c*l,!r,*h,!r,!r,!r") +- (match_operand:DF 1 "input_operand" "r,Y,r,f,m,f,r,h,0,G,H,F"))] ++ [(set (match_operand:DF 0 "nonimmediate_operand" "=Y,r,!r,d,d,m,*c*l,!r,*h,!r,!r,!r") ++ (match_operand:DF 1 "input_operand" "r,Y,r,d,m,d,r,h,0,G,H,F"))] + "TARGET_POWERPC64 && !TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS + && TARGET_DOUBLE_FLOAT + && (gpc_reg_operand (operands[0], DFmode) +@@ -8715,8 +8715,8 @@ + ; otherwise reload, given m->f, will try to pick f->f and reload it, + ; which doesn't make progress. Likewise r->Y must be before r->r. + (define_insn_and_split "*movtf_internal" +- [(set (match_operand:TF 0 "nonimmediate_operand" "=o,f,f,r,Y,r") +- (match_operand:TF 1 "input_operand" "f,o,f,YGHF,r,r"))] ++ [(set (match_operand:TF 0 "nonimmediate_operand" "=o,d,d,r,Y,r") ++ (match_operand:TF 1 "input_operand" "d,o,d,YGHF,r,r"))] + "!TARGET_IEEEQUAD + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128 + && (gpc_reg_operand (operands[0], TFmode) +@@ -8770,9 +8770,9 @@ + }) + + (define_insn_and_split "*extenddftf2_internal" +- [(set (match_operand:TF 0 "nonimmediate_operand" "=o,f,&f,r") +- (float_extend:TF (match_operand:DF 1 "input_operand" "fr,mf,mf,rmGHF"))) +- (use (match_operand:DF 2 "zero_reg_mem_operand" "rf,m,f,n"))] ++ [(set (match_operand:TF 0 "nonimmediate_operand" "=o,d,&d,r") ++ (float_extend:TF (match_operand:DF 1 "input_operand" "dr,md,md,rmGHF"))) ++ (use (match_operand:DF 2 "zero_reg_mem_operand" "rd,m,d,n"))] + "!TARGET_IEEEQUAD + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT + && TARGET_LONG_DOUBLE_128" +@@ -8813,8 +8813,8 @@ + "") + + (define_insn_and_split "trunctfdf2_internal1" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f,?f") +- (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "0,f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d,?d") ++ (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "0,d")))] + "!TARGET_IEEEQUAD && !TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "@ +@@ -8829,8 +8829,8 @@ + [(set_attr "type" "fp")]) + + (define_insn "trunctfdf2_internal2" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (float_truncate:DF (match_operand:TF 1 "gpc_reg_operand" "d")))] + "!TARGET_IEEEQUAD && TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT + && TARGET_LONG_DOUBLE_128" +@@ -8855,8 +8855,8 @@ + + (define_insn_and_split "trunctfsf2_fprs" + [(set (match_operand:SF 0 "gpc_reg_operand" "=f") +- (float_truncate:SF (match_operand:TF 1 "gpc_reg_operand" "f"))) +- (clobber (match_scratch:DF 2 "=f"))] ++ (float_truncate:SF (match_operand:TF 1 "gpc_reg_operand" "d"))) ++ (clobber (match_scratch:DF 2 "=d"))] + "!TARGET_IEEEQUAD + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_SINGLE_FLOAT + && TARGET_LONG_DOUBLE_128" +@@ -8885,10 +8885,10 @@ + ; fadd, but rounding towards zero. + ; This is probably not the optimal code sequence. + (define_insn "fix_trunc_helper" +- [(set (match_operand:DF 0 "gpc_reg_operand" "=f") +- (unspec:DF [(match_operand:TF 1 "gpc_reg_operand" "f")] ++ [(set (match_operand:DF 0 "gpc_reg_operand" "=d") ++ (unspec:DF [(match_operand:TF 1 "gpc_reg_operand" "d")] + UNSPEC_FIX_TRUNC_TF)) +- (clobber (match_operand:DF 2 "gpc_reg_operand" "=&f"))] ++ (clobber (match_operand:DF 2 "gpc_reg_operand" "=&d"))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "mffs %2\n\tmtfsb1 31\n\tmtfsb0 30\n\tfadd %0,%1,%L1\n\tmtfsf 1,%2" + [(set_attr "type" "fp") +@@ -8929,10 +8929,10 @@ + + (define_insn_and_split "*fix_trunctfsi2_internal" + [(set (match_operand:SI 0 "gpc_reg_operand" "=r") +- (fix:SI (match_operand:TF 1 "gpc_reg_operand" "f"))) +- (clobber (match_operand:DF 2 "gpc_reg_operand" "=f")) +- (clobber (match_operand:DF 3 "gpc_reg_operand" "=&f")) +- (clobber (match_operand:DI 4 "gpc_reg_operand" "=f")) ++ (fix:SI (match_operand:TF 1 "gpc_reg_operand" "d"))) ++ (clobber (match_operand:DF 2 "gpc_reg_operand" "=d")) ++ (clobber (match_operand:DF 3 "gpc_reg_operand" "=&d")) ++ (clobber (match_operand:DI 4 "gpc_reg_operand" "=d")) + (clobber (match_operand:DI 5 "offsettable_mem_operand" "=o"))] + "!TARGET_IEEEQUAD + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" +@@ -8962,8 +8962,8 @@ + "") + + (define_insn "negtf2_internal" +- [(set (match_operand:TF 0 "gpc_reg_operand" "=f") +- (neg:TF (match_operand:TF 1 "gpc_reg_operand" "f")))] ++ [(set (match_operand:TF 0 "gpc_reg_operand" "=d") ++ (neg:TF (match_operand:TF 1 "gpc_reg_operand" "d")))] + "!TARGET_IEEEQUAD + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128" + "* +@@ -9028,8 +9028,8 @@ + ; List r->r after r->"o<>", otherwise reload will try to reload a + ; non-offsettable address by using r->r which won't make progress. + (define_insn "*movdi_internal32" +- [(set (match_operand:DI 0 "rs6000_nonimmediate_operand" "=o<>,r,r,*f,*f,m,r") +- (match_operand:DI 1 "input_operand" "r,r,m,f,m,f,IJKnGHF"))] ++ [(set (match_operand:DI 0 "rs6000_nonimmediate_operand" "=o<>,r,r,*d,*d,m,r") ++ (match_operand:DI 1 "input_operand" "r,r,m,d,m,d,IJKnGHF"))] + "! TARGET_POWERPC64 + && (gpc_reg_operand (operands[0], DImode) + || gpc_reg_operand (operands[1], DImode))" +@@ -9073,8 +9073,8 @@ + { rs6000_split_multireg_move (operands[0], operands[1]); DONE; }) + + (define_insn "*movdi_mfpgpr" +- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*f,*f,m,r,*h,*h,r,*f") +- (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0,*f,r"))] ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*d,*d,m,r,*h,*h,r,*d") ++ (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,d,m,d,*h,r,0,*d,r"))] + "TARGET_POWERPC64 && TARGET_MFPGPR && TARGET_HARD_FLOAT && TARGET_FPRS + && (gpc_reg_operand (operands[0], DImode) + || gpc_reg_operand (operands[1], DImode))" +@@ -9098,8 +9098,8 @@ + (set_attr "length" "4,4,4,4,4,20,4,4,4,4,4,4,4,4,4")]) + + (define_insn "*movdi_internal64" +- [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*f,*f,m,r,*h,*h") +- (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,f,m,f,*h,r,0"))] ++ [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,r,r,r,*d,*d,m,r,*h,*h") ++ (match_operand:DI 1 "input_operand" "r,m,r,I,L,nF,R,d,m,d,*h,r,0"))] + "TARGET_POWERPC64 && (!TARGET_MFPGPR || !TARGET_HARD_FLOAT || !TARGET_FPRS) + && (gpc_reg_operand (operands[0], DImode) + || gpc_reg_operand (operands[1], DImode))" +@@ -10293,7 +10293,7 @@ + [(set_attr "type" "store_ux,store_u")]) + + (define_insn "*movdf_update1" +- [(set (match_operand:DF 3 "gpc_reg_operand" "=f,f") ++ [(set (match_operand:DF 3 "gpc_reg_operand" "=d,d") + (mem:DF (plus:SI (match_operand:SI 1 "gpc_reg_operand" "0,0") + (match_operand:SI 2 "reg_or_short_operand" "r,I")))) + (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") +@@ -10309,7 +10309,7 @@ + (define_insn "*movdf_update2" + [(set (mem:DF (plus:SI (match_operand:SI 1 "gpc_reg_operand" "0,0") + (match_operand:SI 2 "reg_or_short_operand" "r,I"))) +- (match_operand:DF 3 "gpc_reg_operand" "f,f")) ++ (match_operand:DF 3 "gpc_reg_operand" "d,d")) + (set (match_operand:SI 0 "gpc_reg_operand" "=b,b") + (plus:SI (match_dup 1) (match_dup 2)))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_UPDATE +@@ -12237,8 +12237,8 @@ + + (define_insn "*cmpdf_internal1" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") +- (compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "f") +- (match_operand:DF 2 "gpc_reg_operand" "f")))] ++ (compare:CCFP (match_operand:DF 1 "gpc_reg_operand" "d") ++ (match_operand:DF 2 "gpc_reg_operand" "d")))] + "TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT" + "fcmpu %0,%1,%2" + [(set_attr "type" "fpcompare")]) +@@ -12246,8 +12246,8 @@ + ;; Only need to compare second words if first words equal + (define_insn "*cmptf_internal1" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") +- (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") +- (match_operand:TF 2 "gpc_reg_operand" "f")))] ++ (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "d") ++ (match_operand:TF 2 "gpc_reg_operand" "d")))] + "!TARGET_IEEEQUAD && !TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LONG_DOUBLE_128" + "fcmpu %0,%1,%2\;bne %0,$+8\;fcmpu %0,%L1,%L2" +@@ -12256,16 +12256,16 @@ + + (define_insn_and_split "*cmptf_internal2" + [(set (match_operand:CCFP 0 "cc_reg_operand" "=y") +- (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "f") +- (match_operand:TF 2 "gpc_reg_operand" "f"))) +- (clobber (match_scratch:DF 3 "=f")) +- (clobber (match_scratch:DF 4 "=f")) +- (clobber (match_scratch:DF 5 "=f")) +- (clobber (match_scratch:DF 6 "=f")) +- (clobber (match_scratch:DF 7 "=f")) +- (clobber (match_scratch:DF 8 "=f")) +- (clobber (match_scratch:DF 9 "=f")) +- (clobber (match_scratch:DF 10 "=f"))] ++ (compare:CCFP (match_operand:TF 1 "gpc_reg_operand" "d") ++ (match_operand:TF 2 "gpc_reg_operand" "d"))) ++ (clobber (match_scratch:DF 3 "=d")) ++ (clobber (match_scratch:DF 4 "=d")) ++ (clobber (match_scratch:DF 5 "=d")) ++ (clobber (match_scratch:DF 6 "=d")) ++ (clobber (match_scratch:DF 7 "=d")) ++ (clobber (match_scratch:DF 8 "=d")) ++ (clobber (match_scratch:DF 9 "=d")) ++ (clobber (match_scratch:DF 10 "=d"))] + "!TARGET_IEEEQUAD && TARGET_XL_COMPAT + && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT && TARGET_LONG_DOUBLE_128" + "#" +@@ -14741,7 +14741,7 @@ + (use (match_operand:P 1 "symbol_ref_operand" "s")) + (use (match_operand:P 2 "gpc_reg_operand" "r")) + (set (match_operand:DF 3 "memory_operand" "=m") +- (match_operand:DF 4 "gpc_reg_operand" "f"))])] ++ (match_operand:DF 4 "gpc_reg_operand" "d"))])] + "" + "bl %z1" + [(set_attr "type" "branch") +@@ -14861,7 +14861,7 @@ + (clobber (match_operand:P 1 "register_operand" "=l")) + (use (match_operand:P 2 "symbol_ref_operand" "s")) + (use (match_operand:P 3 "gpc_reg_operand" "r")) +- (set (match_operand:DF 4 "gpc_reg_operand" "=f") ++ (set (match_operand:DF 4 "gpc_reg_operand" "=d") + (match_operand:DF 5 "memory_operand" "m"))])] + "" + "b %z2" +Index: gcc-4.4.1/gcc/config/rs6000/ppu_intrinsics.h +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/ppu_intrinsics.h 2009-10-06 14:08:35.837316319 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/ppu_intrinsics.h 2009-10-06 14:09:12.087313658 -0700 +@@ -385,11 +385,11 @@ typedef int __V4SI __attribute__((vector + + #define __mffs() __extension__ \ + ({double result; \ +- __asm__ volatile ("mffs %0" : "=f" (result)); \ ++ __asm__ volatile ("mffs %0" : "=d" (result)); \ + result; }) + + #define __mtfsf(mask,value) \ +- __asm__ volatile ("mtfsf %0,%1" : : "n" (mask), "f" ((double) (value))) ++ __asm__ volatile ("mtfsf %0,%1" : : "n" (mask), "d" ((double) (value))) + + #define __mtfsfi(bits,field) \ + __asm__ volatile ("mtfsfi %0,%1" : : "n" (bits), "n" (field)) +@@ -400,8 +400,8 @@ typedef int __V4SI __attribute__((vector + #define __setflm(v) __extension__ \ + ({double result; \ + __asm__ volatile ("mffs %0\n\tmtfsf 255,%1" \ +- : "=&f" (result) \ +- : "f" ((double) (v))); \ ++ : "=&d" (result) \ ++ : "d" ((double) (v))); \ + result; }) + + /* __builtin_fabs may perform unnecessary rounding. */ +@@ -416,7 +416,7 @@ static __inline__ double + __fabs(double x) + { + double r; +- __asm__("fabs %0,%1" : "=f"(r) : "f"(x)); ++ __asm__("fabs %0,%1" : "=d"(r) : "d"(x)); + return r; + } + +@@ -434,7 +434,7 @@ static __inline__ double + __fnabs(double x) + { + double r; +- __asm__("fnabs %0,%1" : "=f"(r) : "f"(x)); ++ __asm__("fnabs %0,%1" : "=d"(r) : "d"(x)); + return r; + } + +@@ -453,7 +453,7 @@ static __inline__ double + __fmadd(double x, double y, double z) + { + double r; +- __asm__("fmadd %0,%1,%2,%3" : "=f"(r) : "f"(x),"f"(y),"f"(z)); ++ __asm__("fmadd %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z)); + return r; + } + +@@ -463,7 +463,7 @@ static __inline__ double + __fmsub(double x, double y, double z) + { + double r; +- __asm__("fmsub %0,%1,%2,%3" : "=f"(r) : "f"(x),"f"(y),"f"(z)); ++ __asm__("fmsub %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z)); + return r; + } + +@@ -473,7 +473,7 @@ static __inline__ double + __fnmadd(double x, double y, double z) + { + double r; +- __asm__("fnmadd %0,%1,%2,%3" : "=f"(r) : "f"(x),"f"(y),"f"(z)); ++ __asm__("fnmadd %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z)); + return r; + } + +@@ -483,7 +483,7 @@ static __inline__ double + __fnmsub(double x, double y, double z) + { + double r; +- __asm__("fnmsub %0,%1,%2,%3" : "=f"(r) : "f"(x),"f"(y),"f"(z)); ++ __asm__("fnmsub %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z)); + return r; + } + +@@ -533,7 +533,7 @@ static __inline__ double + __fsel(double x, double y, double z) + { + double r; +- __asm__("fsel %0,%1,%2,%3" : "=f"(r) : "f"(x),"f"(y),"f"(z)); ++ __asm__("fsel %0,%1,%2,%3" : "=d"(r) : "d"(x),"d"(y),"d"(z)); + return r; + } + +@@ -552,7 +552,7 @@ static __inline__ double + __frsqrte(double x) + { + double r; +- __asm__("frsqrte %0,%1" : "=f" (r) : "f" (x)); ++ __asm__("frsqrte %0,%1" : "=d" (r) : "d" (x)); + return r; + } + +@@ -570,7 +570,7 @@ static __inline__ double + __fsqrt(double x) + { + double r; +- __asm__("fsqrt %0,%1" : "=f"(r) : "f"(x)); ++ __asm__("fsqrt %0,%1" : "=d"(r) : "d"(x)); + return r; + } + +@@ -588,7 +588,7 @@ static __inline__ double + __fmul(double a, double b) + { + double d; +- __asm__ ("fmul %0,%1,%2" : "=f" (d) : "f" (a), "f" (b)); ++ __asm__ ("fmul %0,%1,%2" : "=d" (d) : "d" (a), "d" (b)); + return d; + } + +@@ -597,7 +597,7 @@ static __inline__ float + __fmuls (float a, float b) + { + float d; +- __asm__ ("fmuls %0,%1,%2" : "=f" (d) : "f" (a), "f" (b)); ++ __asm__ ("fmuls %0,%1,%2" : "=d" (d) : "f" (a), "f" (b)); + return d; + } + +@@ -606,7 +606,7 @@ static __inline__ float + __frsp (float a) + { + float d; +- __asm__ ("frsp %0,%1" : "=f" (d) : "f" (a)); ++ __asm__ ("frsp %0,%1" : "=d" (d) : "f" (a)); + return d; + } + +@@ -615,7 +615,7 @@ static __inline__ double + __fcfid (long long a) + { + double d; +- __asm__ ("fcfid %0,%1" : "=f" (d) : "f" (a)); ++ __asm__ ("fcfid %0,%1" : "=d" (d) : "d" (a)); + return d; + } + +@@ -624,7 +624,7 @@ static __inline__ long long + __fctid (double a) + { + long long d; +- __asm__ ("fctid %0,%1" : "=f" (d) : "f" (a)); ++ __asm__ ("fctid %0,%1" : "=d" (d) : "d" (a)); + return d; + } + +@@ -633,7 +633,7 @@ static __inline__ long long + __fctidz (double a) + { + long long d; +- __asm__ ("fctidz %0,%1" : "=f" (d) : "f" (a)); ++ __asm__ ("fctidz %0,%1" : "=d" (d) : "d" (a)); + return d; + } + +@@ -642,7 +642,7 @@ static __inline__ int + __fctiw (double a) + { + unsigned long long d; +- __asm__ ("fctiw %0,%1" : "=f" (d) : "f" (a)); ++ __asm__ ("fctiw %0,%1" : "=d" (d) : "d" (a)); + return (int) d; + } + +@@ -651,7 +651,7 @@ static __inline__ int + __fctiwz (double a) + { + long long d; +- __asm__ ("fctiwz %0,%1" : "=f" (d) : "f" (a)); ++ __asm__ ("fctiwz %0,%1" : "=d" (d) : "d" (a)); + return (int) d; + } + diff --git a/recipes/gcc/gcc-4.4.4/gcc-ppc_single_precision_regs.patch b/recipes/gcc/gcc-4.4.4/gcc-ppc_single_precision_regs.patch new file mode 100644 index 0000000000..5b35d6e74c --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-ppc_single_precision_regs.patch @@ -0,0 +1,60 @@ +Index: gcc-4.4.1/gcc/config/rs6000/rs6000.c +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/rs6000.c 2009-10-06 13:51:50.427316302 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/rs6000.c 2009-10-06 14:09:04.737313663 -0700 +@@ -22580,7 +22580,8 @@ rs6000_function_value (const_tree valtyp + if (DECIMAL_FLOAT_MODE_P (mode) && TARGET_HARD_FLOAT && TARGET_FPRS) + /* _Decimal128 must use an even/odd register pair. */ + regno = (mode == TDmode) ? FP_ARG_RETURN + 1 : FP_ARG_RETURN; +- else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS) ++ else if (SCALAR_FLOAT_TYPE_P (valtype) && TARGET_HARD_FLOAT && TARGET_FPRS ++ && ((TARGET_SINGLE_FLOAT && (mode == SFmode)) || TARGET_DOUBLE_FLOAT)) + regno = FP_ARG_RETURN; + else if (TREE_CODE (valtype) == COMPLEX_TYPE + && targetm.calls.split_complex_arg) +Index: gcc-4.4.1/gcc/config/rs6000/rs6000.md +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/rs6000.md 2009-10-06 14:08:35.827340958 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/rs6000.md 2009-10-06 14:09:04.737313663 -0700 +@@ -8143,8 +8143,8 @@ + (define_insn "*movsi_internal1" + [(set (match_operand:SI 0 "rs6000_nonimmediate_operand" "=r,r,r,m,r,r,r,r,r,*q,*c*l,*h,*h") + (match_operand:SI 1 "input_operand" "r,U,m,r,I,L,n,R,*h,r,r,r,0"))] +- "gpc_reg_operand (operands[0], SImode) +- || gpc_reg_operand (operands[1], SImode)" ++ "!TARGET_SINGLE_FPU && ++ gpc_reg_operand (operands[0], SImode) || gpc_reg_operand (operands[1], SImode)" + "@ + mr %0,%1 + {cal|la} %0,%a1 +@@ -8162,6 +8162,30 @@ + [(set_attr "type" "*,*,load,store,*,*,*,*,mfjmpr,*,mtjmpr,*,*") + (set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4")]) + ++(define_insn "*movsi_internal1_single" ++ [(set (match_operand:SI 0 "rs6000_nonimmediate_operand" "=r,r,r,m,r,r,r,r,r,*q,*c*l,*h,*h,m,*f") ++ (match_operand:SI 1 "input_operand" "r,U,m,r,I,L,n,R,*h,r,r,r,0,f,m"))] ++ "TARGET_SINGLE_FPU && ++ gpc_reg_operand (operands[0], SImode) || gpc_reg_operand (operands[1], SImode)" ++ "@ ++ mr %0,%1 ++ {cal|la} %0,%a1 ++ {l%U1%X1|lwz%U1%X1} %0,%1 ++ {st%U0%X0|stw%U0%X0} %1,%0 ++ {lil|li} %0,%1 ++ {liu|lis} %0,%v1 ++ # ++ {cal|la} %0,%a1 ++ mf%1 %0 ++ mt%0 %1 ++ mt%0 %1 ++ mt%0 %1 ++ {cror 0,0,0|nop} ++ stfs%U0%X0 %1, %0 ++ lfs%U1%X1 %0, %1" ++ [(set_attr "type" "*,*,load,store,*,*,*,*,mfjmpr,*,mtjmpr,*,*,*,*") ++ (set_attr "length" "4,4,4,4,4,4,8,4,4,4,4,4,4,4,4")]) ++ + ;; Split a load of a large constant into the appropriate two-insn + ;; sequence. + diff --git a/recipes/gcc/gcc-4.4.4/gcc-pr41175.patch b/recipes/gcc/gcc-4.4.4/gcc-pr41175.patch new file mode 100644 index 0000000000..10da543958 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-pr41175.patch @@ -0,0 +1,1172 @@ +Index: gcc-4.4.1/gcc/testsuite/gcc.target/powerpc/pr41175.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ gcc-4.4.1/gcc/testsuite/gcc.target/powerpc/pr41175.c 2009-10-06 14:09:19.757404626 -0700 +@@ -0,0 +1,461 @@ ++/* PR target/41175 */ ++/* { dg-do run } */ ++/* { dg-options "-Os" } */ ++ ++#define X2(n) X1(n##0) X1(n##1) ++#define X4(n) X2(n##0) X2(n##1) ++#define X8(n) X4(n##0) X4(n##1) ++ ++#ifndef __SPE__ ++#define FLOAT_REG_CONSTRAINT "f" ++#else ++#define FLOAT_REG_CONSTRAINT "r" ++#endif ++ ++volatile int ll; ++ ++__attribute__((noinline)) void ++foo (void) ++{ ++ asm volatile ("" : : : "memory"); ++} ++ ++__attribute__((noinline)) void ++bar (char *p) ++{ ++ asm volatile ("" : : "r" (p) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f1 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++ foo (); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f2 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++ char *pp = __builtin_alloca (ll); ++ bar (pp); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f3 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++} ++ ++#ifndef __NO_FPRS__ ++__attribute__((noinline)) void ++f4 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X4(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X4(d) "=m" (mem) : : "memory"); ++ foo (); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X4(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f5 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X4(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X4(d) "=m" (mem) : : "memory"); ++ char *pp = __builtin_alloca (ll); ++ bar (pp); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X4(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f6 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X4(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X4(d) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X4(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f7 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X2(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X2(d) "=m" (mem) : : "memory"); ++ foo (); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X2(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f8 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X2(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X2(d) "=m" (mem) : : "memory"); ++ char *pp = __builtin_alloca (ll); ++ bar (pp); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X2(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f9 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X8(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X2(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X2(d) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X2(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f10 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X4(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X1(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X4(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X1(d) "=m" (mem) : : "memory"); ++ foo (); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X4(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X1(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f11 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X4(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X1(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X4(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X1(d) "=m" (mem) : : "memory"); ++ char *pp = __builtin_alloca (ll); ++ bar (pp); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X4(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X1(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f12 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X4(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X1(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X4(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X1(d) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X4(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X1(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f13 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X2(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X8(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X2(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X8(d) "=m" (mem) : : "memory"); ++ foo (); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X2(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X8(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f14 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X2(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X8(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X2(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X8(d) "=m" (mem) : : "memory"); ++ char *pp = __builtin_alloca (ll); ++ bar (pp); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X2(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X8(d) "m" (mem) : "memory"); ++} ++ ++__attribute__((noinline)) void ++f15 (void) ++{ ++ int mem; ++#undef X1 ++#define X1(n) int gpr##n = 0; ++ X8(a) X8(b) X2(c) ++#undef X1 ++#define X1(n) double fpr##n = 0.0; ++ X8(d) ++#undef X1 ++#define X1(n) "+r" (gpr##n), ++ asm volatile ("" : X8(a) "=m" (mem) : : "memory"); ++ asm volatile ("" : X8(b) "=m" (mem) : : "memory"); ++ asm volatile ("" : X2(c) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "+" FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : X8(d) "=m" (mem) : : "memory"); ++#undef X1 ++#define X1(n) "r" (gpr##n), ++ asm volatile ("" : : X8(a) "m" (mem) : "memory"); ++ asm volatile ("" : : X8(b) "m" (mem) : "memory"); ++ asm volatile ("" : : X2(c) "m" (mem) : "memory"); ++#undef X1 ++#define X1(n) FLOAT_REG_CONSTRAINT (fpr##n), ++ asm volatile ("" : : X8(d) "m" (mem) : "memory"); ++} ++#endif ++ ++int ++main () ++{ ++ ll = 60; ++ f1 (); ++ f2 (); ++ f3 (); ++#ifndef __NO_FPRS__ ++ f4 (); ++ f5 (); ++ f6 (); ++ f7 (); ++ f8 (); ++ f9 (); ++ f10 (); ++ f11 (); ++ f12 (); ++ f13 (); ++ f14 (); ++ f15 (); ++#endif ++ return 0; ++} +Index: gcc-4.4.1/gcc/config/rs6000/spe.md +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/spe.md 2009-10-06 13:51:50.387320717 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/spe.md 2009-10-06 14:09:19.767365878 -0700 +@@ -3156,9 +3156,9 @@ + [(match_parallel 0 "any_parallel_operand" + [(clobber (reg:P 65)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) +- (use (match_operand:P 2 "gpc_reg_operand" "r")) +- (set (match_operand:V2SI 3 "memory_operand" "=m") +- (match_operand:V2SI 4 "gpc_reg_operand" "r"))])] ++ (use (reg:P 11)) ++ (set (match_operand:V2SI 2 "memory_operand" "=m") ++ (match_operand:V2SI 3 "gpc_reg_operand" "r"))])] + "TARGET_SPE_ABI" + "bl %z1" + [(set_attr "type" "branch") +@@ -3168,9 +3168,9 @@ + [(match_parallel 0 "any_parallel_operand" + [(clobber (reg:P 65)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) +- (use (match_operand:P 2 "gpc_reg_operand" "r")) +- (set (match_operand:V2SI 3 "gpc_reg_operand" "=r") +- (match_operand:V2SI 4 "memory_operand" "m"))])] ++ (use (reg:P 11)) ++ (set (match_operand:V2SI 2 "gpc_reg_operand" "=r") ++ (match_operand:V2SI 3 "memory_operand" "m"))])] + "TARGET_SPE_ABI" + "bl %z1" + [(set_attr "type" "branch") +@@ -3181,9 +3181,9 @@ + [(return) + (clobber (reg:P 65)) + (use (match_operand:P 1 "symbol_ref_operand" "s")) +- (use (match_operand:P 2 "gpc_reg_operand" "r")) +- (set (match_operand:V2SI 3 "gpc_reg_operand" "=r") +- (match_operand:V2SI 4 "memory_operand" "m"))])] ++ (use (reg:P 11)) ++ (set (match_operand:V2SI 2 "gpc_reg_operand" "=r") ++ (match_operand:V2SI 3 "memory_operand" "m"))])] + "TARGET_SPE_ABI" + "b %z1" + [(set_attr "type" "branch") +Index: gcc-4.4.1/gcc/config/rs6000/linux64.h +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/linux64.h 2009-10-06 13:51:50.347316402 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/linux64.h 2009-10-06 14:09:19.777366800 -0700 +@@ -433,11 +433,11 @@ extern int dot_symbols; + #undef SAVE_FP_PREFIX + #define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_") + #undef SAVE_FP_SUFFIX +-#define SAVE_FP_SUFFIX (TARGET_64BIT ? "" : "_l") ++#define SAVE_FP_SUFFIX "" + #undef RESTORE_FP_PREFIX + #define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_") + #undef RESTORE_FP_SUFFIX +-#define RESTORE_FP_SUFFIX (TARGET_64BIT ? "" : "_l") ++#define RESTORE_FP_SUFFIX "" + + /* Dwarf2 debugging. */ + #undef PREFERRED_DEBUGGING_TYPE +Index: gcc-4.4.1/gcc/config/rs6000/rs6000.c +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/rs6000.c 2009-10-06 14:09:04.737313663 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/rs6000.c 2009-10-06 14:09:19.797315286 -0700 +@@ -15843,7 +15843,8 @@ static bool + no_global_regs_above (int first, bool gpr) + { + int i; +- for (i = first; i < gpr ? 32 : 64 ; i++) ++ int last = gpr ? 32 : 64; ++ for (i = first; i < last; i++) + if (global_regs[i]) + return false; + return true; +@@ -15860,54 +15861,136 @@ no_global_regs_above (int first, bool gp + + static GTY(()) rtx savres_routine_syms[N_SAVRES_REGISTERS][8]; + +-/* Return the symbol for an out-of-line register save/restore routine. ++/* Temporary holding space for an out-of-line register save/restore ++ routine name. */ ++static char savres_routine_name[30]; ++ ++/* Return the name for an out-of-line register save/restore routine. ++ We are saving/restoring GPRs if GPR is true. */ ++ ++static char * ++rs6000_savres_routine_name (rs6000_stack_t *info, int regno, ++ bool savep, bool gpr, bool lr) ++{ ++ const char *prefix = ""; ++ const char *suffix = ""; ++ ++ /* Different targets are supposed to define ++ {SAVE,RESTORE}_FP_{PREFIX,SUFFIX} with the idea that the needed ++ routine name could be defined with: ++ ++ sprintf (name, "%s%d%s", SAVE_FP_PREFIX, regno, SAVE_FP_SUFFIX) ++ ++ This is a nice idea in practice, but in reality, things are ++ complicated in several ways: ++ ++ - ELF targets have save/restore routines for GPRs. ++ ++ - SPE targets use different prefixes for 32/64-bit registers, and ++ neither of them fit neatly in the FOO_{PREFIX,SUFFIX} regimen. ++ ++ - PPC64 ELF targets have routines for save/restore of GPRs that ++ differ in what they do with the link register, so having a set ++ prefix doesn't work. (We only use one of the save routines at ++ the moment, though.) ++ ++ - PPC32 elf targets have "exit" versions of the restore routines ++ that restore the link register and can save some extra space. ++ These require an extra suffix. (There are also "tail" versions ++ of the restore routines and "GOT" versions of the save routines, ++ but we don't generate those at present. Same problems apply, ++ though.) ++ ++ We deal with all this by synthesizing our own prefix/suffix and ++ using that for the simple sprintf call shown above. */ ++ if (TARGET_SPE) ++ { ++ /* No floating point saves on the SPE. */ ++ gcc_assert (gpr); ++ ++ if (savep) ++ prefix = info->spe_64bit_regs_used ? "_save64gpr_" : "_save32gpr_"; ++ else ++ prefix = info->spe_64bit_regs_used ? "_rest64gpr_" : "_rest32gpr_"; ++ ++ if (lr) ++ suffix = "_x"; ++ } ++ else if (DEFAULT_ABI == ABI_V4) ++ { ++ if (TARGET_64BIT) ++ goto aix_names; ++ ++ if (gpr) ++ prefix = savep ? "_savegpr_" : "_restgpr_"; ++ else ++ prefix = savep ? "_savefpr_" : "_restfpr_"; ++ ++ if (lr) ++ suffix = "_x"; ++ } ++ else if (DEFAULT_ABI == ABI_AIX) ++ { ++#ifndef POWERPC_LINUX ++ /* No out-of-line save/restore routines for GPRs on AIX. */ ++ gcc_assert (!TARGET_AIX || !gpr); ++#endif ++ ++ aix_names: ++ if (gpr) ++ prefix = (savep ++ ? (lr ? "_savegpr0_" : "_savegpr1_") ++ : (lr ? "_restgpr0_" : "_restgpr1_")); ++#ifdef POWERPC_LINUX ++ else if (lr) ++ prefix = (savep ? "_savefpr_" : "_restfpr_"); ++#endif ++ else ++ { ++ prefix = savep ? SAVE_FP_PREFIX : RESTORE_FP_PREFIX; ++ suffix = savep ? SAVE_FP_SUFFIX : RESTORE_FP_SUFFIX; ++ } ++ } ++ else if (DEFAULT_ABI == ABI_DARWIN) ++ sorry ("Out-of-line save/restore routines not supported on Darwin"); ++ ++ sprintf (savres_routine_name, "%s%d%s", prefix, regno, suffix); ++ ++ return savres_routine_name; ++} ++ ++/* Return an RTL SYMBOL_REF for an out-of-line register save/restore routine. + We are saving/restoring GPRs if GPR is true. */ + + static rtx +-rs6000_savres_routine_sym (rs6000_stack_t *info, bool savep, bool gpr, bool exitp) ++rs6000_savres_routine_sym (rs6000_stack_t *info, bool savep, ++ bool gpr, bool lr) + { + int regno = gpr ? info->first_gp_reg_save : (info->first_fp_reg_save - 32); + rtx sym; + int select = ((savep ? 1 : 0) << 2 +- | (gpr +- /* On the SPE, we never have any FPRs, but we do have +- 32/64-bit versions of the routines. */ +- ? (TARGET_SPE_ABI && info->spe_64bit_regs_used ? 1 : 0) +- : 0) << 1 +- | (exitp ? 1: 0)); ++ | ((TARGET_SPE_ABI ++ /* On the SPE, we never have any FPRs, but we do have ++ 32/64-bit versions of the routines. */ ++ ? (info->spe_64bit_regs_used ? 1 : 0) ++ : (gpr ? 1 : 0)) << 1) ++ | (lr ? 1: 0)); + + /* Don't generate bogus routine names. */ +- gcc_assert (FIRST_SAVRES_REGISTER <= regno && regno <= LAST_SAVRES_REGISTER); ++ gcc_assert (FIRST_SAVRES_REGISTER <= regno ++ && regno <= LAST_SAVRES_REGISTER); + + sym = savres_routine_syms[regno-FIRST_SAVRES_REGISTER][select]; + + if (sym == NULL) + { +- char name[30]; +- const char *action; +- const char *regkind; +- const char *exit_suffix; +- +- action = savep ? "save" : "rest"; +- +- /* SPE has slightly different names for its routines depending on +- whether we are saving 32-bit or 64-bit registers. */ +- if (TARGET_SPE_ABI) +- { +- /* No floating point saves on the SPE. */ +- gcc_assert (gpr); +- +- regkind = info->spe_64bit_regs_used ? "64gpr" : "32gpr"; +- } +- else +- regkind = gpr ? "gpr" : "fpr"; +- +- exit_suffix = exitp ? "_x" : ""; ++ char *name; + +- sprintf (name, "_%s%s_%d%s", action, regkind, regno, exit_suffix); ++ name = rs6000_savres_routine_name (info, regno, savep, gpr, lr); + + sym = savres_routine_syms[regno-FIRST_SAVRES_REGISTER][select] + = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name)); ++ SYMBOL_REF_FLAGS (sym) |= SYMBOL_FLAG_FUNCTION; + } + + return sym; +@@ -15935,8 +16018,13 @@ rs6000_emit_stack_reset (rs6000_stack_t + { + rs6000_emit_stack_tie (); + if (sp_offset != 0) +- emit_insn (gen_addsi3 (sp_reg_rtx, frame_reg_rtx, +- GEN_INT (sp_offset))); ++ { ++ rtx dest_reg = savres ? gen_rtx_REG (Pmode, 11) : sp_reg_rtx; ++ ++ return emit_insn (gen_addsi3 (dest_reg, frame_reg_rtx, ++ GEN_INT (sp_offset))); ++ } ++ + else if (!savres) + emit_move_insn (sp_reg_rtx, frame_reg_rtx); + } +@@ -15965,7 +16053,7 @@ static rtx + rs6000_make_savres_rtx (rs6000_stack_t *info, + rtx frame_reg_rtx, int save_area_offset, + enum machine_mode reg_mode, +- bool savep, bool gpr, bool exitp) ++ bool savep, bool gpr, bool lr) + { + int i; + int offset, start_reg, end_reg, n_regs; +@@ -15979,20 +16067,21 @@ rs6000_make_savres_rtx (rs6000_stack_t * + : info->first_fp_reg_save); + end_reg = gpr ? 32 : 64; + n_regs = end_reg - start_reg; +- p = rtvec_alloc ((exitp ? 4 : 3) + n_regs); +- +- /* If we're saving registers, then we should never say we're exiting. */ +- gcc_assert ((savep && !exitp) || !savep); ++ p = rtvec_alloc ((lr ? 4 : 3) + n_regs); + +- if (exitp) ++ if (!savep && lr) + RTVEC_ELT (p, offset++) = gen_rtx_RETURN (VOIDmode); + + RTVEC_ELT (p, offset++) + = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 65)); + +- sym = rs6000_savres_routine_sym (info, savep, gpr, exitp); ++ sym = rs6000_savres_routine_sym (info, savep, gpr, lr); + RTVEC_ELT (p, offset++) = gen_rtx_USE (VOIDmode, sym); +- RTVEC_ELT (p, offset++) = gen_rtx_USE (VOIDmode, gen_rtx_REG (Pmode, 11)); ++ RTVEC_ELT (p, offset++) ++ = gen_rtx_USE (VOIDmode, ++ gen_rtx_REG (Pmode, DEFAULT_ABI != ABI_AIX ? 11 ++ : gpr && !lr ? 12 ++ : 1)); + + for (i = 0; i < end_reg - start_reg; i++) + { +@@ -16007,6 +16096,16 @@ rs6000_make_savres_rtx (rs6000_stack_t * + savep ? reg : mem); + } + ++ if (savep && lr) ++ { ++ rtx addr, reg, mem; ++ reg = gen_rtx_REG (Pmode, 0); ++ addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, ++ GEN_INT (info->lr_save_offset)); ++ mem = gen_frame_mem (Pmode, addr); ++ RTVEC_ELT (p, i + offset) = gen_rtx_SET (VOIDmode, mem, reg); ++ } ++ + return gen_rtx_PARALLEL (VOIDmode, p); + } + +@@ -16027,7 +16126,10 @@ rs6000_reg_live_or_pic_offset_p (int reg + enum { + SAVRES_MULTIPLE = 0x1, + SAVRES_INLINE_FPRS = 0x2, +- SAVRES_INLINE_GPRS = 0x4 ++ SAVRES_INLINE_GPRS = 0x4, ++ SAVRES_NOINLINE_GPRS_SAVES_LR = 0x8, ++ SAVRES_NOINLINE_FPRS_SAVES_LR = 0x10, ++ SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR = 0x20 + }; + + /* Determine the strategy for savings/restoring registers. */ +@@ -16042,6 +16144,7 @@ rs6000_savres_strategy (rs6000_stack_t * + bool savres_gprs_inline; + bool noclobber_global_gprs + = no_global_regs_above (info->first_gp_reg_save, /*gpr=*/true); ++ int strategy; + + using_multiple_p = (TARGET_MULTIPLE && ! TARGET_POWERPC64 + && (!TARGET_SPE_ABI +@@ -16061,6 +16164,10 @@ rs6000_savres_strategy (rs6000_stack_t * + || info->first_fp_reg_save == 64 + || !no_global_regs_above (info->first_fp_reg_save, + /*gpr=*/false) ++ /* The out-of-line FP routines use ++ double-precision stores; we can't use those ++ routines if we don't have such stores. */ ++ || (TARGET_HARD_FLOAT && !TARGET_DOUBLE_FLOAT) + || FP_SAVE_INLINE (info->first_fp_reg_save)); + savres_gprs_inline = (common + /* Saving CR interferes with the exit routines +@@ -16098,9 +16205,22 @@ rs6000_savres_strategy (rs6000_stack_t * + savres_gprs_inline = savres_gprs_inline || using_multiple_p; + } + +- return (using_multiple_p +- | (savres_fprs_inline << 1) +- | (savres_gprs_inline << 2)); ++ strategy = (using_multiple_p ++ | (savres_fprs_inline << 1) ++ | (savres_gprs_inline << 2)); ++#ifdef POWERPC_LINUX ++ if (TARGET_64BIT) ++ { ++ if (!savres_fprs_inline) ++ strategy |= SAVRES_NOINLINE_FPRS_SAVES_LR; ++ else if (!savres_gprs_inline && info->first_fp_reg_save == 64) ++ strategy |= SAVRES_NOINLINE_GPRS_SAVES_LR; ++ } ++#else ++ if (TARGET_AIX && !savres_fprs_inline) ++ strategy |= SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR; ++#endif ++ return strategy; + } + + /* Emit function prologue as insns. */ +@@ -16122,7 +16242,7 @@ rs6000_emit_prologue (void) + int using_store_multiple; + int using_static_chain_p = (cfun->static_chain_decl != NULL_TREE + && df_regs_ever_live_p (STATIC_CHAIN_REGNUM) +- && !call_used_regs[STATIC_CHAIN_REGNUM]); ++ && call_used_regs[STATIC_CHAIN_REGNUM]); + HOST_WIDE_INT sp_offset = 0; + + if (TARGET_FIX_AND_CONTINUE) +@@ -16307,24 +16427,30 @@ rs6000_emit_prologue (void) + gen_rtx_REG (Pmode, LR_REGNO)); + RTX_FRAME_RELATED_P (insn) = 1; + +- addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, ++ if (!(strategy & (SAVRES_NOINLINE_GPRS_SAVES_LR ++ | SAVRES_NOINLINE_FPRS_SAVES_LR))) ++ { ++ addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (info->lr_save_offset + sp_offset)); +- reg = gen_rtx_REG (Pmode, 0); +- mem = gen_rtx_MEM (Pmode, addr); +- /* This should not be of rs6000_sr_alias_set, because of +- __builtin_return_address. */ ++ reg = gen_rtx_REG (Pmode, 0); ++ mem = gen_rtx_MEM (Pmode, addr); ++ /* This should not be of rs6000_sr_alias_set, because of ++ __builtin_return_address. */ + +- insn = emit_move_insn (mem, reg); +- rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, +- NULL_RTX, NULL_RTX); ++ insn = emit_move_insn (mem, reg); ++ rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, ++ NULL_RTX, NULL_RTX); ++ } + } + +- /* If we need to save CR, put it into r12. */ ++ /* If we need to save CR, put it into r12 or r11. */ + if (!WORLD_SAVE_P (info) && info->cr_save_p && frame_reg_rtx != frame_ptr_rtx) + { + rtx set; + +- cr_save_rtx = gen_rtx_REG (SImode, 12); ++ cr_save_rtx ++ = gen_rtx_REG (SImode, DEFAULT_ABI == ABI_AIX && !saving_GPRs_inline ++ ? 11 : 12); + insn = emit_insn (gen_movesi_from_cr (cr_save_rtx)); + RTX_FRAME_RELATED_P (insn) = 1; + /* Now, there's no way that dwarf2out_frame_debug_expr is going +@@ -16363,7 +16489,9 @@ rs6000_emit_prologue (void) + info->fp_save_offset + sp_offset, + DFmode, + /*savep=*/true, /*gpr=*/false, +- /*exitp=*/false); ++ /*lr=*/(strategy ++ & SAVRES_NOINLINE_FPRS_SAVES_LR) ++ != 0); + insn = emit_insn (par); + rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + NULL_RTX, NULL_RTX); +@@ -16459,7 +16587,7 @@ rs6000_emit_prologue (void) + par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11), + 0, reg_mode, + /*savep=*/true, /*gpr=*/true, +- /*exitp=*/false); ++ /*lr=*/false); + insn = emit_insn (par); + rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + NULL_RTX, NULL_RTX); +@@ -16474,25 +16602,24 @@ rs6000_emit_prologue (void) + { + rtx par; + +- /* Need to adjust r11 if we saved any FPRs. */ ++ /* Need to adjust r11 (r12) if we saved any FPRs. */ + if (info->first_fp_reg_save != 64) + { +- rtx r11 = gen_rtx_REG (reg_mode, 11); +- rtx offset = GEN_INT (info->total_size +- + (-8 * (64-info->first_fp_reg_save))); +- rtx ptr_reg = (sp_reg_rtx == frame_reg_rtx +- ? sp_reg_rtx : r11); +- +- emit_insn (TARGET_32BIT +- ? gen_addsi3 (r11, ptr_reg, offset) +- : gen_adddi3 (r11, ptr_reg, offset)); ++ rtx dest_reg = gen_rtx_REG (reg_mode, DEFAULT_ABI == ABI_AIX ++ ? 12 : 11); ++ rtx offset = GEN_INT (sp_offset ++ + (-8 * (64-info->first_fp_reg_save))); ++ emit_insn (gen_add3_insn (dest_reg, frame_reg_rtx, offset)); + } + + par = rs6000_make_savres_rtx (info, frame_reg_rtx, + info->gp_save_offset + sp_offset, + reg_mode, + /*savep=*/true, /*gpr=*/true, +- /*exitp=*/false); ++ /*lr=*/(strategy ++ & SAVRES_NOINLINE_GPRS_SAVES_LR) ++ != 0); ++ + insn = emit_insn (par); + rs6000_frame_related (insn, frame_ptr_rtx, info->total_size, + NULL_RTX, NULL_RTX); +@@ -16772,9 +16899,18 @@ rs6000_output_function_prologue (FILE *f + fp values. */ + if (info->first_fp_reg_save < 64 + && !FP_SAVE_INLINE (info->first_fp_reg_save)) +- fprintf (file, "\t.extern %s%d%s\n\t.extern %s%d%s\n", +- SAVE_FP_PREFIX, info->first_fp_reg_save - 32, SAVE_FP_SUFFIX, +- RESTORE_FP_PREFIX, info->first_fp_reg_save - 32, RESTORE_FP_SUFFIX); ++ { ++ char *name; ++ int regno = info->first_fp_reg_save - 32; ++ ++ name = rs6000_savres_routine_name (info, regno, /*savep=*/true, ++ /*gpr=*/false, /*lr=*/false); ++ fprintf (file, "\t.extern %s\n", name); ++ ++ name = rs6000_savres_routine_name (info, regno, /*savep=*/false, ++ /*gpr=*/false, /*lr=*/true); ++ fprintf (file, "\t.extern %s\n", name); ++ } + + /* Write .extern for AIX common mode routines, if needed. */ + if (! TARGET_POWER && ! TARGET_POWERPC && ! common_mode_defined) +@@ -16891,6 +17027,7 @@ rs6000_emit_epilogue (int sibcall) + int sp_offset = 0; + rtx sp_reg_rtx = gen_rtx_REG (Pmode, 1); + rtx frame_reg_rtx = sp_reg_rtx; ++ rtx cr_save_reg = NULL_RTX; + enum machine_mode reg_mode = Pmode; + int reg_size = TARGET_32BIT ? 4 : 8; + int i; +@@ -16924,8 +17061,10 @@ rs6000_emit_epilogue (int sibcall) + || (cfun->calls_alloca + && !frame_pointer_needed)); + restore_lr = (info->lr_save_p +- && restoring_GPRs_inline +- && restoring_FPRs_inline); ++ && (restoring_FPRs_inline ++ || (strategy & SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR)) ++ && (restoring_GPRs_inline ++ || info->first_fp_reg_save < 64)); + + if (WORLD_SAVE_P (info)) + { +@@ -17197,7 +17336,7 @@ rs6000_emit_epilogue (int sibcall) + + /* Get the old lr if we saved it. If we are restoring registers + out-of-line, then the out-of-line routines can do this for us. */ +- if (restore_lr) ++ if (restore_lr && restoring_GPRs_inline) + { + rtx mem = gen_frame_mem_offset (Pmode, frame_reg_rtx, + info->lr_save_offset + sp_offset); +@@ -17211,12 +17350,17 @@ rs6000_emit_epilogue (int sibcall) + rtx addr = gen_rtx_PLUS (Pmode, frame_reg_rtx, + GEN_INT (info->cr_save_offset + sp_offset)); + rtx mem = gen_frame_mem (SImode, addr); ++ cr_save_reg = gen_rtx_REG (SImode, ++ DEFAULT_ABI == ABI_AIX ++ && !restoring_GPRs_inline ++ && info->first_fp_reg_save < 64 ++ ? 11 : 12); ++ emit_move_insn (cr_save_reg, mem); + +- emit_move_insn (gen_rtx_REG (SImode, 12), mem); + } + + /* Set LR here to try to overlap restores below. */ +- if (restore_lr) ++ if (restore_lr && restoring_GPRs_inline) + emit_move_insn (gen_rtx_REG (Pmode, LR_REGNO), + gen_rtx_REG (Pmode, 0)); + +@@ -17318,7 +17462,7 @@ rs6000_emit_epilogue (int sibcall) + par = rs6000_make_savres_rtx (info, gen_rtx_REG (Pmode, 11), + 0, reg_mode, + /*savep=*/false, /*gpr=*/true, +- /*exitp=*/true); ++ /*lr=*/true); + emit_jump_insn (par); + + /* We don't want anybody else emitting things after we jumped +@@ -17337,20 +17481,24 @@ rs6000_emit_epilogue (int sibcall) + rs6000_emit_stack_reset (info, sp_reg_rtx, frame_reg_rtx, + sp_offset, can_use_exit); + else +- emit_insn (gen_addsi3 (gen_rtx_REG (Pmode, 11), +- sp_reg_rtx, +- GEN_INT (sp_offset - info->fp_size))); ++ { ++ emit_insn (gen_add3_insn (gen_rtx_REG (Pmode, DEFAULT_ABI == ABI_AIX ++ ? 12 : 11), ++ frame_reg_rtx, ++ GEN_INT (sp_offset - info->fp_size))); ++ if (REGNO (frame_reg_rtx) == 11) ++ sp_offset += info->fp_size; ++ } + + par = rs6000_make_savres_rtx (info, frame_reg_rtx, + info->gp_save_offset, reg_mode, + /*savep=*/false, /*gpr=*/true, +- /*exitp=*/can_use_exit); ++ /*lr=*/can_use_exit); + + if (can_use_exit) + { + if (info->cr_save_p) +- rs6000_restore_saved_cr (gen_rtx_REG (SImode, 12), +- using_mtcr_multiple); ++ rs6000_restore_saved_cr (cr_save_reg, using_mtcr_multiple); + + emit_jump_insn (par); + +@@ -17396,6 +17544,16 @@ rs6000_emit_epilogue (int sibcall) + } + } + ++ if (restore_lr && !restoring_GPRs_inline) ++ { ++ rtx mem = gen_frame_mem_offset (Pmode, frame_reg_rtx, ++ info->lr_save_offset + sp_offset); ++ ++ emit_move_insn (gen_rtx_REG (Pmode, 0), mem); ++ emit_move_insn (gen_rtx_REG (Pmode, LR_REGNO), ++ gen_rtx_REG (Pmode, 0)); ++ } ++ + /* Restore fpr's if we need to do it without calling a function. */ + if (restoring_FPRs_inline) + for (i = 0; i < 64 - info->first_fp_reg_save; i++) +@@ -17419,7 +17577,7 @@ rs6000_emit_epilogue (int sibcall) + + /* If we saved cr, restore it here. Just those that were used. */ + if (info->cr_save_p) +- rs6000_restore_saved_cr (gen_rtx_REG (SImode, 12), using_mtcr_multiple); ++ rs6000_restore_saved_cr (cr_save_reg, using_mtcr_multiple); + + /* If this is V.4, unwind the stack pointer after all of the loads + have been done. */ +@@ -17437,13 +17595,14 @@ rs6000_emit_epilogue (int sibcall) + if (!sibcall) + { + rtvec p; ++ bool lr = (strategy & SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR) == 0; + if (! restoring_FPRs_inline) + p = rtvec_alloc (4 + 64 - info->first_fp_reg_save); + else + p = rtvec_alloc (2); + + RTVEC_ELT (p, 0) = gen_rtx_RETURN (VOIDmode); +- RTVEC_ELT (p, 1) = (restoring_FPRs_inline ++ RTVEC_ELT (p, 1) = ((restoring_FPRs_inline || !lr) + ? gen_rtx_USE (VOIDmode, gen_rtx_REG (Pmode, 65)) + : gen_rtx_CLOBBER (VOIDmode, + gen_rtx_REG (Pmode, 65))); +@@ -17458,10 +17617,12 @@ rs6000_emit_epilogue (int sibcall) + sym = rs6000_savres_routine_sym (info, + /*savep=*/false, + /*gpr=*/false, +- /*exitp=*/true); ++ /*lr=*/lr); + RTVEC_ELT (p, 2) = gen_rtx_USE (VOIDmode, sym); + RTVEC_ELT (p, 3) = gen_rtx_USE (VOIDmode, +- gen_rtx_REG (Pmode, 11)); ++ gen_rtx_REG (Pmode, ++ DEFAULT_ABI == ABI_AIX ++ ? 1 : 11)); + for (i = 0; i < 64 - info->first_fp_reg_save; i++) + { + rtx addr, mem; +Index: gcc-4.4.1/gcc/config/rs6000/rs6000.md +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/rs6000.md 2009-10-06 14:09:12.087313658 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/rs6000.md 2009-10-06 14:09:19.797315286 -0700 +@@ -14868,6 +14868,19 @@ + [(set_attr "type" "branch") + (set_attr "length" "4")]) + ++(define_insn "*return_and_restore_fpregs_aix_" ++ [(match_parallel 0 "any_parallel_operand" ++ [(return) ++ (use (match_operand:P 1 "register_operand" "l")) ++ (use (match_operand:P 2 "symbol_ref_operand" "s")) ++ (use (match_operand:P 3 "gpc_reg_operand" "r")) ++ (set (match_operand:DF 4 "gpc_reg_operand" "=d") ++ (match_operand:DF 5 "memory_operand" "m"))])] ++ "" ++ "b %z2" ++ [(set_attr "type" "branch") ++ (set_attr "length" "4")]) ++ + ; This is used in compiling the unwind routines. + (define_expand "eh_return" + [(use (match_operand 0 "general_operand" ""))] +Index: gcc-4.4.1/gcc/config/rs6000/sysv4.h +=================================================================== +--- gcc-4.4.1.orig/gcc/config/rs6000/sysv4.h 2009-10-06 13:51:50.447316469 -0700 ++++ gcc-4.4.1/gcc/config/rs6000/sysv4.h 2009-10-06 14:09:19.807390239 -0700 +@@ -271,27 +271,25 @@ do { \ + #endif + + /* Define cutoff for using external functions to save floating point. +- Currently on 64-bit V.4, always use inline stores. When optimizing +- for size on 32-bit targets, use external functions when +- profitable. */ +-#define FP_SAVE_INLINE(FIRST_REG) (optimize_size && !TARGET_64BIT \ ++ When optimizing for size, use external functions when profitable. */ ++#define FP_SAVE_INLINE(FIRST_REG) (optimize_size \ + ? ((FIRST_REG) == 62 \ + || (FIRST_REG) == 63) \ + : (FIRST_REG) < 64) + /* And similarly for general purpose registers. */ + #define GP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) < 32 \ +- && (TARGET_64BIT || !optimize_size)) ++ && !optimize_size) + + /* Put jump tables in read-only memory, rather than in .text. */ + #define JUMP_TABLES_IN_TEXT_SECTION 0 + + /* Prefix and suffix to use to saving floating point. */ + #define SAVE_FP_PREFIX "_savefpr_" +-#define SAVE_FP_SUFFIX (TARGET_64BIT ? "_l" : "") ++#define SAVE_FP_SUFFIX "" + + /* Prefix and suffix to use to restoring floating point. */ + #define RESTORE_FP_PREFIX "_restfpr_" +-#define RESTORE_FP_SUFFIX (TARGET_64BIT ? "_l" : "") ++#define RESTORE_FP_SUFFIX "" + + /* Type used for ptrdiff_t, as a string used in a declaration. */ + #define PTRDIFF_TYPE "int" 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..ffb37d2976 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-uclibc-locale-ctype_touplow_t.patch @@ -0,0 +1,52 @@ +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 + #include ++#include ++#include + + #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 ++#include ++ + _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::_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/zecke-no-host-includes.patch b/recipes/gcc/gcc-4.4.4/zecke-no-host-includes.patch new file mode 100644 index 0000000000..abf829c60d --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/zecke-no-host-includes.patch @@ -0,0 +1,31 @@ +Index: gcc-4.4+svnr145550/gcc/incpath.c +=================================================================== +--- gcc-4.4+svnr145550.orig/gcc/incpath.c 2009-04-04 13:48:31.000000000 -0700 ++++ gcc-4.4+svnr145550/gcc/incpath.c 2009-04-04 14:49:29.000000000 -0700 +@@ -417,6 +417,26 @@ + p->construct = 0; + p->user_supplied_p = user_supplied_p; + ++#ifdef CROSS_DIRECTORY_STRUCTURE ++ /* A common error when cross compiling is including ++ host headers. This code below will try to fail fast ++ for cross compiling. Currently we consider /usr/include, ++ /opt/include and /sw/include as harmful. */ ++ { ++ /* printf("Adding Path: %s\n", p->name ); */ ++ if( strstr(p->name, "/usr/include" ) == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } else if( strstr(p->name, "/sw/include") == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } else if( strstr(p->name, "/opt/include") == p->name ) { ++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name); ++ abort(); ++ } ++ } ++#endif ++ + add_cpp_dir_path (p, chain); + } + diff --git a/recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch b/recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch new file mode 100644 index 0000000000..a7722cbfc4 --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/zecke-xgcc-cpp.patch @@ -0,0 +1,28 @@ +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 +=================================================================== +--- 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 @@ + 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; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ +Index: gcc-4.3.1/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 @@ + 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; \ + CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ -- cgit 1.2.3-korg From 5203790c015a01b4ea3a1c0a75726773fb31a639 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 14 May 2010 20:38:40 -0700 Subject: gcc-4.4.4.inc: Fix ppc issues of requiring libgcc at link time when using -Os * This change converts libgcc_s.so to a linker script so when -lgcc_s is used then it actually links to a group of libraries and one of those libraries is libgcc. This fixes the problem of requiring to link with libgcc _always_ on ppc to get the out-of-line epilogue/prologue functions. Signed-off-by: Khem Raj --- recipes/gcc/gcc-4.4.4.inc | 3 +- .../gcc/gcc-4.4.4/gcc-add-t-slibgcc-libgcc.patch | 126 +++++++++++++++++++++ 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 recipes/gcc/gcc-4.4.4/gcc-add-t-slibgcc-libgcc.patch (limited to 'recipes/gcc/gcc-4.4.4') diff --git a/recipes/gcc/gcc-4.4.4.inc b/recipes/gcc/gcc-4.4.4.inc index da8e27e66b..de916112b8 100644 --- a/recipes/gcc/gcc-4.4.4.inc +++ b/recipes/gcc/gcc-4.4.4.inc @@ -8,7 +8,7 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r0" +INC_PR = "r1" FILESPATHPKG .= ":gcc-$PV" @@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=gcc444tarbz2 \ 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-add-t-slibgcc-libgcc.patch;patch=1 \ " SRC_URI[gcc444tarbz2.md5sum] = "7ff5ce9e5f0b088ab48720bbd7203530" SRC_URI[gcc444tarbz2.sha256sum] = "e1c13696b45752ad3f652304fab5120a43a8a5c0f438d3bda78cf16b620c0c58" 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..337bd9250e --- /dev/null +++ b/recipes/gcc/gcc-4.4.4/gcc-add-t-slibgcc-libgcc.patch @@ -0,0 +1,126 @@ +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 +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 + + * 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-02-17 20:24:04.000000000 -0800 ++++ gcc-4.4.4/gcc/config.gcc 2010-05-14 13:57:33.701847829 -0700 +@@ -1745,12 +1745,12 @@ powerpc64-*-linux*) + 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-*-rtems*) + 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 t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} 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 t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} 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 t-slibgcc-libgcc rs6000/t-fprules-softfp soft-fp/t-softfp rs6000/t-ppcos ${tmake_file} 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 @@ powerpc-*-linux*) + 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-*-linux*) + 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' +Index: gcc-4.4.4/gcc/config/t-slibgcc-libgcc +=================================================================== +--- gcc-4.4.4.orig/gcc/config/t-slibgcc-libgcc 2010-01-04 07:13:08.000000000 -0800 ++++ gcc-4.4.4/gcc/config/t-slibgcc-libgcc 2010-05-14 13:44:41.339352736 -0700 +@@ -30,3 +30,35 @@ SHLIB_MAKE_SOLINK = \ + SHLIB_INSTALL_SOLINK = \ + $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SOLINK) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) ++# Copyright (C) 2009 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 3, 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 COPYING3. If not see ++# . ++ ++# Instead of creating $(SHLIB_SOLINK) symlink create a GNU ld ++# linker script which sources in both $(SHLIB_SONAME) and libgcc.a. ++# This is needed on targets where libgcc.a contains routines that aren't in ++# $(SHLIB_SONAME) and are needed for shared libraries. ++ ++SHLIB_MAKE_SOLINK = \ ++ (echo "/* GNU ld script"; \ ++ echo " Use the shared library, but some functions are only in"; \ ++ echo " the static library. */"; \ ++ echo "GROUP ( $(SHLIB_SONAME) libgcc.a )" \ ++ ) > $(SHLIB_DIR)/$(SHLIB_SOLINK) ++SHLIB_INSTALL_SOLINK = \ ++ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SOLINK) \ ++ $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) -- cgit 1.2.3-korg From de76b5319669f50bec6d1a5f2310f360aada1909 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 18 May 2010 12:24:37 -0700 Subject: gcc-4.4.4: Fix build failure on powerpc/uclibc. * For uclibc __to_type is typedef'ed to const __ctype_touplow_t* which is a short int. So the mangled alias breaks because on glibc __to_type is int* and mangled alias is set accordingly Signed-off-by: Khem Raj --- recipes/gcc/gcc-4.4.4.inc | 3 +- .../gcc-uclibc-locale-ctype_touplow_t.patch | 53 ++++++++++++++-------- 2 files changed, 35 insertions(+), 21 deletions(-) (limited to 'recipes/gcc/gcc-4.4.4') diff --git a/recipes/gcc/gcc-4.4.4.inc b/recipes/gcc/gcc-4.4.4.inc index de916112b8..e14f31e79d 100644 --- a/recipes/gcc/gcc-4.4.4.inc +++ b/recipes/gcc/gcc-4.4.4.inc @@ -8,7 +8,7 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r1" +INC_PR = "r2" FILESPATHPKG .= ":gcc-$PV" @@ -44,4 +44,3 @@ EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap --disable-libgomp --disable-li 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.4/gcc-uclibc-locale-ctype_touplow_t.patch b/recipes/gcc/gcc-4.4.4/gcc-uclibc-locale-ctype_touplow_t.patch index ffb37d2976..00121c52e6 100644 --- 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 @@ -1,39 +1,39 @@ -Index: gcc-4.4.1/libstdc++-v3/config/locale/generic/c_locale.h +Index: gcc-4.4.4/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 +--- 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 #include -+#include -+#include ++#include ++#include #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 ++#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 +Index: gcc-4.4.4/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 +--- 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 -+#include ++#include ++#include + _GLIBCXX_BEGIN_NAMESPACE(std) @@ -42,11 +42,26 @@ Index: gcc-4.4.1/libstdc++-v3/config/os/gnu-linux/ctype_base.h { // Non-standard typedefs. - typedef const int* __to_type; -+#ifdef __UCLIBC__ -+ typedef const __ctype_touplow_t* __to_type; -+#else -+ 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::_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 -- cgit 1.2.3-korg