aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg (Zorry) <zorry@gentoo.org>2010-05-26 22:36:56 +0200
committerMagnus Granberg (Zorry) <zorry@gentoo.org>2010-05-26 22:36:56 +0200
commit291d6e5481a9b5fda2885f9864132caa52f11393 (patch)
tree53e7b49b1190918301d28536f8e22112890c5815
parentUpdated the README in warntrampolines (diff)
downloadhardened-gccpatchset-291d6e5481a9b5fda2885f9864132caa52f11393.tar.gz
hardened-gccpatchset-291d6e5481a9b5fda2885f9864132caa52f11393.tar.bz2
hardened-gccpatchset-291d6e5481a9b5fda2885f9864132caa52f11393.zip
Updated all to 0.4.3
-rw-r--r--gcc-4.4.3/piepatch/10_all_gcc44_configure.patch234
-rw-r--r--gcc-4.4.3/piepatch/11_all_gcc44_config.in.patch24
-rw-r--r--gcc-4.4.3/piepatch/12_all_gcc44_Makefile.in.patch13
-rw-r--r--gcc-4.4.3/piepatch/20_all_gcc44_gcc.c.patch13
-rw-r--r--gcc-4.4.3/piepatch/30_all_gcc44_esp.h.patch48
-rw-r--r--gcc-4.4.3/piepatch/README.Changelog20
-rw-r--r--gcc-4.4.3/piepatch/README.history8
-rw-r--r--gcc-4.5.0/piepatch/10_all_gcc45_configure.patch218
-rw-r--r--gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch24
-rw-r--r--gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch9
-rw-r--r--gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch13
-rw-r--r--gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch48
-rw-r--r--gcc-4.5.0/piepatch/README.Changelog20
-rw-r--r--gcc-4.5.0/piepatch/README.history8
-rw-r--r--upstream/warntrampolins/Wtrampolines.patch2
15 files changed, 147 insertions, 555 deletions
diff --git a/gcc-4.4.3/piepatch/10_all_gcc44_configure.patch b/gcc-4.4.3/piepatch/10_all_gcc44_configure.patch
index 056ea0b..fadffe0 100644
--- a/gcc-4.4.3/piepatch/10_all_gcc44_configure.patch
+++ b/gcc-4.4.3/piepatch/10_all_gcc44_configure.patch
@@ -1,10 +1,8 @@
-2010-04-22 Magnus Granberg <zorry@gentoo.org>
+2010-05-25 Magnus Granberg <zorry@gentoo.org>
* configure Add --enable-esp. Add-fno-stack-protector
to stage1_cflags.
* gcc/configure Add --enable-esp. Check -z now and -z relro.
- Check if we support -fstack-protector and define HAVE_GCC_SSP.
- Check if we support -fPIE and -pie and define HAVE_GCC_LD_PIE.
Define ENABLE_ESP.
Check if we support crtbeginTS and define ENABLE_CRTBEGINTS.
* libmudflap/configure Add AC_SUBST enable_esp.
@@ -16,26 +14,23 @@
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 enable_esp_set 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 enable_esp 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_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
ac_pwd=`pwd`
-@@ -934,6 +934,14 @@
+@@ -934,6 +934,11 @@
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-gold use gold instead of ld
--enable-libada build libada directory
-+ --enable-esp[=all]
++ --enable-esp
+ Enable Stack protector, Position independent executable as
+ default if we have suppot for it when compiling
+ and link with -z relro and -z now as default.
-+ --enable-esp=all will enable SSP and PIE
-+ --enable-esp=nossp will disable SSP
-+ --enable-esp=nopie will disable PIE
+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm
--enable-libssp build libssp directory
--disable-ppl-version-check disable check for PPL version
--disable-cloog-version-check disable check for CLooG version
-@@ -2145,6 +2153,30 @@
+@@ -2145,6 +2150,25 @@
noconfigdirs="$noconfigdirs gnattools"
fi
@@ -46,12 +41,7 @@
+
+ case $target in
+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*)
-+ case ,${enable_esp}, in
-+ ,,)
-+ enable_esp_set=no ;;
-+ ,nopie,|,nossp,|,all,)
-+ enable_esp_set=yes ;;
-+ esac
++ enable_esp=yes
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5
@@ -70,7 +60,7 @@
*) stage1_cflags="-g -J" ;;
esac ;;
esac
-+if test x$enable_esp_set = xyes; then
++if test x$enable_esp = xyes; then
+ stage1_cflags="$stage1_cflags -fno-stack-protector"
+fi
@@ -80,7 +70,7 @@
s,@build_subdir@,$build_subdir,;t t
s,@host_subdir@,$host_subdir,;t t
s,@target_subdir@,$target_subdir,;t t
-+s,@enable_esp_set@,$enable_esp_set,;t t
++s,@enable_esp@,$enable_esp,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@@ -91,25 +81,10 @@
#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 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 enable_esp_set enable_crtbeginTS 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 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 enable_esp enable_crtbeginTS 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`
-@@ -1078,6 +1076,14 @@
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
-+ --enable-esp[=all]
-+ Enable Stack protector, Position independent executable as
-+ default if we have suppot for it when compiling
-+ and link with -z relro and -z now as default.
-+ --enable-esp=all will enable SSP and PIE
-+ --enable-esp=nossp will disable SSP
-+ --enable-esp=nopie will disable PIE
-+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm
- --enable-maintainer-mode
- enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
@@ -24177,6 +24182,50 @@
;;
esac
@@ -161,188 +136,11 @@
echo "$as_me:$LINENO: checking linker --sysroot support" >&5
echo $ECHO_N "checking linker --sysroot support... $ECHO_C" >&6
if test "${gcc_cv_ld_sysroot+set}" = set; then
-@@ -24411,6 +23745,253 @@
+@@ -24411,6 +23745,74 @@
fi
-+# Check whether --enable-esp=(no|nopie|nossp|all) was given.
-+# Check whether --enable-esp or --disable-esp was given.
-+if test "${enable_esp+set}" = set; then
-+ enableval="$enable_esp"
-+
-+ case ,${enable_esp}, in
-+ ,no,|,,)
-+ enable_esp_set=no
-+ enable_esp_pie=no
-+ enable_esp_ssp=no
-+ ;;
-+ ,nopie,)
-+ enable_esp_set=yes
-+ enable_esp_pie=no
-+ enable_esp_ssp=yes
-+ ;;
-+ ,nossp,)
-+ enable_esp_set=yes
-+ enable_esp_pie=yes
-+ enable_esp_ssp=no
-+ ;;
-+ ,all,)
-+ enable_esp_set=yes
-+ enable_esp_pie=yes
-+ enable_esp_ssp=yes
-+ ;;
-+ esac
-+
-+fi;
-+
-+
-+if test x$gcc_cv_libc_provides_ssp = xyes; then
-+ echo "$as_me:$LINENO: checking whether $CC support -fstack-protector" >&5
-+echo $ECHO_N "checking whether $CC support -fstack-protector... $ECHO_C" >&6
-+if test "${gcc_cv_cc_stack_protector+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -fstack-protector"
-+ cat >conftest.$ac_ext <<_ACEOF
-+#ifndef __SSP__
-+#error
-+#endif
-+int
-+main() {
-+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
-+
-+ case $target in
-+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux*)
-+ if test x$set_have_as_tls = xyes; then
-+ gcc_cv_cc_stack_protector=yes
-+ else
-+ gcc_cv_cc_stack_protector=no
-+ fi
-+ ;;
-+ *)
-+ cc_cv_cc_stack_protector=yes
-+ ;;
-+ esac
-+
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+gcc_cv_cc_stack_protector=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ CFLAGS="$saved_CFLAGS"
-+
-+fi
-+echo "$as_me:$LINENO: result: $gcc_cv_cc_stack_protector" >&5
-+echo "${ECHO_T}$gcc_cv_cc_stack_protector" >&6
-+fi
-+if test x$gcc_cv_cc_stack_protector = xyes && test x$enable_esp_ssp = xyes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_GCC_SSP 1
-+_ACEOF
-+
-+ enable_esp_default_ssp=yes
-+ echo "$as_me:$LINENO: result: Adding -fstack-protector as default compiler options... $enable_esp_default_ssp" >&5
-+echo "${ECHO_T}Adding -fstack-protector as default compiler options... $enable_esp_default_ssp" >&6
-+fi
-+
-+if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_pic_works = xyes; then
-+ echo "$as_me:$LINENO: checking whether $CC support -fPIE and link with -pie" >&5
-+echo $ECHO_N "checking whether $CC support -fPIE and and link with -pie... $ECHO_C" >&6
-+if test "${gcc_cv_cc_ld_pie+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -fPIE -pie"
-+ cat >conftest.$ac_ext <<_ACEOF
-+#ifndef __PIE__
-+#error
-+#endif
-+int
-+main() {
-+ 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
-+ gcc_cv_cc_ld_pie=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+gcc_cv_cc_ld_pie=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ CFLAGS="$saved_CFLAGS"
-+
-+fi
-+echo "$as_me:$LINENO: result: $gcc_cv_cc_ld_pie" >&5
-+echo "${ECHO_T}$gcc_cv_cc_ld_pie" >&6
-+fi
-+if test x$gcc_cv_cc_ld_pie = xyes && test x$enable_esp_pie = xyes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_GCC_LD_PIE 1
-+_ACEOF
-+
-+ enable_esp_default_pie=yes
-+ echo "$as_me:$LINENO: result: Adding -fPIE as default compiler options and -pie as default linking options... $enable_esp_default_pie" >&5
-+echo "${ECHO_T}Adding -fPIE as default compiler options and -pie as default linking options... $enable_esp_default_pie" >&6
-+fi
-+if test x$enable_esp_set = xyes ; then
++if test x$enable_esp = xyes ; then
+case $target in
+ ia64*-*-linux*)
+ if test x$gcc_cv_ld_now = xyes; then
@@ -371,10 +169,8 @@
+#define ENABLE_ESP 1
+_ACEOF
+
-+ enable_esp_default_nowrelro=yes
-+ echo "$as_me:$LINENO: result: Adding -z now and -z relro as default linking options... $enable_esp_default_nowrelro" >&5
-+echo "${ECHO_T}Adding -z now and -z relro as default linking options... $enable_esp_default_nowrelro" >&6
+fi
++
+if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then
+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5
+echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;}
@@ -387,12 +183,12 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
-+if test x$enable_esp_set = xyes ; then
++if test x$enable_esp = xyes ; then
+ case "$target" in
+ ia64*-*-linux*)
+ enable_crtbeginTS=no ;;
+ *-*-linux*)
-+ if test x$enable_esp_default_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
+ enable_crtbeginTS=yes
+ fi
+ ;;
@@ -419,7 +215,7 @@
s,@gcc_cv_objdump@,$gcc_cv_objdump,;t t
s,@gcc_cv_readelf@,$gcc_cv_readelf,;t t
s,@libgcc_visibility@,$libgcc_visibility,;t t
-+s,@enable_esp_set@,$enable_esp_set,;t t
++s,@enable_esp@,$enable_esp,;t t
+s,@enable_crtbeginTS@,$enable_crtbeginTS,;t t
s,@GGC@,$GGC,;t t
s,@zlibdir@,$zlibdir,;t t
diff --git a/gcc-4.4.3/piepatch/11_all_gcc44_config.in.patch b/gcc-4.4.3/piepatch/11_all_gcc44_config.in.patch
index efab612..3e49f03 100644
--- a/gcc-4.4.3/piepatch/11_all_gcc44_config.in.patch
+++ b/gcc-4.4.3/piepatch/11_all_gcc44_config.in.patch
@@ -1,7 +1,6 @@
-2010-04-22 Magnus Granberg <zorry@gentoo.org>
+2010-05-24 Magnus Granberg <zorry@gentoo.org>
- * gcc/config.in Add ENABLE_CRTBEGINTS ENABLE_ESP and
- HAVE_GCC_SSP HAVE_GCC_LD_PIE
+ * gcc/config.in Add ENABLE_CRTBEGINTS and ENABLE_ESP
--- gcc/config.in 2009-04-21 11:08:08.000000000 +0200
+++ gcc/config.in 2009-05-12 00:10:08.000000000 +0200
@@ -31,22 +30,3 @@
/* Define to 1 to enable fixed-point arithmetic extension to C. */
#ifndef USED_FOR_TARGET
#undef ENABLE_FIXED_POINT
-@@ -912,6 +924,18 @@
- #endif
-
-
-+/* Define if your compiler supports SSP */
-+#ifndef USED_FOR_TARGET
-+#undef HAVE_GCC_SSP
-+#endif
-+
-+
-+/* Define if your compiler and linker supports PIE */
-+#ifndef USED_FOR_TARGET
-+#undef HAVE_GCC_LD_PIE
-+#endif
-+
-+
- /* Define to 1 if you have the `getchar_unlocked' function. */
- #ifndef USED_FOR_TARGET
- #undef HAVE_GETCHAR_UNLOCKED
diff --git a/gcc-4.4.3/piepatch/12_all_gcc44_Makefile.in.patch b/gcc-4.4.3/piepatch/12_all_gcc44_Makefile.in.patch
index e1f9dbf..900c10c 100644
--- a/gcc-4.4.3/piepatch/12_all_gcc44_Makefile.in.patch
+++ b/gcc-4.4.3/piepatch/12_all_gcc44_Makefile.in.patch
@@ -1,7 +1,6 @@
-2010-04-22 Magnus Granberg <zorry@gentoo.org>
+2010-05-24 Magnus Granberg <zorry@gentoo.org>
- * Makefile.in We add -fno-stack-protector to
- BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
+ * Makefile.in We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
* gcc/Makefile.in Add -fno-PIE and -fno-stack-protector.
Libgcc2 doesn't compile with -fstack-protector.
Crtstuff doesn't compile with -fPIE and -fstack-protector.
@@ -15,7 +14,7 @@
LP #344502
* libmudflap/Makefiles.in Add -fno-stack-protector -U_FORTIFY_SOURCE
- to AM_CFLAGS ifdef enable_esp.
+ to AM_CFLAGS if enable_esp yes.
--- Makefile.in 2009-04-14 10:57:33.000000000 +0200
+++ Makefile.in 2009-07-21 05:29:54.000000000 +0200
@@ -24,7 +23,7 @@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
+# Some stuff don't compile with SSP
-+enable_esp = @enable_esp_set@
++enable_esp = @enable_esp@
+ifeq ($(enable_esp),yes)
+ESP_NOSSP_CFLAGS = -fno-stack-protector
+else
@@ -58,7 +57,7 @@
+# We don't want __stack_chk_fail in crt* and libgcc2.a.
+# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE.
-+enable_esp = @enable_esp_set@
++enable_esp = @enable_esp@
+ifeq ($(enable_esp),yes)
+ESP_NOPIE_CFLAGS = -fno-PIE
+ESP_NOSSP_CFLAGS = -fno-stack-protector
@@ -192,7 +191,7 @@
+# Some stuff don't compile with SSP and FORTIFY_SOURCE
+enable_esp = @enable_esp@
-+ifdef enable_esp
++ifeq ($(enable_esp),yes)
+ NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE
+else
+ NO_ESP_CFLAGS =
diff --git a/gcc-4.4.3/piepatch/20_all_gcc44_gcc.c.patch b/gcc-4.4.3/piepatch/20_all_gcc44_gcc.c.patch
index 69709bf..c5e0645 100644
--- a/gcc-4.4.3/piepatch/20_all_gcc44_gcc.c.patch
+++ b/gcc-4.4.3/piepatch/20_all_gcc44_gcc.c.patch
@@ -1,8 +1,7 @@
-2010-04-19 Magnus Granberg <zorry@gentoo.org>
+2010-05-26 Magnus Granberg <zorry@gentoo.org>
* gcc/gcc.c include esp.h
static const char *cc1_spec We set that in esp.h if ENABLE_ESP.
- *cc1_options Add espf_options_pie_check if ENABLE_ESP.
#ifdef EXTRA_SPECS: Add ESP_EXTRA_SPECS
main(): Add do_self_spec esp_command_options_spec()
@@ -43,16 +42,6 @@
/* This contains cpp options which are not passed when the preprocessor
output will be used by another program. */
-@@ -825,6 +826,9 @@
-
- /* NB: This is shared amongst all front-ends, except for Ada. */
- static const char *cc1_options =
-+#ifdef ENABLE_ESP
-+"%(esp_options_pie_check)"
-+#endif
- "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
- %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\
@@ -999,15 +1000,15 @@
%{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
%(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
diff --git a/gcc-4.4.3/piepatch/30_all_gcc44_esp.h.patch b/gcc-4.4.3/piepatch/30_all_gcc44_esp.h.patch
index 1abec0b..e5e9700 100644
--- a/gcc-4.4.3/piepatch/30_all_gcc44_esp.h.patch
+++ b/gcc-4.4.3/piepatch/30_all_gcc44_esp.h.patch
@@ -1,13 +1,13 @@
-2010-04-29 Magnus Granberg <zorry@gentoo.org>
+2010-05-26 Magnus Granberg <zorry@gentoo.org>
* gcc/esp.h New file to support --enable-esp
- Version 20100429.1
+ Version 20100526.1
--- gcc/esp.h 2010-04-09 16:14:00.000000000 +0200
+++ gcc/esp.h 2010-04-29 21:30:47.000000000 +0200
-@@ -0,0 +1,147 @@
+@@ -0,0 +1,145 @@
+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
-+ * Version 20100429.1
++ * Version 20100526.1
+ * Magnus Granberg (Zorry) <zorry@gentoo.org> */
+#ifndef GCC_ESP_H
+#define GCC_ESP_H
@@ -20,19 +20,19 @@
+ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all when building kernels.
+ ESP_CC1_SPEC is added to CC1_SPEC.
+ ESP_CC1_STRICT_SPEC is added so we don't disable the strict-overflow check.
-+ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile, -static and -shared.
++ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static.
+ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie.
+*/
+#ifdef ENABLE_ESP
+
+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */
+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict)"
-+ #ifdef HAVE_GCC_SSP
++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}"
+ #else
+ #define ESP_CC1_SSP_SPEC ""
+ #endif
-+ #ifdef HAVE_GCC_LD_PIE
++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
+ #define ESP_CC1_PIE_SPEC "%{!nopie: }"
+ #else
+ #define ESP_CC1_PIE_SPEC ""
@@ -40,9 +40,10 @@
+ #define ESP_CC1_STRICT_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}"
+
+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable
-+ -z now will be added if we don't have -vanilla spec */
-+ #define ESP_LINK_SPEC "%(esp_link_now)"
-+ #define ESP_LINK_NOW_SPEC "%{!now:-z now}"
++ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check
++ Don't remove the specs in the end */
++ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_options_pie_check) "
++ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}"
+
+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */
+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}"
@@ -55,8 +56,8 @@
+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)"
+
+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector
-+ -fstack-protector-all and we have HAVE_GCC_SSP defined. */
-+ #ifdef HAVE_GCC_SSP
++ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */
++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
+ #define ESP_OPTIONS_SSP_SPEC \
+ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \
+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}"
@@ -64,8 +65,8 @@
+ #define ESP_OPTIONS_SSP_SPEC ""
+ #endif
+
-+ /* If HAVE_GCC_LD_PIE not defined we will not add any -fPIE -pie */
-+ #ifdef HAVE_GCC_LD_PIE
++ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */
++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
+
+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static
+ -nostdlib -nostartfiles. */
@@ -94,32 +95,29 @@
+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}"
+ #endif
+
-+ /* This will check if shared is set when -static -pie -fPIE -fpie -fno-PIC -fno-pic, -pie is set when -static -pg -p -profile.
-+ If set it will make gcc print out "-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible" or
-+ "-pie and pg|p|profile are incompatible" */
++ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out
++ "-pie and (static)|pg|p|profile are incompatible when linking" */
+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */
+ #ifdef ENABLE_CRTBEGINTS
+ #define ESP_OPTIONS_PIE_CHECK_SPEC \
-+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \
-+ %{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible}}"
++ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}"
+ #else
+ #define ESP_OPTIONS_PIE_CHECK_SPEC \
-+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \
-+ %{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible}}"
++ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}"
+ #endif
+
-+ /* We don't pass -pie to the linker when -static */
++ /* We don't pass -pie to the linker when -static. */
+ #ifdef ENABLE_CRTBEGINTS
-+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link) "
++ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)"
+ #else
-+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) "
++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
+ #endif
+
+ #else
+ #define ESP_OPTIONS_PIE_SPEC ""
+ #define ESP_OPTIONS_PIE_CHECK_SPEC ""
+ #define ESP_LINK_PIE_SPEC ""
-+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) "
++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
+ #endif
+
+ /* We add extra spec name's to the EXTRA_SPECS list */
diff --git a/gcc-4.4.3/piepatch/README.Changelog b/gcc-4.4.3/piepatch/README.Changelog
index e96e077..5554c8f 100644
--- a/gcc-4.4.3/piepatch/README.Changelog
+++ b/gcc-4.4.3/piepatch/README.Changelog
@@ -1,3 +1,21 @@
+0.4.3 Magnus Granberg <zorry@gentoo.org>
+
+ #299061 b.g.o
+ * gcc/gcc.c removed the pie incompatible specs rule call
+ * gcc/esp.h Move the -pie incompatible check to esp_link
+ remove the -shared incompatible check
+
+0.4.2 Magnus Granberg <zorry@gentoo.org>
+
+ * configure remove the changes from 0.4.1
+ * Makefile.in remove the changes from 0.4.1 remove -fstack-protector check.
+ * gcc/configure remove the changes from 0.4.1
+ * gcc/config.in remove the changes from 0.4.1 remove HAVE_GCC_SSP
+ * gcc/Makefile remove the changes from 0.4.1
+ * gcc/esp.h change HAVE_GCC_LD_PIE to (EFAULT_PIE || EFAULT_PIE_SSP)
+ change HAVE_GCC_SSP to (EFAULT_SSP || EFAULT_PIE_SSP)
+ * libmudflap/Makefiles.in remove the changes from 0.4.1
+
0.4.1 Magnus Granberg <zorry@gentoo.org>
*configure removed check for --enable-esp removed enable_esp
@@ -9,7 +27,7 @@
-fstack-protector check.
* gcc/config.in Added HAVE_GCC_LD_PIE
*gcc/Makefile.in renamed enable_esp to enable_esp_set
- *gcc/esp Renamed HAVE_LD_PIE to HAVE_GCC_LD_PIE
+ *gcc/esp.h Renamed HAVE_LD_PIE to HAVE_GCC_LD_PIE
Added HAVE_GCC_LD_PIE to #define ESP_CC1_PIE_SPEC. Move ESP_COMMAND_OPTIONS_SPEC
* libmudflap/Makefiles.in In enable_esp change ifeq to ifdef.
diff --git a/gcc-4.4.3/piepatch/README.history b/gcc-4.4.3/piepatch/README.history
index f9d9f95..f41b241 100644
--- a/gcc-4.4.3/piepatch/README.history
+++ b/gcc-4.4.3/piepatch/README.history
@@ -1,3 +1,11 @@
+0.4.3 26-05-2010
+ U 20_all_gcc44_gcc.c.patch
+ U 30_all_gcc44_esp.h.patch
+0.4.2 24-05-2010
+ U 10_all_gcc44_configure.patch
+ U 12_all_gcc44_Makefile.in.patch
+ U 11_all_gcc44_config.in.patch
+ U 30_all_gcc44_esp.h.patch
0.4.1 29-04-2010
U 10_all_gcc44_configure.patch
U 12_all_gcc44_Makefile.in.patch
diff --git a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
index a6ffbb4..39893f3 100644
--- a/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
+++ b/gcc-4.5.0/piepatch/10_all_gcc45_configure.patch
@@ -1,40 +1,36 @@
-2010-04-25 Magnus Granberg <zorry@gentoo.org>, Anthony G. Basile <basile@opensource.dyc.edu>
+2010-05-25 Magnus Granberg <zorry@gentoo.org>, Anthony G. Basile <basile@opensource.dyc.edu>
* configure Add --enable-esp. Add-fno-stack-protector
to stage1_cflags.
* gcc/configure Add --enable-esp. Check -z now and -z relro.
- Check if we support -fstack-protector and define HAVE_GCC_SSP.
- Check if we support -fPIE and -pie and define HAVE_GCC_LD_PIE.
Define ENABLE_ESP.
Check if we support crtbeginTS and define ENABLE_CRTBEGINTS.
* libmudflap/configure Add AC_SUBST enable_esp.
+
--- configure 2010-01-31 13:12:21.000000000 -0500
+++ configure 2010-02-07 14:29:51.000000000 -0500
@@ -707,6 +707,7 @@
CFLAGS
CC
target_subdir
-+enable_esp_set
++enable_esp
host_subdir
build_subdir
build_libsubdir
-@@ -934,6 +934,14 @@
+@@ -934,6 +934,11 @@
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-gold use gold instead of ld
--enable-libada build libada directory
-+ --enable-esp[=all]
++ --enable-esp
+ Enable Stack protector, Position independent executable as
+ default if we have suppot for it when compiling
+ and link with -z relro and -z now as default.
-+ --enable-esp=all will enable SSP and PIE
-+ --enable-esp=nossp will disable SSP
-+ --enable-esp=nopie will disable PIE
+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm
--enable-libssp build libssp directory
--disable-ppl-version-check disable check for PPL version
--disable-cloog-version-check disable check for CLooG version
-@@ -2145,6 +2153,30 @@
+@@ -2145,6 +2150,25 @@
noconfigdirs="$noconfigdirs gnattools"
fi
@@ -44,13 +40,8 @@
+ enableval="$enable_esp"
+
+ case $target in
-+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux* | mips*-*-linux*)
-+ case ,${enable_esp}, in
-+ ,,)
-+ enable_esp_set=no ;;
-+ ,nopie,|,nossp,|,all,)
-+ enable_esp_set=yes ;;
-+ esac
++ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*)
++ enable_esp=yes
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5
@@ -69,7 +60,7 @@
*) stage1_cflags="-g -J" ;;
esac ;;
esac
-+if test x$enable_esp_set = xyes; then
++if test x$enable_esp = xyes; then
+ stage1_cflags="$stage1_cflags -fno-stack-protector"
+fi
@@ -81,7 +72,7 @@
HOST_LIBS
GGC
libgcc_visibility
-+enable_esp_set
++enable_esp
+enable_crtbeginTS
gcc_cv_readelf
gcc_cv_objdump
@@ -137,188 +128,11 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5
$as_echo_n "checking linker --build-id support... " >&6; }
if test "${gcc_cv_ld_buildid+set}" = set; then :
-@@ -24411,6 +23745,253 @@
+@@ -24411,6 +23745,74 @@
fi
-+# Check whether --enable-esp=(no|nopie|nossp|all) was given.
-+# Check whether --enable-esp or --disable-esp was given.
-+if test "${enable_esp+set}" = set; then
-+ enableval="$enable_esp"
-+
-+ case ,${enable_esp}, in
-+ ,no,|,,)
-+ enable_esp_set=no
-+ enable_esp_pie=no
-+ enable_esp_ssp=no
-+ ;;
-+ ,nopie,)
-+ enable_esp_set=yes
-+ enable_esp_pie=no
-+ enable_esp_ssp=yes
-+ ;;
-+ ,nossp,)
-+ enable_esp_set=yes
-+ enable_esp_pie=yes
-+ enable_esp_ssp=no
-+ ;;
-+ ,all,)
-+ enable_esp_set=yes
-+ enable_esp_pie=yes
-+ enable_esp_ssp=yes
-+ ;;
-+ esac
-+
-+fi;
-+
-+
-+if test x$gcc_cv_libc_provides_ssp = xyes; then
-+ echo "$as_me:$LINENO: checking whether $CC support -fstack-protector" >&5
-+echo $ECHO_N "checking whether $CC support -fstack-protector... $ECHO_C" >&6
-+if test "${gcc_cv_cc_stack_protector+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -fstack-protector"
-+ cat >conftest.$ac_ext <<_ACEOF
-+#ifndef __SSP__
-+#error
-+#endif
-+int
-+main() {
-+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
-+
-+ case $target in
-+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux*)
-+ if test x$set_have_as_tls = xyes; then
-+ gcc_cv_cc_stack_protector=yes
-+ else
-+ gcc_cv_cc_stack_protector=no
-+ fi
-+ ;;
-+ *)
-+ cc_cv_cc_stack_protector=yes
-+ ;;
-+ esac
-+
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+gcc_cv_cc_stack_protector=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ CFLAGS="$saved_CFLAGS"
-+
-+fi
-+echo "$as_me:$LINENO: result: $gcc_cv_cc_stack_protector" >&5
-+echo "${ECHO_T}$gcc_cv_cc_stack_protector" >&6
-+fi
-+if test x$gcc_cv_cc_stack_protector = xyes && test x$enable_esp_ssp = xyes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_GCC_SSP 1
-+_ACEOF
-+
-+ enable_esp_default_ssp=yes
-+ echo "$as_me:$LINENO: result: Adding -fstack-protector as default compiler options... $enable_esp_default_ssp" >&5
-+echo "${ECHO_T}Adding -fstack-protector as default compiler options... $enable_esp_default_ssp" >&6
-+fi
-+
-+if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_pic_works = xyes; then
-+ echo "$as_me:$LINENO: checking whether $CC support -fPIE and link with -pie" >&5
-+echo $ECHO_N "checking whether $CC support -fPIE and and link with -pie... $ECHO_C" >&6
-+if test "${gcc_cv_cc_ld_pie+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+
-+ saved_CFLAGS="$CFLAGS"
-+ CFLAGS="$CFLAGS -fPIE -pie"
-+ cat >conftest.$ac_ext <<_ACEOF
-+#ifndef __PIE__
-+#error
-+#endif
-+int
-+main() {
-+ 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
-+ gcc_cv_cc_ld_pie=yes
-+else
-+ echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+gcc_cv_cc_ld_pie=no
-+fi
-+rm -f conftest.err conftest.$ac_objext \
-+ conftest$ac_exeext conftest.$ac_ext
-+ CFLAGS="$saved_CFLAGS"
-+
-+fi
-+echo "$as_me:$LINENO: result: $gcc_cv_cc_ld_pie" >&5
-+echo "${ECHO_T}$gcc_cv_cc_ld_pie" >&6
-+fi
-+if test x$gcc_cv_cc_ld_pie = xyes && test x$enable_esp_pie = xyes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_GCC_LD_PIE 1
-+_ACEOF
-+
-+ enable_esp_default_pie=yes
-+ echo "$as_me:$LINENO: result: Adding -fPIE as default compiler options and -pie as default linking options... $enable_esp_default_pie" >&5
-+echo "${ECHO_T}Adding -fPIE as default compiler options and -pie as default linking options... $enable_esp_default_pie" >&6
-+fi
-+if test x$enable_esp_set = xyes ; then
++if test x$enable_esp = xyes ; then
+case $target in
+ ia64*-*-linux*)
+ if test x$gcc_cv_ld_now = xyes; then
@@ -347,10 +161,8 @@
+#define ENABLE_ESP 1
+_ACEOF
+
-+ enable_esp_default_nowrelro=yes
-+ echo "$as_me:$LINENO: result: Adding -z now and -z relro as default linking options... $enable_esp_default_nowrelro" >&5
-+echo "${ECHO_T}Adding -z now and -z relro as default linking options... $enable_esp_default_nowrelro" >&6
+fi
++
+if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then
+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5
+echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;}
@@ -363,12 +175,12 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
-+if test x$enable_esp_set = xyes ; then
++if test x$enable_esp = xyes ; then
+ case "$target" in
+ ia64*-*-linux*)
+ enable_crtbeginTS=no ;;
+ *-*-linux*)
-+ if test x$enable_esp_default_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then
+ enable_crtbeginTS=yes
+ fi
+ ;;
diff --git a/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch b/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
index efab612..3e49f03 100644
--- a/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
+++ b/gcc-4.5.0/piepatch/11_all_gcc44_config.in.patch
@@ -1,7 +1,6 @@
-2010-04-22 Magnus Granberg <zorry@gentoo.org>
+2010-05-24 Magnus Granberg <zorry@gentoo.org>
- * gcc/config.in Add ENABLE_CRTBEGINTS ENABLE_ESP and
- HAVE_GCC_SSP HAVE_GCC_LD_PIE
+ * gcc/config.in Add ENABLE_CRTBEGINTS and ENABLE_ESP
--- gcc/config.in 2009-04-21 11:08:08.000000000 +0200
+++ gcc/config.in 2009-05-12 00:10:08.000000000 +0200
@@ -31,22 +30,3 @@
/* Define to 1 to enable fixed-point arithmetic extension to C. */
#ifndef USED_FOR_TARGET
#undef ENABLE_FIXED_POINT
-@@ -912,6 +924,18 @@
- #endif
-
-
-+/* Define if your compiler supports SSP */
-+#ifndef USED_FOR_TARGET
-+#undef HAVE_GCC_SSP
-+#endif
-+
-+
-+/* Define if your compiler and linker supports PIE */
-+#ifndef USED_FOR_TARGET
-+#undef HAVE_GCC_LD_PIE
-+#endif
-+
-+
- /* Define to 1 if you have the `getchar_unlocked' function. */
- #ifndef USED_FOR_TARGET
- #undef HAVE_GETCHAR_UNLOCKED
diff --git a/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch b/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch
index 418a267..6700f50 100644
--- a/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch
+++ b/gcc-4.5.0/piepatch/12_all_gcc45_Makefile.in.patch
@@ -1,7 +1,6 @@
2010-04-25 Magnus Granberg <zorry@gentoo.org> Anthony G. Basile <basile@opensource.dyc.edu>
- * Makefile.in We add -fno-stack-protector to
- BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
+ * Makefile.in We add -fno-stack-protector to BOOT_CFLAGS, LIBCFLAGS and LIBCXXFLAGS if enable_esp yes.
* gcc/Makefile.in Add -fno-PIE and -fno-stack-protector.
Libgcc2 doesn't compile with -fstack-protector.
Crtstuff doesn't compile with -fPIE and -fstack-protector.
@@ -24,7 +23,7 @@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
+# Some stuff don't compile with SSP
-+enable_esp = @enable_esp_set@
++enable_esp = @enable_esp@
+ifeq ($(enable_esp),yes)
+ESP_NOSSP_CFLAGS = -fno-stack-protector
+else
@@ -58,7 +57,7 @@
+# We don't want __stack_chk_fail in crt* and libgcc2.a.
+# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE.
-+enable_esp = @enable_esp_set@
++enable_esp = @enable_esp@
+ifeq ($(enable_esp),yes)
+ESP_NOPIE_CFLAGS = -fno-PIE
+ESP_NOSSP_CFLAGS = -fno-stack-protector
@@ -184,7 +183,7 @@
+# Some stuff don't compile with SSP and FORTIFY_SOURCE
+enable_esp = @enable_esp@
-+ifdef enable_esp
++ifeq ($(enable_esp),yes)
+ NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE
+else
+ NO_ESP_CFLAGS =
diff --git a/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch b/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch
index 1783de5..714f3d4 100644
--- a/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch
+++ b/gcc-4.5.0/piepatch/20_all_gcc45_gcc.c.patch
@@ -1,8 +1,7 @@
-2010-04-19 Magnus Granberg <zorry@gentoo.org>, Anthony G. Basile <basile@opensource.dyc.edu>
+2010-05-26 Magnus Granberg <zorry@gentoo.org>, Anthony G. Basile <basile@opensource.dyc.edu>
* gcc/gcc.c include esp.h
static const char *cc1_spec We set that in esp.h if ENABLE_ESP.
- *cc1_options Add espf_options_pie_check if ENABLE_ESP.
#ifdef EXTRA_SPECS: Add ESP_EXTRA_SPECS
main(): Add do_self_spec esp_command_options_spec()
@@ -44,16 +43,6 @@
/* This contains cpp options which are not passed when the preprocessor
output will be used by another program. */
-@@ -893,6 +896,9 @@
-
- /* NB: This is shared amongst all front-ends, except for Ada. */
- static const char *cc1_options =
-+#ifdef ENABLE_ESP
-+"%(esp_options_pie_check)"
-+#endif
- "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*}\
- %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \
@@ -1075,15 +1081,15 @@
%{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
diff --git a/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch b/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
index 1abec0b..e5e9700 100644
--- a/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
+++ b/gcc-4.5.0/piepatch/30_all_gcc44_esp.h.patch
@@ -1,13 +1,13 @@
-2010-04-29 Magnus Granberg <zorry@gentoo.org>
+2010-05-26 Magnus Granberg <zorry@gentoo.org>
* gcc/esp.h New file to support --enable-esp
- Version 20100429.1
+ Version 20100526.1
--- gcc/esp.h 2010-04-09 16:14:00.000000000 +0200
+++ gcc/esp.h 2010-04-29 21:30:47.000000000 +0200
-@@ -0,0 +1,147 @@
+@@ -0,0 +1,145 @@
+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3.
-+ * Version 20100429.1
++ * Version 20100526.1
+ * Magnus Granberg (Zorry) <zorry@gentoo.org> */
+#ifndef GCC_ESP_H
+#define GCC_ESP_H
@@ -20,19 +20,19 @@
+ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all when building kernels.
+ ESP_CC1_SPEC is added to CC1_SPEC.
+ ESP_CC1_STRICT_SPEC is added so we don't disable the strict-overflow check.
-+ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile, -static and -shared.
++ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static.
+ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie.
+*/
+#ifdef ENABLE_ESP
+
+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */
+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict)"
-+ #ifdef HAVE_GCC_SSP
++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}"
+ #else
+ #define ESP_CC1_SSP_SPEC ""
+ #endif
-+ #ifdef HAVE_GCC_LD_PIE
++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
+ #define ESP_CC1_PIE_SPEC "%{!nopie: }"
+ #else
+ #define ESP_CC1_PIE_SPEC ""
@@ -40,9 +40,10 @@
+ #define ESP_CC1_STRICT_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}"
+
+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable
-+ -z now will be added if we don't have -vanilla spec */
-+ #define ESP_LINK_SPEC "%(esp_link_now)"
-+ #define ESP_LINK_NOW_SPEC "%{!now:-z now}"
++ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check
++ Don't remove the specs in the end */
++ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_options_pie_check) "
++ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}"
+
+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */
+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}"
@@ -55,8 +56,8 @@
+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)"
+
+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector
-+ -fstack-protector-all and we have HAVE_GCC_SSP defined. */
-+ #ifdef HAVE_GCC_SSP
++ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */
++ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP )
+ #define ESP_OPTIONS_SSP_SPEC \
+ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \
+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}"
@@ -64,8 +65,8 @@
+ #define ESP_OPTIONS_SSP_SPEC ""
+ #endif
+
-+ /* If HAVE_GCC_LD_PIE not defined we will not add any -fPIE -pie */
-+ #ifdef HAVE_GCC_LD_PIE
++ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */
++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP )
+
+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static
+ -nostdlib -nostartfiles. */
@@ -94,32 +95,29 @@
+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}"
+ #endif
+
-+ /* This will check if shared is set when -static -pie -fPIE -fpie -fno-PIC -fno-pic, -pie is set when -static -pg -p -profile.
-+ If set it will make gcc print out "-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible" or
-+ "-pie and pg|p|profile are incompatible" */
++ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out
++ "-pie and (static)|pg|p|profile are incompatible when linking" */
+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */
+ #ifdef ENABLE_CRTBEGINTS
+ #define ESP_OPTIONS_PIE_CHECK_SPEC \
-+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \
-+ %{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible}}"
++ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}"
+ #else
+ #define ESP_OPTIONS_PIE_CHECK_SPEC \
-+ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \
-+ %{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible}}"
++ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}"
+ #endif
+
-+ /* We don't pass -pie to the linker when -static */
++ /* We don't pass -pie to the linker when -static. */
+ #ifdef ENABLE_CRTBEGINTS
-+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link) "
++ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)"
+ #else
-+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) "
++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
+ #endif
+
+ #else
+ #define ESP_OPTIONS_PIE_SPEC ""
+ #define ESP_OPTIONS_PIE_CHECK_SPEC ""
+ #define ESP_LINK_PIE_SPEC ""
-+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) "
++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)"
+ #endif
+
+ /* We add extra spec name's to the EXTRA_SPECS list */
diff --git a/gcc-4.5.0/piepatch/README.Changelog b/gcc-4.5.0/piepatch/README.Changelog
index 37fbc3f..302ed6b 100644
--- a/gcc-4.5.0/piepatch/README.Changelog
+++ b/gcc-4.5.0/piepatch/README.Changelog
@@ -1,3 +1,21 @@
+0.4.3 Magnus Granberg <zorry@gentoo.org>
+
+ #299061 b.g.o
+ * gcc/gcc.c removed the pie incompatible specs rule call
+ * gcc/esp.h Move the -pie incompatible check to esp_link
+ remove the -shared incompatible check
+
+0.4.2 Magnus granberg <zorry@gentoo.org>
+
+ * configure remove the changes from 0.4.1
+ * Makefile.in remove the changes from 0.4.1 remove -fstack-protector check.
+ * gcc/configure remove the changes from 0.4.1
+ * gcc/config.in remove the changes from 0.4.1 remove HAVE_GCC_SSP
+ * gcc/Makefile remove the changes from 0.4.1
+ * gcc/esp.h change HAVE_GCC_LD_PIE to (EFAULT_PIE || EFAULT_PIE_SSP)
+ change HAVE_GCC_SSP to (EFAULT_SSP || EFAULT_PIE_SSP)
+ * libmudflap/Makefiles.in remove the changes from 0.4.1
+
0.4.1 Magnus Granberg <zorry@gentoo.org>
*configure removed check for --enable-esp removed enable_esp
@@ -9,7 +27,7 @@
-fstack-protector check.
* gcc/config.in Added HAVE_GCC_LD_PIE
*gcc/Makefile.in renamed enable_esp to enable_esp_set
- *gcc/esp Renamed HAVE_LD_PIE to HAVE_GCC_LD_PIE
+ *gcc/esp.h Renamed HAVE_LD_PIE to HAVE_GCC_LD_PIE
Added HAVE_GCC_LD_PIE to #define ESP_CC1_PIE_SPEC. Move ESP_COMMAND_OPTIONS_SPEC
* libmudflap/Makefiles.in In enable_esp change ifeq to ifdef.
diff --git a/gcc-4.5.0/piepatch/README.history b/gcc-4.5.0/piepatch/README.history
index 8ed2d71..319245b 100644
--- a/gcc-4.5.0/piepatch/README.history
+++ b/gcc-4.5.0/piepatch/README.history
@@ -1,3 +1,11 @@
+0.4.3 26-05-2010
+ U 20_all_gcc44_gcc.c.patch
+ U 30_all_gcc44_esp.h.patch
+0.4.2 24-05-2010
+ U 10_all_gcc44_configure.patch
+ U 12_all_gcc44_Makefile.in.patch
+ U 11_all_gcc44_config.in.patch
+ U 30_all_gcc44_esp.h.patch
0.4.1 29-04-2010
U 10_all_gcc45_configure.patch
U 12_all_gcc45_Makefile.in.patch
diff --git a/upstream/warntrampolins/Wtrampolines.patch b/upstream/warntrampolins/Wtrampolines.patch
index d1d311a..c52f0f9 100644
--- a/upstream/warntrampolins/Wtrampolines.patch
+++ b/upstream/warntrampolins/Wtrampolines.patch
@@ -102,7 +102,7 @@ gcc/testsuite/
+
+ typedef double pfun(void);
+
-+ double a (int k, pfun x1, pfun x2, pfun x3, pfun x4, pfun x5) /* { dg-warning "requires executable stack" } */
++ double a (int k, pfun x1, pfun x2, pfun x3, pfun x4, pfun x5) /* { dg-warning "generating trampoline" } */
+ {
+ double b (void)
+ {