This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 360584c3be07814d44c80ada548620dc13730576 (commit) via 8a6455271d3f0c1a9092c505854632720f9dfc83 (commit) via 051ef3b79ca1b06e30719124a24f2c39075a17a1 (commit) via 07d3ccd7aa4b4b3045f062e9430962cb4157f0ff (commit) via 4aea08722b7b33fb4fd4513874bded8d327873f6 (commit) via 9c2ea1479d55f6c3e60f5e90f82da46fee459ad8 (commit) via 0a409d3966073ed74a980185a0f9405d37e53942 (commit) via 8e3b0c7278bdf48f2bcda79a3d627f6c073d7359 (commit) via bc803683c28418b0bc43609a76856b7da94362d9 (commit) via 45993d51c1170d8a52ec6aa471287e54411c84d8 (commit) via 99a954bb8f395237d5d21e2e5166b80e5a48ea56 (commit) via ec32c152c08dd478a48a2fb902e20b66593181b2 (commit) via 238c2cb8aa9cef912fd8b3a2717dac07b4b1df2d (commit) via ea9f253863e8ad285ddc3b43b4572d780ba8fff4 (commit) via 4286b9f6dc0ffdc229ecd40ba0436b95cb948210 (commit) via 59c988f928b54a49324d3223b37c6562739a0743 (commit) via 84c0f915f706689998dfe11733c8bef658bbc3ec (commit) via 1d4e1316eca289cab86d942c25ff6d6f56c34cba (commit) via 350fa3e785be6a9b9f84b7c5c209e7d544b71764 (commit) via ea0765d27bc8dd5b206b41de34c9ae6f3bc512ae (commit) from 43c6c1f9e2127642da787133f4ad189b27286d17 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 360584c3be07814d44c80ada548620dc13730576 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:56:57 2012 +0200
popt: Move libs to /usr.
commit 8a6455271d3f0c1a9092c505854632720f9dfc83 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:55:56 2012 +0200
mdadm: Move everything to /usr.
commit 051ef3b79ca1b06e30719124a24f2c39075a17a1 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:55:30 2012 +0200
ncurses: Move libs to /usr.
commit 07d3ccd7aa4b4b3045f062e9430962cb4157f0ff Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:54:50 2012 +0200
lvm2: Move everything to /usr.
commit 4aea08722b7b33fb4fd4513874bded8d327873f6 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:54:20 2012 +0200
tar: Move tools to /usr.
commit 9c2ea1479d55f6c3e60f5e90f82da46fee459ad8 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:53:34 2012 +0200
libidn: Move libs to /usr.
commit 0a409d3966073ed74a980185a0f9405d37e53942 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:52:34 2012 +0200
libgpg-error: Move libs to /usr.
commit 8e3b0c7278bdf48f2bcda79a3d627f6c073d7359 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:51:45 2012 +0200
libgcrypt: Move libs to /usr.
commit bc803683c28418b0bc43609a76856b7da94362d9 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:51:08 2012 +0200
libcap-ng: Move libs to /usr.
commit 45993d51c1170d8a52ec6aa471287e54411c84d8 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:49:38 2012 +0200
dmraid: Move everything to /usr.
commit 99a954bb8f395237d5d21e2e5166b80e5a48ea56 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:47:56 2012 +0200
cryptsetup-luks: Move everything to /usr.
commit ec32c152c08dd478a48a2fb902e20b66593181b2 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:47:12 2012 +0200
avahi: Move everything to /usr.
commit 238c2cb8aa9cef912fd8b3a2717dac07b4b1df2d Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:46:45 2012 +0200
attr: Move everything to /usr.
commit ea9f253863e8ad285ddc3b43b4572d780ba8fff4 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Apr 12 14:45:58 2012 +0200
acl: Move everything to /usr.
commit 4286b9f6dc0ffdc229ecd40ba0436b95cb948210 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Apr 11 19:21:05 2012 +0200
kmod: Move all to /usr.
commit 59c988f928b54a49324d3223b37c6562739a0743 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Apr 11 16:55:08 2012 +0200
nspr: Move libs to /usr.
commit 84c0f915f706689998dfe11733c8bef658bbc3ec Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Apr 11 14:39:12 2012 +0200
ethtool: Move tool to /usr.
commit 1d4e1316eca289cab86d942c25ff6d6f56c34cba Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Apr 11 13:28:51 2012 +0200
gcc: Update to newer version of PIE patchset.
commit 350fa3e785be6a9b9f84b7c5c209e7d544b71764 Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Apr 10 15:43:52 2012 +0200
cpio: Move tool to /usr.
commit ea0765d27bc8dd5b206b41de34c9ae6f3bc512ae Author: Michael Tremer michael.tremer@ipfire.org Date: Tue Apr 10 15:41:38 2012 +0200
ed: Move tool to /usr.
-----------------------------------------------------------------------
Summary of changes: acl/acl.nm | 16 +- attr/attr.nm | 17 +- avahi/avahi.nm | 6 +- cpio/cpio.nm | 3 +- cryptsetup-luks/cryptsetup-luks.nm | 11 +- dmraid/dmraid.nm | 11 +- ed/ed.nm | 14 +- ethtool/ethtool.nm | 7 +- gcc/gcc.nm | 4 +- ...7.patch => gcc-4.6.3-piepatches-20120408.patch} | 292 +++++++++++++------- kmod/kmod.nm | 32 +-- libcap-ng/libcap-ng.nm | 11 +- libgcrypt/libgcrypt.nm | 11 +- libgpg-error/libgpg-error.nm | 11 +- libidn/libidn.nm | 12 +- lvm2/lvm2.nm | 13 +- mdadm/mdadm.nm | 8 +- ncurses/ncurses.nm | 10 +- nspr/nspr.nm | 12 +- popt/popt.nm | 13 +- tar/tar.nm | 3 +- 21 files changed, 238 insertions(+), 279 deletions(-) rename gcc/patches/{gcc-4.6.0-piepatches-20110407.patch => gcc-4.6.3-piepatches-20120408.patch} (74%)
Difference in files: diff --git a/acl/acl.nm b/acl/acl.nm index 8c6f0c4..adf7075 100644 --- a/acl/acl.nm +++ b/acl/acl.nm @@ -5,7 +5,7 @@
name = acl version = 2.2.51 -release = 1 +release = 2
groups = System/Filesystems url = http://oss.sgi.com/projects/xfs/ @@ -29,7 +29,7 @@ build end
configure_options += \ - --bindir=/bin \ + --libexecdir=%{libdir} \ --disable-static
make_build_targets += LIBTOOL="libtool --tag=CC" @@ -38,17 +38,7 @@ build make tests end
- install_cmds - mkdir -pv %{BUILDROOT}%{libdir} - install -v -m0755 libacl/.libs/libacl.so.1.1.0 %{BUILDROOT}%{libdir} - ln -vsf libacl.so.1.1.0 %{BUILDROOT}%{libdir}/libacl.so.1 - ln -vsf libacl.so.1 %{BUILDROOT}%{libdir}/libacl.so - - # Install headers. - mkdir -pv %{BUILDROOT}%{includedir}/{acl,sys} - cp -vf include/libacl.h %{BUILDROOT}%{includedir}/acl/ - cp -vf include/acl.h %{BUILDROOT}%{includedir}/sys/ - end + make_install_targets += install-dev install-lib end
packages diff --git a/attr/attr.nm b/attr/attr.nm index 740d88f..a1bc9d5 100644 --- a/attr/attr.nm +++ b/attr/attr.nm @@ -5,7 +5,7 @@
name = attr version = 2.4.43 -release = 4 +release = 5
groups = System/Filesystems url = http://oss.sgi.com/projects/xfs/ @@ -26,22 +26,11 @@ build end
configure_options += \ + --libexecdir=%{libdir} \ --enable-shared
make_build_targets += LIBTOOL="libtool --tag=CC" - - install_cmds - # Install libraries. - mkdir -pv %{BUILDROOT}%{libdir} - install -v -m0755 libattr/.libs/libattr.so.1.1.0 %{BUILDROOT}/%{libdir} - ln -vsf libattr.so.1.1.0 %{BUILDROOT}/%{libdir}/libattr.so.1 - ln -vsf libattr.so.1 %{BUILDROOT}%{libdir}/libattr.so - - # Install includes. - mkdir -pv %{BUILDROOT}%{includedir}/attr - cp -vf include/{attributes.h,error_context.h,libattr.h,xattr.h} \ - %{BUILDROOT}%{includedir}/attr/ - end + make_install_targets += install-libs install-dev end
packages diff --git a/avahi/avahi.nm b/avahi/avahi.nm index a0d4e98..fe6839d 100644 --- a/avahi/avahi.nm +++ b/avahi/avahi.nm @@ -5,7 +5,7 @@
name = avahi version = 0.6.30 -release = 1 +release = 2
groups = Networking/Zeroconf url = http://avahi.org/ @@ -41,10 +41,6 @@ build end
configure_options += \ - --bindir=/bin \ - --mandir=/usr/share/man \ - --sysconfdir=/etc \ - --localstatedir=/var \ --with-distro=none \ --disable-gdbm \ --disable-qt3 \ diff --git a/cpio/cpio.nm b/cpio/cpio.nm index 7b21d84..111dcc8 100644 --- a/cpio/cpio.nm +++ b/cpio/cpio.nm @@ -5,7 +5,7 @@
name = cpio version = 2.11 -release = 1 +release = 2
groups = System/Packaging url = http://www.gnu.org/software/cpio/ @@ -25,7 +25,6 @@ sources = %{thisapp}.tar.bz2
build configure_options += \ - --bindir=/bin \ --libexecdir=/tmp \ --with-rmt=/usr/sbin/rmt
diff --git a/cryptsetup-luks/cryptsetup-luks.nm b/cryptsetup-luks/cryptsetup-luks.nm index 0fbad75..d57dea9 100644 --- a/cryptsetup-luks/cryptsetup-luks.nm +++ b/cryptsetup-luks/cryptsetup-luks.nm @@ -5,7 +5,7 @@
name = cryptsetup-luks version = 1.1.0 -release = 2 +release = 3
groups = System/Filesystems url = http://cryptsetup.googlecode.com/ @@ -32,16 +32,7 @@ build DIR_APP = %{DIR_SRC}/cryptsetup-%{version}
configure_options += \ - --sbindir=/sbin \ - --libdir=/%{lib} \ --disable-static - - install_cmds - rm -rvf %{BUILDROOT}/%{lib}/cryptsetup{,.la,.so} - mkdir -pv %{BUILDROOT}%{libdir} - mv -v %{BUILDROOT}/%{lib}/pkgconfig %{BUILDROOT}%{libdir} - ln -svf ../../%{lib}/libcryptsetup.so.1 %{BUILDROOT}%{libdir}/libcryptsetup.so - end end
packages diff --git a/dmraid/dmraid.nm b/dmraid/dmraid.nm index a8d2a04..f0fbf17 100644 --- a/dmraid/dmraid.nm +++ b/dmraid/dmraid.nm @@ -5,7 +5,7 @@
name = dmraid version = 1.0.0.rc15 -release = 3 +release = 4
groups = System/Filesystems url = http://people.redhat.com/heinzm/sw/dmraid @@ -30,11 +30,9 @@ build DIR_APP = %{DIR_SRC}/%{name}/%{version} PARALLELISMFLAGS = # Disabled
- make_install_targets += sbindir=%{BUILDROOT}/sbin + make_install_targets += sbindir=%{BUILDROOT}%{sbindir}
configure_options += \ - --sbindir=/sbin \ - --libdir=/%{lib} \ --disable-static \ --disable-static_link \ --enable-libselinux @@ -44,11 +42,6 @@ build end
install_cmds - mkdir -pv %{BUILDROOT}/{,usr}/%{lib} - install -v -m 755 lib/libdmraid.so \ - %{BUILDROOT}/%{lib}/libdmraid.so.%{version} - ln -svf ../../%{lib}/libdmraid.so.%{version} %{BUILDROOT}%{libdir}/libdmraid.so - # Install development headers. mkdir -pv %{BUILDROOT}%{includedir}/dmraid install -m 644 include/dmraid/*.h %{BUILDROOT}%{includedir}/dmraid/ diff --git a/ed/ed.nm b/ed/ed.nm index fe1f115..e24d6d7 100644 --- a/ed/ed.nm +++ b/ed/ed.nm @@ -5,7 +5,7 @@
name = ed version = 1.5 -release = 3 +release = 4
groups = Application/Text url = http://www.gnu.org/software/ed/ @@ -22,23 +22,11 @@ end source_dl =
build - configure_options += \ - --exec-prefix=/ - make_build_target = CFLAGS="%{CFLAGS}" - - install - # Create directory for man pages - mkdir -pv %{BUILDROOT}/usr/share/man/man1 - - make install bindir=/bin mandir=/usr/share/man \ - DESTDIR=%{BUILDROOT} - end end
packages package %{name} - end
package %{name}-debuginfo template DEBUGINFO diff --git a/ethtool/ethtool.nm b/ethtool/ethtool.nm index 1f7d906..a51ea7f 100644 --- a/ethtool/ethtool.nm +++ b/ethtool/ethtool.nm @@ -5,7 +5,7 @@
name = ethtool version = 2.6.34 -release = 2 +release = 3
groups = Applications/System url = http://sourceforge.net/projects/gkernel/ @@ -20,11 +20,6 @@ end
source_dl =
-build - configure_options += \ - --sbindir=/sbin -end - packages package %{name} groups += Base diff --git a/gcc/gcc.nm b/gcc/gcc.nm index bfe183f..ed1b500 100644 --- a/gcc/gcc.nm +++ b/gcc/gcc.nm @@ -8,7 +8,7 @@ build_cloog_ppl = 1
name = gcc version = 4.6.3 -release = 2 +release = 3
maintainer = Michael Tremer michael.tremer@ipfire.org groups = Development/Compilers @@ -40,7 +40,7 @@ patches = \ gcc46-ppl-0.10.patch \ gcc46-Woverlength-string.patch0 \ gcc46-Woverlength-string-asm.patch0 \ - gcc-4.6.0-piepatches-20110407.patch + gcc-4.6.3-piepatches-20120408.patch
build requires diff --git a/gcc/patches/gcc-4.6.0-piepatches-20110407.patch b/gcc/patches/gcc-4.6.0-piepatches-20110407.patch deleted file mode 100644 index a9ffaba..0000000 --- a/gcc/patches/gcc-4.6.0-piepatches-20110407.patch +++ /dev/null @@ -1,791 +0,0 @@ -diff -Nur gcc-4.6.0-vanilla/configure gcc-4.6.0/configure ---- gcc-4.6.0-vanilla/configure 2011-03-16 19:27:36.000000000 +0100 -+++ gcc-4.6.0/configure 2011-04-07 19:17:55.383923352 +0200 -@@ -668,6 +668,7 @@ - CFLAGS - CC - target_subdir -+enable_esp - host_subdir - build_subdir - build_libsubdir -@@ -1459,6 +1460,11 @@ - --disable-libquadmath-support - disable libquadmath support for Fortran - --enable-libada build libada directory -+ --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. -+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm - --enable-libssp build libssp directory - --enable-build-with-cxx build with C++ compiler instead of C compiler - --disable-ppl-version-check -@@ -3040,6 +3046,25 @@ - noconfigdirs="$noconfigdirs gnattools" - fi - -+# Check whether --enable-esp was given and target have the support. -+# Check whether --enable-esp or --disable-esp was given. -+if test "${enable_esp+set}" = set; then -+ enableval="$enable_esp" -+ -+ case $target in -+ 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 -+echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} -+ { (exit 1); exit 1; }; } -+ ;; -+ esac -+ -+fi; -+ -+ - # Check whether --enable-libssp was given. - if test "${enable_libssp+set}" = set; then : - enableval=$enable_libssp; ENABLE_LIBSSP=$enableval -@@ -14199,6 +14224,9 @@ - *) stage1_cflags="-g -J" ;; - esac ;; - esac -+if test x$enable_esp = xyes; then -+ stage1_cflags="$stage1_cflags -fno-stack-protector" -+fi - - # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. - if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then -diff -Nur gcc-4.6.0-vanilla/gcc/config/gnu-user.h gcc-4.6.0/gcc/config/gnu-user.h ---- gcc-4.6.0-vanilla/gcc/config/gnu-user.h 2011-01-12 15:29:14.000000000 +0100 -+++ gcc-4.6.0/gcc/config/gnu-user.h 2011-04-07 19:19:31.962715700 +0200 -@@ -41,7 +41,11 @@ - provides part of the support for getting C++ file-scope static - object constructed before entering `main'. */ - --#if defined HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define GNU_USER_TARGET_STARTFILE_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ -+ %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define GNU_USER_TARGET_STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -diff -Nur gcc-4.6.0-vanilla/gcc/config/rs6000/linux64.h gcc-4.6.0/gcc/config/rs6000/linux64.h ---- gcc-4.6.0-vanilla/gcc/config/rs6000/linux64.h 2011-03-07 08:50:23.000000000 +0100 -+++ gcc-4.6.0/gcc/config/rs6000/linux64.h 2011-04-07 19:19:26.658727069 +0200 -@@ -193,7 +193,7 @@ - #endif - - #define ASM_SPEC32 "-a32 \ --%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ -+%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ - %{memb} %{!memb: %{msdata=eabi: -memb}} \ - %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ - %{mcall-freebsd: -mbig} \ -diff -Nur gcc-4.6.0-vanilla/gcc/config/rs6000/sysv4.h gcc-4.6.0/gcc/config/rs6000/sysv4.h ---- gcc-4.6.0-vanilla/gcc/config/rs6000/sysv4.h 2011-03-07 08:50:23.000000000 +0100 -+++ gcc-4.6.0/gcc/config/rs6000/sysv4.h 2011-04-07 19:19:31.963715695 +0200 -@@ -800,7 +800,12 @@ - %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ - %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" - --#ifdef HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_LINUX_SPEC "\ -+%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+%{mnewlib:ecrti.o%s;:crti.o%s} \ -+%{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_LINUX_SPEC "\ - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -diff -Nur gcc-4.6.0-vanilla/gcc/config.in gcc-4.6.0/gcc/config.in ---- gcc-4.6.0-vanilla/gcc/config.in 2011-03-25 18:07:00.000000000 +0100 -+++ gcc-4.6.0/gcc/config.in 2011-04-07 19:18:10.478890819 +0200 -@@ -58,6 +58,12 @@ - #endif - - -+/* Define to 1 to enable crtbeginTS.o. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_CRTBEGINTS -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -@@ -77,6 +83,12 @@ - #endif - - -+/* Define to 1 to enable esp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP -+#endif -+ -+ - /* Define to 1 to enable fixed-point arithmetic extension to C. */ - #ifndef USED_FOR_TARGET - #undef ENABLE_FIXED_POINT -diff -Nur gcc-4.6.0-vanilla/gcc/configure gcc-4.6.0/gcc/configure ---- gcc-4.6.0-vanilla/gcc/configure 2011-02-28 16:36:37.000000000 +0100 -+++ gcc-4.6.0/gcc/configure 2011-04-07 19:17:55.388923340 +0200 -@@ -677,6 +677,8 @@ - HOST_LIBS - GGC - libgcc_visibility -+enable_esp -+enable_crtbeginTS - gcc_cv_readelf - gcc_cv_objdump - ORIGINAL_NM_FOR_TARGET -@@ -25608,6 +25610,50 @@ - ;; - esac - -+echo "$as_me:$LINENO: checking linker -z now support" >&5 -+echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_now+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_now=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_now=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z now options -+ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then -+ gcc_cv_ld_now=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 -+echo "${ECHO_T}$gcc_cv_ld_now" >&6 -+ -+echo "$as_me:$LINENO: checking linker -z relro support" >&5 -+echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_relro+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_relro=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_relro=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z relro and -z norelro options -+ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then -+ gcc_cv_ld_relro=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 -+echo "${ECHO_T}$gcc_cv_ld_relro" >&6 -+ - { $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 : -@@ -25792,6 +25838,74 @@ - - fi - -+if test x$enable_esp = xyes ; then -+case $target in -+ ia64*-*-linux*) -+ if test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *) -+ enable_esp_ld=no -+ ;; -+ esac -+else -+ enable_espf_ld=no -+fi -+if test x$enable_esp_ld = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_ESP 1 -+_ACEOF -+ -+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;} -+ { (exit 1); exit 1; }; } -+fi -+ -+echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5 -+echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6 -+if test "${enable_crtbeginTS+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginTS=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginTS=yes -+ fi -+ ;; -+ *) enable_crtbeginTS=no ;; -+ esac -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5 -+echo "${ECHO_T}$enable_crtbeginTS" >&6 -+ -+if test x$enable_crtbeginTS = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_CRTBEGINTS 1 -+_ACEOF -+ -+fi -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. -diff -Nur gcc-4.6.0-vanilla/gcc/cp/lang-specs.h gcc-4.6.0/gcc/cp/lang-specs.h ---- gcc-4.6.0-vanilla/gcc/cp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 -+++ gcc-4.6.0/gcc/cp/lang-specs.h 2011-04-07 19:19:04.828773916 +0200 -@@ -47,7 +47,7 @@ - %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ - cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}}%V}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, -@@ -58,7 +58,7 @@ - %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ - cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, -diff -Nur gcc-4.6.0-vanilla/gcc/esp.h gcc-4.6.0/gcc/esp.h ---- gcc-4.6.0-vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.6.0/gcc/esp.h 2011-04-07 19:19:14.329753502 +0200 -@@ -0,0 +1,145 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20100527.1 -+ * Magnus Granberg (Zorry) zorry@gentoo.org */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector-all, -fPIE, -pie and -z now -+ as default if the defines and the spec allow it. -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -+ This will add some unsupported upstream commands options as -nopie and -nonow. -+ -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_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. -+ ESP_LINK_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_overflow)" -+ #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 -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #else -+ #define ESP_CC1_PIE_SPEC "" -+ #endif -+ #define ESP_CC1_STRICT_OVERFLOW_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. We do a -pie incompatible check -+ Don't remove the specs in the end */ -+ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_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)}}" -+ -+ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ -+ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c -+ For precompiling headers. */ -+ #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 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}}}}}}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* 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. */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ -+ /* 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_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" -+ #else -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{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. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_LINK_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ -+ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; -+ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; -+ -+#else /* If not ESP_ENABLE defined do this. */ -+ -+ #define ESP_OPTIONS_SPEC "" -+ #define ESP_CPP_OPTIONS_SPEC "" -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } -+ -+#endif -+#endif /* End GCC_ESP_H */ -diff -Nur gcc-4.6.0-vanilla/gcc/gcc.c gcc-4.6.0/gcc/gcc.c ---- gcc-4.6.0-vanilla/gcc/gcc.c 2011-02-23 03:04:43.000000000 +0100 -+++ gcc-4.6.0/gcc/gcc.c 2011-04-07 19:19:04.828773916 +0200 -@@ -44,6 +44,7 @@ - #include "flags.h" - #include "opts.h" - #include "vec.h" -+#include "esp.h" /* for --enable-esp support */ - - /* By default there is no special suffix for target executables. */ - /* FIXME: when autoconf is fixed, remove the host check - dj */ -@@ -690,7 +691,9 @@ - - static const char *asm_debug; - static const char *cpp_spec = CPP_SPEC; -+#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC; -+#endif - static const char *cc1plus_spec = CC1PLUS_SPEC; - static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; - static const char *link_ssp_spec = LINK_SSP_SPEC; -@@ -751,7 +754,7 @@ - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ - %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ -- %{undef} %{save-temps*:-fpch-preprocess}"; -+ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -925,9 +928,9 @@ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ - cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ -- %(cc1_options)}\ -+ %(cc1_options) %(esp_options)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -950,7 +953,7 @@ - %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 0, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".s", "@assembler", 0, 0, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, -@@ -1203,18 +1206,23 @@ - INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), - }; - --#ifdef EXTRA_SPECS /* additional specs needed */ -+/* EXTRA_SPECS needs to be defined */ -+#ifndef EXTRA_SPECS -+#define EXTRA_SPECS -+#endif -+ -+/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ - /* Structure to keep track of just the first two args of a spec_list. -- That is all that the EXTRA_SPECS macro gives us. */ -+ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ - struct spec_list_1 - { - const char *const name; - const char *const ptr; - }; - --static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; -+/* ESP_EXTRA_SPECS before EXTRA_SPECS */ -+static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; - static struct spec_list *extra_specs = (struct spec_list *) 0; --#endif - - /* List of dynamically allocates specs that have been defined so far. */ - -@@ -1306,7 +1314,6 @@ - if (verbose_flag) - fnotice (stderr, "Using built-in specs.\n"); - --#ifdef EXTRA_SPECS - extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); - - for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) -@@ -1319,7 +1326,6 @@ - sl->ptr_spec = &sl->ptr; - next = sl; - } --#endif - - for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) - { -@@ -6418,6 +6424,12 @@ - gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL); - -+#ifdef ENABLE_ESP -+ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end -+ of the command line. */ -+ do_self_spec (esp_command_options_spec); -+#endif -+ - /* Now we have the specs. - Set the `valid' bits for switches that match anything in any spec. */ - -diff -Nur gcc-4.6.0-vanilla/gcc/Makefile.in gcc-4.6.0/gcc/Makefile.in ---- gcc-4.6.0-vanilla/gcc/Makefile.in 2011-01-26 05:19:58.000000000 +0100 -+++ gcc-4.6.0/gcc/Makefile.in 2011-04-07 19:18:24.186861296 +0200 -@@ -642,6 +642,14 @@ - INHIBIT_LIBC_CFLAGS = -Dinhibit_libc - endif - -+# We don't want to compile the compiler with -fPIE. -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+else -+ESP_NOPIE_CFLAGS= -+endif -+ - # Options to use when compiling libgcc2.a. - # - LIBGCC2_DEBUG_CFLAGS = -g -@@ -662,7 +670,7 @@ - CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -- -fno-stack-protector \ -+ -fno-stack-protector $(ESP_NOPIE_CFLAGS) \ - $(INHIBIT_LIBC_CFLAGS) - - # Additional sources to handle exceptions; overridden by targets as needed. -@@ -693,6 +701,12 @@ - # The rules for compiling them should be in the t-* file for the machine. - EXTRA_PARTS = @extra_parts@ - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_crtbeginTS = @enable_crtbeginTS@ -+ifeq ($(enable_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - # List of extra object files that should be compiled and linked with - # compiler proper (cc1, cc1obj, cc1plus). - EXTRA_OBJS = @extra_objs@ -@@ -996,7 +1010,7 @@ - - # This is the variable actually used when we compile. If you change this, - # you probably want to update BUILD_CFLAGS in configure.ac --ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ -+ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ - $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ - - # The C++ version. -@@ -1920,9 +1934,10 @@ - echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars - echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars -- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars -+ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars -+ echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars - - mv tmp-libgcc.mvars libgcc.mvars - -@@ -1982,9 +1997,19 @@ - $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ - -o $(T)crtbeginT$(objext) - -+# This is a version of crtbegin for -static -fPIE links if esp is enable. -+ifeq ($(enable_crtbeginTS),yes) -+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ -+ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) -+ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ -+ -o $(T)crtbeginTS$(objext) -+endif -+ - # Compile the start modules crt0.o and mcrt0.o that are linked with - # every program - $(T)crt0.o: s-crt0 ; @true -diff -Nur gcc-4.6.0-vanilla/gcc/objc/lang-specs.h gcc-4.6.0/gcc/objc/lang-specs.h ---- gcc-4.6.0-vanilla/gcc/objc/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 -+++ gcc-4.6.0/gcc/objc/lang-specs.h 2011-04-07 19:19:04.831773909 +0200 -@@ -30,9 +30,9 @@ - %{traditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ -- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ -+ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ - %{!save-temps*:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ -@@ -41,18 +41,18 @@ - %{traditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ -- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj -fpreprocessed %b.mi %(cc1_options)%(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}\ - %{!save-temps*:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, - {".mi", "@objective-c-cpp-output", 0, 0, 0}, - {"@objective-c-cpp-output", -- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc-cpp-output", - "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ -- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.6.0-vanilla/gcc/objcp/lang-specs.h gcc-4.6.0/gcc/objcp/lang-specs.h ---- gcc-4.6.0-vanilla/gcc/objcp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 -+++ gcc-4.6.0/gcc/objcp/lang-specs.h 2011-04-07 19:19:04.829773913 +0200 -@@ -36,7 +36,7 @@ - %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ - cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@objective-c++", -@@ -46,16 +46,16 @@ - %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ - cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".mii", "@objective-c++-cpp-output", 0, 0, 0}, - {"@objective-c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc++-cpp-output", - "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ - %{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.6.0-vanilla/gcc/varasm.c gcc-4.6.0/gcc/varasm.c ---- gcc-4.6.0-vanilla/gcc/varasm.c 2011-02-28 16:36:37.000000000 +0100 -+++ gcc-4.6.0/gcc/varasm.c 2011-04-07 19:18:52.338800740 +0200 -@@ -6022,7 +6022,11 @@ - bool is_local; - - is_local = targetm.binds_local_p (decl); -- if (!flag_shlib) -+ #ifdef ENABLE_ESP -+ if (!flag_pic) -+ #else -+ if (!flag_shlib) -+ #endif - { - if (is_local) - kind = TLS_MODEL_LOCAL_EXEC; -diff -Nur gcc-4.6.0-vanilla/libgcc/Makefile.in gcc-4.6.0/libgcc/Makefile.in ---- gcc-4.6.0-vanilla/libgcc/Makefile.in 2011-01-26 05:19:58.000000000 +0100 -+++ gcc-4.6.0/libgcc/Makefile.in 2011-04-07 19:18:24.190861287 +0200 -@@ -298,6 +298,12 @@ - gen-hide-list = echo > $@ - endif - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_libgcc_crtbeginTS = $(enable_crtbeginTS) -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - ifneq ($(EXTRA_PARTS),) - extra-parts = libgcc-extra-parts - INSTALL_PARTS = $(EXTRA_PARTS) -@@ -849,6 +855,13 @@ - crtbeginT.o: $(gcc_srcdir)/crtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ - -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -+ -+# This is a version of crtbegin for -static -fPIE links. -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c -+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O -+endif - endif - - # Build extra startfiles in the libgcc directory. -diff -Nur gcc-4.6.0-vanilla/libmudflap/configure gcc-4.6.0/libmudflap/configure ---- gcc-4.6.0-vanilla/libmudflap/configure 2011-02-13 12:45:53.000000000 +0100 -+++ gcc-4.6.0/libmudflap/configure 2011-04-07 19:17:55.399923318 +0200 -@@ -652,6 +652,7 @@ - MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - am__untar -+enable_esp - am__tar - AMTAR - am__leading_dot -diff -Nur gcc-4.6.0-vanilla/Makefile.in gcc-4.6.0/Makefile.in ---- gcc-4.6.0-vanilla/Makefile.in 2011-02-12 13:02:24.000000000 +0100 -+++ gcc-4.6.0/Makefile.in 2011-04-07 19:18:24.184861300 +0200 -@@ -356,9 +356,17 @@ - BUILD_PREFIX = @BUILD_PREFIX@ - BUILD_PREFIX_1 = @BUILD_PREFIX_1@ - -+# Some stuff don't compile with SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOSSP_CFLAGS= -+endif -+ - # Flags to pass to stage2 and later makes. They are defined - # here so that they can be overridden by Makefile fragments. --BOOT_CFLAGS= -g -O2 -+BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) - BOOT_LDFLAGS= - BOOT_ADAFLAGS=-gnatpg -gnata - -@@ -403,9 +411,9 @@ - - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBCFLAGS = $(CFLAGS) -+LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) - CXXFLAGS = @CXXFLAGS@ --LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) - GOCFLAGS = $(CFLAGS) - - TFLAGS = diff --git a/gcc/patches/gcc-4.6.3-piepatches-20120408.patch b/gcc/patches/gcc-4.6.3-piepatches-20120408.patch new file mode 100644 index 0000000..f69e205 --- /dev/null +++ b/gcc/patches/gcc-4.6.3-piepatches-20120408.patch @@ -0,0 +1,885 @@ +git://git.overlays.gentoo.org/proj/hardened-gccpatchset.git + +diff -Nur gcc-4.6.3.vanilla/configure gcc-4.6.3/configure +--- gcc-4.6.3.vanilla/configure 2011-12-18 11:03:44.000000000 +0100 ++++ gcc-4.6.3/configure 2012-04-09 12:23:07.039817993 +0200 +@@ -668,6 +668,7 @@ + CFLAGS + CC + target_subdir ++enable_esp + host_subdir + build_subdir + build_libsubdir +@@ -1459,6 +1460,11 @@ + --disable-libquadmath-support + disable libquadmath support for Fortran + --enable-libada build libada directory ++ --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. ++ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm. + --enable-libssp build libssp directory + --enable-build-with-cxx build with C++ compiler instead of C compiler + --disable-ppl-version-check +@@ -3039,6 +3045,25 @@ + noconfigdirs="$noconfigdirs gnattools" + fi + ++# Check whether --enable-esp was given and target have the support. ++# Check whether --enable-esp or --disable-esp was given. ++if test "${enable_esp+set}" = set; then ++ enableval="$enable_esp" ++ ++ case $target in ++ 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 ++echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} ++ { (exit 1); exit 1; }; } ++ ;; ++ esac ++ ++fi; ++ ++ + # Check whether --enable-libssp was given. + if test "${enable_libssp+set}" = set; then : + enableval=$enable_libssp; ENABLE_LIBSSP=$enableval +@@ -14168,6 +14193,9 @@ + *) stage1_cflags="-g -J" ;; + esac ;; + esac ++if test x$enable_esp = xyes; then ++ stage1_cflags="$stage1_cflags -fno-stack-protector" ++fi + + # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. + if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then +diff -Nur gcc-4.6.3.vanilla/gcc/config/gnu-user.h gcc-4.6.3/gcc/config/gnu-user.h +--- gcc-4.6.3.vanilla/gcc/config/gnu-user.h 2011-01-12 15:29:14.000000000 +0100 ++++ gcc-4.6.3/gcc/config/gnu-user.h 2012-04-09 12:25:51.598251886 +0200 +@@ -41,7 +41,11 @@ + provides part of the support for getting C++ file-scope static + object constructed before entering `main'. */ + +-#if defined HAVE_LD_PIE ++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) ++#define GNU_USER_TARGET_STARTFILE_SPEC \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ ++ %{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" ++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) + #define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" +diff -Nur gcc-4.6.3.vanilla/gcc/config/rs6000/linux64.h gcc-4.6.3/gcc/config/rs6000/linux64.h +--- gcc-4.6.3.vanilla/gcc/config/rs6000/linux64.h 2011-03-07 08:50:23.000000000 +0100 ++++ gcc-4.6.3/gcc/config/rs6000/linux64.h 2012-04-09 12:25:39.139032665 +0200 +@@ -193,7 +193,7 @@ + #endif + + #define ASM_SPEC32 "-a32 \ +-%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ ++%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ + %{memb} %{!memb: %{msdata=eabi: -memb}} \ + %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ + %{mcall-freebsd: -mbig} \ +diff -Nur gcc-4.6.3.vanilla/gcc/config/rs6000/sysv4.h gcc-4.6.3/gcc/config/rs6000/sysv4.h +--- gcc-4.6.3.vanilla/gcc/config/rs6000/sysv4.h 2011-03-07 08:50:23.000000000 +0100 ++++ gcc-4.6.3/gcc/config/rs6000/sysv4.h 2012-04-09 12:25:51.599251502 +0200 +@@ -800,7 +800,12 @@ + %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ + %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" + +-#ifdef HAVE_LD_PIE ++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) ++#define STARTFILE_LINUX_SPEC "\ ++%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ ++%{mnewlib:ecrti.o%s;:crti.o%s} \ ++%{static:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" ++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) + #define STARTFILE_LINUX_SPEC "\ + %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ + %{mnewlib:ecrti.o%s;:crti.o%s} \ +diff -Nur gcc-4.6.3.vanilla/gcc/config.in gcc-4.6.3/gcc/config.in +--- gcc-4.6.3.vanilla/gcc/config.in 2012-03-01 13:03:46.000000000 +0100 ++++ gcc-4.6.3/gcc/config.in 2012-04-09 12:24:09.220535670 +0200 +@@ -58,6 +58,12 @@ + #endif + + ++/* Define to 1 to enable crtbeginP.o. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_CRTBEGINP ++#endif ++ ++ + /* Define to 1 to specify that we are using the BID decimal floating point + format instead of DPD */ + #ifndef USED_FOR_TARGET +@@ -77,6 +83,18 @@ + #endif + + ++/* Define to 1 to enable esp. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_ESP ++#endif ++ ++ ++/* Define to 1 to enable esp ssp. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_ESP_SSP ++#endif ++ ++ + /* Define to 1 to enable fixed-point arithmetic extension to C. */ + #ifndef USED_FOR_TARGET + #undef ENABLE_FIXED_POINT +diff -Nur gcc-4.6.3.vanilla/gcc/configure gcc-4.6.3/gcc/configure +--- gcc-4.6.3.vanilla/gcc/configure 2011-11-20 22:24:07.000000000 +0100 ++++ gcc-4.6.3/gcc/configure 2012-04-09 12:24:09.229532218 +0200 +@@ -677,6 +677,8 @@ + HOST_LIBS + GGC + libgcc_visibility ++enable_esp ++enable_crtbeginP + gcc_cv_readelf + gcc_cv_objdump + ORIGINAL_NM_FOR_TARGET +@@ -25606,6 +25608,50 @@ + ;; + esac + ++echo "$as_me:$LINENO: checking linker -z now support" >&5 ++echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 ++if test "${gcc_cv_ld_now+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ gcc_cv_ld_now=no ++if test $in_tree_ld = yes ; then ++ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ ++ && test $in_tree_ld_is_elf = yes; then ++ gcc_cv_ld_now=yes ++ fi ++elif test x$gcc_cv_ld != x; then ++ # Check if linker supports -z now options ++ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then ++ gcc_cv_ld_now=yes ++ fi ++fi ++ ++fi ++echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 ++echo "${ECHO_T}$gcc_cv_ld_now" >&6 ++ ++echo "$as_me:$LINENO: checking linker -z relro support" >&5 ++echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 ++if test "${gcc_cv_ld_relro+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ gcc_cv_ld_relro=no ++if test $in_tree_ld = yes ; then ++ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ ++ && test $in_tree_ld_is_elf = yes; then ++ gcc_cv_ld_relro=yes ++ fi ++elif test x$gcc_cv_ld != x; then ++ # Check if linker supports -z relro and -z norelro options ++ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then ++ gcc_cv_ld_relro=yes ++ fi ++fi ++ ++fi ++echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 ++echo "${ECHO_T}$gcc_cv_ld_relro" >&6 ++ + { $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 : +@@ -25790,6 +25836,113 @@ + + fi + ++if test x$enable_esp = xyes ; then ++case $target in ++ ia64*-*-linux*) ++ if test x$gcc_cv_ld_now = xyes; then ++ enable_esp_ld=yes ++ else ++ enable_esp_ld=no ++ fi ++ ;; ++ *-*-linux*) ++ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then ++ enable_esp_ld=yes ++ else ++ enable_esp_ld=no ++ fi ++ ;; ++ *) ++ enable_esp_ld=no ++ ;; ++ esac ++else ++ enable_espf_ld=no ++fi ++if test x$enable_esp_ld = xyes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define ENABLE_ESP 1 ++_ACEOF ++ ++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;} ++ { (exit 1); exit 1; }; } ++fi ++ ++echo "$as_me:$LINENO: checking for crtbeginP.o support" >&5 ++echo $ECHO_N "checking for crtbeginP.o support... $ECHO_C" >&6 ++if test "${enable_crtbeginP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++if test x$enable_esp = xyes ; then ++ case "$target" in ++ ia64*-*-linux*) ++ enable_crtbeginP=no ;; ++ *-*-linux*) ++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then ++ enable_crtbeginP=yes ++ fi ++ ;; ++ *) enable_crtbeginP=no ;; ++ esac ++fi ++ ++fi ++echo "$as_me:$LINENO: result: $enable_crtbeginP" >&5 ++echo "${ECHO_T}$enable_crtbeginP" >&6 ++ ++if test x$enable_crtbeginP = xyes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define ENABLE_CRTBEGINP 1 ++_ACEOF ++ ++fi ++ ++ ++# Check if we have SSP support. if uClibc we need 0.9.32 or newer and TLS. ++echo "$as_me:$LINENO: checking for SSP support" >&5 ++echo $ECHO_N "checking for SSP support... $ECHO_C" >&6 ++if test "${enable_esp_SSP+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ if test x$enable_esp = xyes && test x$gcc_cv_libc_provides_ssp = xyes \ ++ && test x$set_have_as_tls = xyes; then ++ if $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ ++ $target_header_dir/features.h > /dev/null; then ++ if test -f $target_header_dir/bits/uClibc_config.h && \ ++ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_SUBLEVEL__[ ]+([3-9][2-9]|[4-9][0-9])' \ ++ $target_header_dir/bits/uClibc_config.h > /dev/null && \ ++ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_TLS__[ ]+1' \ ++ $target_header_dir/bits/uClibc_config.h > /dev/null; then ++ enable_esp_SSP=yes ++ else ++ enable_esp_SSP=no ++ fi ++ else ++ enable_esp_SSP=yes ++ fi ++ else ++ enable_esp_SSP=no ++ fi ++fi ++echo "$as_me:$LINENO: result: $enable_esp_SSP" >&5 ++echo "${ECHO_T}$enable_esp_SSP" >&6 ++ ++if test x$$enable_esp_SSP = xyes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define ENABLE_ESP_SSP 1 ++_ACEOF ++ ++fi ++ ++ + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 + # and later they can use TFmode. +diff -Nur gcc-4.6.3.vanilla/gcc/cp/lang-specs.h gcc-4.6.3/gcc/cp/lang-specs.h +--- gcc-4.6.3.vanilla/gcc/cp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 ++++ gcc-4.6.3/gcc/cp/lang-specs.h 2012-04-09 12:25:11.222744541 +0200 +@@ -47,7 +47,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ + cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}}%V}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, +@@ -58,7 +58,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ + cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {".ii", "@c++-cpp-output", 0, 0, 0}, +diff -Nur gcc-4.6.3.vanilla/gcc/doc/invoke.texi gcc-4.6.3/gcc/doc/invoke.texi +--- gcc-4.6.3.vanilla/gcc/doc/invoke.texi 2012-01-03 17:43:38.000000000 +0100 ++++ gcc-4.6.3/gcc/doc/invoke.texi 2012-04-09 12:26:06.709453504 +0200 +@@ -8185,6 +8185,11 @@ + @opindex fstack-protector-all + Like @option{-fstack-protector} except that all functions are protected. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} ++or @option{-nostdlib} or @option{-nodefaultlibs} or ++@option{-fstack-protector} are found. ++ + @item -fsection-anchors + @opindex fsection-anchors + Try to reduce the number of symbolic address calculations by using +@@ -9090,6 +9095,12 @@ + that were used to generate code (@option{-fpie}, @option{-fPIE}, + or model suboptions) when you specify this option. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} ++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or ++@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} ++are found. ++ + @item -rdynamic + @opindex rdynamic + Pass the flag @option{-export-dynamic} to the ELF linker, on targets +@@ -18099,6 +18110,11 @@ + @code{__pie__} and @code{__PIE__}. The macros have the value 1 + for @option{-fpie} and 2 for @option{-fPIE}. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} ++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or ++@option{-nostartfiles} or @option{-shared} are found. ++ + @item -fno-jump-tables + @opindex fno-jump-tables + Do not use jump tables for switch statements even where it would be +diff -Nur gcc-4.6.3.vanilla/gcc/esp.h gcc-4.6.3/gcc/esp.h +--- gcc-4.6.3.vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.6.3/gcc/esp.h 2012-04-09 12:25:25.376313618 +0200 +@@ -0,0 +1,145 @@ ++/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. ++ * Version 20120403.2 ++ * Magnus Granberg (Zorry) zorry@gentoo.org */ ++#ifndef GCC_ESP_H ++#define GCC_ESP_H ++ ++/* This file will add -fstack-protector-all, -fPIE, -pie and -z now ++ as default if the defines and the spec allow it. ++ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass ++ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. ++ This will add some unsupported upstream commands options as -nopie and -nonow. ++ -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_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. ++ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. ++ ENABLE_CRTBEGINP add support for crtbeginP.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_overflow)" ++ #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 ++ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) ++ #define ESP_CC1_PIE_SPEC "%{!nopie: }" ++ #else ++ #define ESP_CC1_PIE_SPEC "" ++ #endif ++ #define ESP_CC1_STRICT_OVERFLOW_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. We do a -pie incompatible check ++ Don't remove the specs in the end */ ++ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_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)}}" ++ ++ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ ++ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" ++ ++ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c ++ For precompiling headers. */ ++ #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 EFAULT_SSP or EFAULT_PIE_SSP defined. */ ++ #if ( defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) ) && defined ( ENABLE_ESP_SSP ) ++ #define ESP_OPTIONS_SSP_SPEC \ ++ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ ++ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" ++ #else ++ #define ESP_OPTIONS_SSP_SPEC "" ++ #endif ++ ++ /* 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. */ ++ /* With ENABLE_CRTBEGINP we don't need to check for -static */ ++ #ifdef ENABLE_CRTBEGINP ++ #define ESP_OPTIONS_PIE_SPEC \ ++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ ++ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" ++ #else ++ #define ESP_OPTIONS_PIE_SPEC \ ++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ ++ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" ++ #endif ++ ++ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib ++ -nostartfiles */ ++ /* With ENABLE_CRTBEGINP we don't need to check for -static ++ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ ++ #ifdef ENABLE_CRTBEGINP ++ #define ESP_LINK_PIE_SPEC \ ++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ ++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" ++ #else ++ #define ESP_LINK_PIE_SPEC \ ++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ ++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" ++ #endif ++ ++ /* 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_CRTBEGINP we don't need to check for -static */ ++ #ifdef ENABLE_CRTBEGINP ++ #define ESP_LINK_PIE_CHECK_SPEC \ ++ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" ++ #else ++ #define ESP_LINK_PIE_CHECK_SPEC \ ++ "%{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. */ ++ #ifdef ENABLE_CRTBEGINP ++ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" ++ #else ++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" ++ #endif ++ ++ #else ++ #define ESP_OPTIONS_PIE_SPEC "" ++ #define ESP_LINK_PIE_CHECK_SPEC "" ++ #define ESP_LINK_PIE_SPEC "" ++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" ++ #endif ++ ++ /* We add extra spec name's to the EXTRA_SPECS list */ ++ #define ESP_EXTRA_SPECS \ ++ { "esp_cc1", ESP_CC1_SPEC }, \ ++ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ ++ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ ++ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ ++ { "esp_link", ESP_LINK_SPEC }, \ ++ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ ++ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ ++ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ ++ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ ++ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ ++ { "esp_options", ESP_OPTIONS_SPEC }, \ ++ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ ++ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } ++ ++ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; ++ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; ++ ++#else /* If not ESP_ENABLE defined do this. */ ++ ++ #define ESP_OPTIONS_SPEC "" ++ #define ESP_CPP_OPTIONS_SPEC "" ++ ++ /* We add extra spec name's to the EXTRA_SPECS list */ ++ #define ESP_EXTRA_SPECS \ ++ { "esp_options", ESP_OPTIONS_SPEC }, \ ++ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } ++ ++#endif ++#endif /* End GCC_ESP_H */ +diff -Nur gcc-4.6.3.vanilla/gcc/gcc.c gcc-4.6.3/gcc/gcc.c +--- gcc-4.6.3.vanilla/gcc/gcc.c 2011-02-23 03:04:43.000000000 +0100 ++++ gcc-4.6.3/gcc/gcc.c 2012-04-09 12:25:11.222744541 +0200 +@@ -44,6 +44,7 @@ + #include "flags.h" + #include "opts.h" + #include "vec.h" ++#include "esp.h" /* for --enable-esp support */ + + /* By default there is no special suffix for target executables. */ + /* FIXME: when autoconf is fixed, remove the host check - dj */ +@@ -690,7 +691,9 @@ + + static const char *asm_debug; + static const char *cpp_spec = CPP_SPEC; ++#ifndef ENABLE_ESP + static const char *cc1_spec = CC1_SPEC; ++#endif + static const char *cc1plus_spec = CC1PLUS_SPEC; + static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; + static const char *link_ssp_spec = LINK_SSP_SPEC; +@@ -751,7 +754,7 @@ + static const char *cpp_options = + "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ + %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ +- %{undef} %{save-temps*:-fpch-preprocess}"; ++ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; + + /* This contains cpp options which are not passed when the preprocessor + output will be used by another program. */ +@@ -925,9 +928,9 @@ + %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ + %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ + cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ +- %(cc1_options)}\ ++ %(cc1_options) %(esp_options)}\ + %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ +- cc1 %(cpp_unique_options) %(cc1_options)}}}\ ++ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, + {"-", + "%{!E:%e-E or -x required when input is from standard input}\ +@@ -950,7 +953,7 @@ + %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 0, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".s", "@assembler", 0, 0, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, +@@ -1203,18 +1206,23 @@ + INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), + }; + +-#ifdef EXTRA_SPECS /* additional specs needed */ ++/* EXTRA_SPECS needs to be defined */ ++#ifndef EXTRA_SPECS ++#define EXTRA_SPECS ++#endif ++ ++/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ + /* Structure to keep track of just the first two args of a spec_list. +- That is all that the EXTRA_SPECS macro gives us. */ ++ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ + struct spec_list_1 + { + const char *const name; + const char *const ptr; + }; + +-static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; ++/* ESP_EXTRA_SPECS before EXTRA_SPECS */ ++static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; + static struct spec_list *extra_specs = (struct spec_list *) 0; +-#endif + + /* List of dynamically allocates specs that have been defined so far. */ + +@@ -1306,7 +1314,6 @@ + if (verbose_flag) + fnotice (stderr, "Using built-in specs.\n"); + +-#ifdef EXTRA_SPECS + extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); + + for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) +@@ -1319,7 +1326,6 @@ + sl->ptr_spec = &sl->ptr; + next = sl; + } +-#endif + + for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) + { +@@ -6418,6 +6424,12 @@ + gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, + spec_version, dir_separator_str, NULL); + ++#ifdef ENABLE_ESP ++ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end ++ of the command line. */ ++ do_self_spec (esp_command_options_spec); ++#endif ++ + /* Now we have the specs. + Set the `valid' bits for switches that match anything in any spec. */ + +diff -Nur gcc-4.6.3.vanilla/gcc/Makefile.in gcc-4.6.3/gcc/Makefile.in +--- gcc-4.6.3.vanilla/gcc/Makefile.in 2011-08-20 09:51:09.000000000 +0200 ++++ gcc-4.6.3/gcc/Makefile.in 2012-04-09 12:23:38.285405919 +0200 +@@ -642,6 +642,14 @@ + INHIBIT_LIBC_CFLAGS = -Dinhibit_libc + endif + ++# We don't want to compile the compiler with -fPIE. ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++ESP_NOPIE_CFLAGS = -fno-PIE ++else ++ESP_NOPIE_CFLAGS= ++endif ++ + # Options to use when compiling libgcc2.a. + # + LIBGCC2_DEBUG_CFLAGS = -g +@@ -662,7 +670,7 @@ + CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ +- -fno-stack-protector \ ++ -fno-stack-protector $(ESP_NOPIE_CFLAGS) \ + $(INHIBIT_LIBC_CFLAGS) + + # Additional sources to handle exceptions; overridden by targets as needed. +@@ -693,6 +701,12 @@ + # The rules for compiling them should be in the t-* file for the machine. + EXTRA_PARTS = @extra_parts@ + ++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes ++enable_crtbeginP = @enable_crtbeginP@ ++ifeq ($(enable_crtbeginP),yes) ++EXTRA_PARTS += crtbeginP.o ++endif ++ + # List of extra object files that should be compiled and linked with + # compiler proper (cc1, cc1obj, cc1plus). + EXTRA_OBJS = @extra_objs@ +@@ -996,12 +1010,12 @@ + + # This is the variable actually used when we compile. If you change this, + # you probably want to update BUILD_CFLAGS in configure.ac +-ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ ++ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ + $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ + + # The C++ version. +-ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ +- $(COVERAGE_FLAGS) $(WARN_CXXFLAGS) @DEFS@ ++ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CXXFLAGS) \ ++ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CXXFLAGS) @DEFS@ + + # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro + # puts -I options in CPPFLAGS, our include files in the srcdir will always +@@ -1920,9 +1934,10 @@ + echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars + echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars + echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars +- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars ++ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars + echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars + echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars ++ echo enable_crtbeginP = '$(enable_crtbeginP)' >> tmp-libgcc.mvars + + mv tmp-libgcc.mvars libgcc.mvars + +@@ -1982,9 +1997,19 @@ + $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ + gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) + $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ ++ $(ESP_NOPIE_CFLAGS) \ + -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ + -o $(T)crtbeginT$(objext) + ++# This is a version of crtbegin for -static -fPIE links if esp is enable. ++ifeq ($(enable_crtbeginP),yes) ++$(T)crtbeginP.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ ++ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) ++ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ ++ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ ++ -o $(T)crtbeginP$(objext) ++endif ++ + # Compile the start modules crt0.o and mcrt0.o that are linked with + # every program + $(T)crt0.o: s-crt0 ; @true +diff -Nur gcc-4.6.3.vanilla/gcc/objc/lang-specs.h gcc-4.6.3/gcc/objc/lang-specs.h +--- gcc-4.6.3.vanilla/gcc/objc/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 ++++ gcc-4.6.3/gcc/objc/lang-specs.h 2012-04-09 12:25:11.224743774 +0200 +@@ -30,9 +30,9 @@ + %{traditional|traditional-cpp:\ + %eGNU Objective C no longer supports traditional compilation}\ + %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ +- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ ++ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ + %{!save-temps*:%{!no-integrated-cpp:\ +- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ ++ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objective-c-header", + "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ +@@ -41,18 +41,18 @@ + %{traditional|traditional-cpp:\ + %eGNU Objective C no longer supports traditional compilation}\ + %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ +- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ cc1obj -fpreprocessed %b.mi %(cc1_options)%(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}%V}\ + %{!save-temps*:%{!no-integrated-cpp:\ +- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, + {".mi", "@objective-c-cpp-output", 0, 0, 0}, + {"@objective-c-cpp-output", +- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objc-cpp-output", + "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ +- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff -Nur gcc-4.6.3.vanilla/gcc/objcp/lang-specs.h gcc-4.6.3/gcc/objcp/lang-specs.h +--- gcc-4.6.3.vanilla/gcc/objcp/lang-specs.h 2011-03-06 17:27:57.000000000 +0100 ++++ gcc-4.6.3/gcc/objcp/lang-specs.h 2012-04-09 12:25:11.223744157 +0200 +@@ -36,7 +36,7 @@ + %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ + cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {"@objective-c++", +@@ -46,16 +46,16 @@ + %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ + cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ + %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2\ ++ %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {".mii", "@objective-c++-cpp-output", 0, 0, 0}, + {"@objective-c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1objplus -fpreprocessed %i %(cc1_options) %2\ ++ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objc++-cpp-output", + "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ + %{!M:%{!MM:%{!E:\ +- cc1objplus -fpreprocessed %i %(cc1_options) %2\ ++ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff -Nur gcc-4.6.3.vanilla/gcc/varasm.c gcc-4.6.3/gcc/varasm.c +--- gcc-4.6.3.vanilla/gcc/varasm.c 2011-12-09 20:11:01.000000000 +0100 ++++ gcc-4.6.3/gcc/varasm.c 2012-04-09 12:24:55.766675254 +0200 +@@ -6028,7 +6028,11 @@ + bool is_local; + + is_local = targetm.binds_local_p (decl); +- if (!flag_shlib) ++ #ifdef ENABLE_ESP ++ if (!flag_pic) ++ #else ++ if (!flag_shlib) ++ #endif + { + if (is_local) + kind = TLS_MODEL_LOCAL_EXEC; +diff -Nur gcc-4.6.3.vanilla/libgcc/Makefile.in gcc-4.6.3/libgcc/Makefile.in +--- gcc-4.6.3.vanilla/libgcc/Makefile.in 2011-01-26 05:19:58.000000000 +0100 ++++ gcc-4.6.3/libgcc/Makefile.in 2012-04-09 12:23:38.286405535 +0200 +@@ -298,6 +298,12 @@ + gen-hide-list = echo > $@ + endif + ++# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes ++enable_libgcc_crtbeginP = $(enable_crtbeginP) ++ifeq ($(enable_libgcc_crtbeginP),yes) ++EXTRA_PARTS += crtbeginP.o ++endif ++ + ifneq ($(EXTRA_PARTS),) + extra-parts = libgcc-extra-parts + INSTALL_PARTS = $(EXTRA_PARTS) +@@ -849,6 +855,13 @@ + crtbeginT.o: $(gcc_srcdir)/crtstuff.c + $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ + -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O ++ ++# This is a version of crtbegin for -static -fPIE links. ++ifeq ($(enable_libgcc_crtbeginP),yes) ++crtbeginP.o: $(gcc_srcdir)/crtstuff.c ++ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ ++ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O ++endif + endif + + # Build extra startfiles in the libgcc directory. +diff -Nur gcc-4.6.3.vanilla/libmudflap/configure gcc-4.6.3/libmudflap/configure +--- gcc-4.6.3.vanilla/libmudflap/configure 2011-11-20 22:24:07.000000000 +0100 ++++ gcc-4.6.3/libmudflap/configure 2012-04-09 12:23:07.050818345 +0200 +@@ -652,6 +652,7 @@ + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE + am__untar ++enable_esp + am__tar + AMTAR + am__leading_dot +diff -Nur gcc-4.6.3.vanilla/Makefile.in gcc-4.6.3/Makefile.in +--- gcc-4.6.3.vanilla/Makefile.in 2012-01-02 12:02:10.000000000 +0100 ++++ gcc-4.6.3/Makefile.in 2012-04-09 12:23:38.283406686 +0200 +@@ -356,9 +356,17 @@ + BUILD_PREFIX = @BUILD_PREFIX@ + BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + ++# Some stuff don't compile with SSP ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++ESP_NOSSP_CFLAGS = -fno-stack-protector ++else ++ESP_NOSSP_CFLAGS= ++endif ++ + # Flags to pass to stage2 and later makes. They are defined + # here so that they can be overridden by Makefile fragments. +-BOOT_CFLAGS= -g -O2 ++BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) + BOOT_LDFLAGS= + BOOT_ADAFLAGS=-gnatpg -gnata + +@@ -403,9 +411,9 @@ + + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +-LIBCFLAGS = $(CFLAGS) ++LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) + CXXFLAGS = @CXXFLAGS@ +-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates ++LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) + GOCFLAGS = $(CFLAGS) + + TFLAGS = diff --git a/kmod/kmod.nm b/kmod/kmod.nm index 1801775..8bea457 100644 --- a/kmod/kmod.nm +++ b/kmod/kmod.nm @@ -5,7 +5,7 @@
name = kmod version = 7 -release = 1 +release = 2
maintainer = Michael Tremer michael.tremer@ipfire.org groups = System/Kernel @@ -30,37 +30,33 @@ build end
configure_options += \ - --bindir=/bin \ - --with-rootprefix= \ - --with-rootlibdir=/%{lib} \ --with-xz \ --with-zlib
# The testsuite does generate lots of errors.
install_cmds - # Remove all man pages (because there are not corresponding - # binaries, yet). - rm -rvf %{BUILDROOT}%{mandir} - - mkdir -pv %{BUILDROOT}/lib/modprobe.d + mkdir -pv %{BUILDROOT}%{prefix}/lib/modprobe.d mkdir -pv %{BUILDROOT}%{sysconfdir}/modprobe.d mkdir -pv %{BUILDROOT}%{sysconfdir}/depmod.d
- mkdir -pv %{BUILDROOT}/sbin - ln -svf ../bin/kmod %{BUILDROOT}/sbin/modprobe - ln -svf ../bin/kmod %{BUILDROOT}/sbin/modinfo - ln -svf ../bin/kmod %{BUILDROOT}/sbin/insmod - ln -svf ../bin/kmod %{BUILDROOT}/sbin/rmmod - ln -svf ../bin/kmod %{BUILDROOT}/sbin/depmod - ln -svf ../bin/kmod %{BUILDROOT}/sbin/lsmod - ln -svf kmod %{BUILDROOT}/bin/lsmod + mkdir -pv %{BUILDROOT}%{sbindir} + ln -svf ../bin/kmod %{BUILDROOT}%{sbindir}/modprobe + ln -svf ../bin/kmod %{BUILDROOT}%{sbindir}/modinfo + ln -svf ../bin/kmod %{BUILDROOT}%{sbindir}/insmod + ln -svf ../bin/kmod %{BUILDROOT}%{sbindir}/rmmod + ln -svf ../bin/kmod %{BUILDROOT}%{sbindir}/depmod + ln -svf ../bin/kmod %{BUILDROOT}%{sbindir}/lsmod end end
packages package %{name} - provides = module-init-tools = 4.0-1 + provides + module-init-tools = 4.0-1 + /sbin/modprobe + end + obsoletes = module-init-tools < 4.0-1 end
diff --git a/libcap-ng/libcap-ng.nm b/libcap-ng/libcap-ng.nm index d0a015f..7e968c1 100644 --- a/libcap-ng/libcap-ng.nm +++ b/libcap-ng/libcap-ng.nm @@ -5,7 +5,7 @@
name = libcap-ng version = 0.6.6 -release = 2 +release = 3
groups = System/Libraries url = http://people.redhat.com/sgrubb/libcap-ng @@ -25,15 +25,6 @@ build python end
- install_cmds - # Move libraries to lib - mkdir -pv %{BUILDROOT}/%{lib} - mv -vf %{BUILDROOT}%{libdir}/libcap-ng.so.* %{BUILDROOT}/%{lib}/ - - # Recreate symlink - ln -svf ../../%{lib}/libcap-ng.so.0 %{BUILDROOT}%{libdir}/libcap-ng.so - end - # XXX Testsuite is broken by the package developers #def test # make check diff --git a/libgcrypt/libgcrypt.nm b/libgcrypt/libgcrypt.nm index ab21d03..7f26939 100644 --- a/libgcrypt/libgcrypt.nm +++ b/libgcrypt/libgcrypt.nm @@ -5,7 +5,7 @@
name = libgcrypt version = 1.5.0 -release = 2 +release = 3
groups = System/Libraries url = http://www.gnupg.org/ @@ -28,14 +28,7 @@ build end
configure_options += \ - --libdir=/%{lib} \ - --enable-noexecstack \ - - install_cmds - mkdir -pv %{BUILDROOT}%{libdir} - rm -vf %{BUILDROOT}/%{lib}/libgcrypt.so - ln -sfv ../../%{lib}/libgcrypt.so.11 %{BUILDROOT}%{libdir}/libgcrypt.so - end + --enable-noexecstack end
packages diff --git a/libgpg-error/libgpg-error.nm b/libgpg-error/libgpg-error.nm index 5147094..9263df4 100644 --- a/libgpg-error/libgpg-error.nm +++ b/libgpg-error/libgpg-error.nm @@ -5,7 +5,7 @@
name = libgpg-error version = 1.9 -release = 2 +release = 3
groups = System/Libraries url = http://www.gnupg.org/ @@ -25,15 +25,6 @@ build requires gcc-c++ end - - configure_options += \ - --libdir=/%{lib} - - install_cmds - mkdir -pv %{BUILDROOT}%{libdir} - rm -vf %{BUILDROOT}/%{lib}/libgpg-error.so - ln -sfv ../../%{lib}/libgpg-error.so.0 %{BUILDROOT}%{libdir}/libgpg-error.so - end end
packages diff --git a/libidn/libidn.nm b/libidn/libidn.nm index fbd566d..f56544c 100644 --- a/libidn/libidn.nm +++ b/libidn/libidn.nm @@ -5,7 +5,7 @@
name = libidn version = 1.24 -release = 1 +release = 2
groups = System/Libraries url = http://www.gnu.org/software/libidn/ @@ -23,7 +23,6 @@ source_dl = http://ftp.gnu.org/gnu/libidn/
build configure_options += \ - --libdir=/%{lib} \ --disable-csharp \ --disable-static
@@ -31,15 +30,6 @@ build export LD_LIBRARY_PATH=$(pwd)/lib/.libs make -C tests check end - - install - make install DESTDIR=%{BUILDROOT} \ - pkgconfigdir=%{libdir}/pkgconfig - - mkdir -pv %{BUILDROOT}%{libdir} - rm -vf %{BUILDROOT}/%{lib}/libidn.so - ln -svf ../../%{lib}/libidn.so.11.6.7 %{BUILDROOT}%{libdir}/libidn.so - end end
packages diff --git a/lvm2/lvm2.nm b/lvm2/lvm2.nm index 3022043..d8e09b2 100644 --- a/lvm2/lvm2.nm +++ b/lvm2/lvm2.nm @@ -5,7 +5,7 @@
name = lvm2 version = 2.02.54 -release = 2 +release = 3 thisapp = LVM2.%{version}
groups = System/Base @@ -34,18 +34,7 @@ build end
configure_options += \ - --bindir=/bin \ - --sbindir=/sbin \ - --exec-prefix=/ \ - --libdir=/%{lib} \ --enable-pkgconfig - - install_cmds - mkdir -pv %{BUILDROOT}%{libdir} - rm -vf %{BUILDROOT}/%{lib}/libdevmapper.so - ln -svf libdevmapper.so.1.02 %{BUILDROOT}/%{lib}/libdevmapper.so.1 - ln -svf ../../%{lib}/libdevmapper.so.1 %{BUILDROOT}%{libdir}/libdevmapper.so - end end
packages diff --git a/mdadm/mdadm.nm b/mdadm/mdadm.nm index 8e0073e..a166010 100644 --- a/mdadm/mdadm.nm +++ b/mdadm/mdadm.nm @@ -5,7 +5,7 @@
name = mdadm version = 3.2.2 -release = 1 +release = 2
groups = System/Base url = http://www.kernel.org/pub/linux/utils/raid/mdadm/ @@ -35,12 +35,10 @@ build
build make %{PARALLELISMFLAGS} CXFLAGS="%{CFLAGS}" \ - CWFLAGS= SYSCONFDIR="/etc" MDASSEMBLE_AUTO=1 + CWFLAGS= SYSCONFDIR="%{sysconfdir}" MDASSEMBLE_AUTO=1 end
- install - make install BINDIR=/sbin DESTDIR=%{BUILDROOT} - + install_cmds mkdir -pv %{BUILDROOT}/var/run/mdadm chmod 700 %{BUILDROOT}/var/run/mdadm end diff --git a/ncurses/ncurses.nm b/ncurses/ncurses.nm index 0f1cc84..683c6a8 100644 --- a/ncurses/ncurses.nm +++ b/ncurses/ncurses.nm @@ -5,7 +5,7 @@
name = ncurses version = 5.9 -release = 6 +release = 7
groups = System/Base url = http://invisible-island.net/ncurses/ncurses.html @@ -27,7 +27,6 @@ build end
configure_options += \ - --mandir=/usr/share/man \ --with-shared \ --without-debug \ --without-ada \ @@ -68,13 +67,6 @@ build
chmod -v 755 %{BUILDROOT}%{libdir}/lib*.so.*.*
- # move lib{ncurses{,w},tinfo}.so.* to /lib* - mkdir -pv %{BUILDROOT}/%{lib} - mv -v %{BUILDROOT}%{libdir}/lib{ncurses{,w},tinfo}.so.* %{BUILDROOT}/%{lib} - for l in %{BUILDROOT}%{libdir}/lib{ncurses{,w},tinfo}.so; do - ln -sf $(echo %{libdir} | \ - sed 's,(^/|)[^/][^/]*,..,g')/%{lib}/$(readlink $l) $l - done mkdir -pv %{BUILDROOT}/{etc,lib}/terminfo
# move few basic terminfo entries to /lib diff --git a/nspr/nspr.nm b/nspr/nspr.nm index bc357df..c23b137 100644 --- a/nspr/nspr.nm +++ b/nspr/nspr.nm @@ -5,7 +5,7 @@
name = nspr version = 4.8.9 -release = 1 +release = 2
groups = System/Libraries url = http://www.mozilla.org/projects/nspr/ @@ -56,7 +56,6 @@ build end
configure_options += \ - --libdir=/%{lib} \ --includedir=/usr/include/nspr4 \ --enable-optimize="%{CFLAGS}" \ --disable-debug @@ -70,7 +69,6 @@ build
install_cmds mkdir -pv %{BUILDROOT}/usr/{bin,%{lib}} - mkdir -pv %{BUILDROOT}/%{lib} mkdir -pv %{BUILDROOT}%{libdir}/pkgconfig
cp -vf %{DIR_APP}/config/nspr-config-pc \ @@ -87,11 +85,6 @@ build < %{DIR_SOURCE}/nspr.pc.in \ > %{BUILDROOT}%{libdir}/pkgconfig/nspr.pc
- #mv -v %{BUILDROOT}/usr/lib/lib{nspr,plc.plds}4.so %{BUILDROOT}/lib/ - ln -svf ../../%{lib}/libnspr4.so %{BUILDROOT}%{libdir}/libnspr4.so - ln -svf ../../%{lib}/libplc4.so %{BUILDROOT}%{libdir}/libplc4.so - ln -svf ../../%{lib}/libplds4.so %{BUILDROOT}%{libdir}/libplds4.so - # Remove unneeded stuff rm -rfv \ %{BUILDROOT}/usr/bin/compile-et.pl \ @@ -106,6 +99,9 @@ packages
package %{name}-devel template DEVEL + + # libs are not versioned. + files += !%{libdir}/*.so end
package %{name}-debuginfo diff --git a/popt/popt.nm b/popt/popt.nm index 5bf894a..92de3e9 100644 --- a/popt/popt.nm +++ b/popt/popt.nm @@ -5,7 +5,7 @@
name = popt version = 1.15 -release = 2 +release = 3
groups = System/Libraries url = http://www.rpm5.org/ @@ -20,17 +20,6 @@ end
source_dl =
-build - configure_options += \ - --libdir=/%{lib} - - install_cmds - mkdir -pv %{BUILDROOT}%{libdir} - rm -vf %{BUILDROOT}/%{lib}/libpopt.so - ln -sfv ../../%{lib}/libpopt.so.0.0.0 %{BUILDROOT}%{libdir}/libpopt.so - end -end - packages package %{name}
diff --git a/tar/tar.nm b/tar/tar.nm index 3cce8df..b582477 100644 --- a/tar/tar.nm +++ b/tar/tar.nm @@ -5,7 +5,7 @@
name = tar version = 1.26 -release = 3 +release = 4
groups = System/Packaging url = http://www.gnu.org/software/tar/ @@ -39,7 +39,6 @@ build end
configure_options += \ - --bindir=/bin \ --libexecdir=/usr/sbin \ --enable-selinux \ FORCE_UNSAFE_CONFIGURE=1
hooks/post-receive -- IPFire 3.x development tree