summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin F. Quinn <kevquinn@gentoo.org>2007-03-20 22:36:45 +0000
committerKevin F. Quinn <kevquinn@gentoo.org>2007-03-20 22:36:45 +0000
commitabfcb5078f12e6d6e43bba28f1dc5329e20c383e (patch)
tree522d006e7e6fea406a6ba1a3dcb31c111abf135a
parentMore cosmetic alignment with gentoo-x86 (diff)
downloadkevquinn-abfcb5078f12e6d6e43bba28f1dc5329e20c383e.tar.gz
kevquinn-abfcb5078f12e6d6e43bba28f1dc5329e20c383e.tar.bz2
kevquinn-abfcb5078f12e6d6e43bba28f1dc5329e20c383e.zip
Added patch from vapier to get CPPFLAGS working - and use that instead of both CFLAGS
and ASFLAGS to set -DPIC. svn path=/; revision=197
-rw-r--r--hardened/toolchain/branches/pieworld/sys-libs/glibc/Manifest12
-rw-r--r--hardened/toolchain/branches/pieworld/sys-libs/glibc/files/glibc-respect-env-CPPFLAGS.patch30
-rw-r--r--hardened/toolchain/branches/pieworld/sys-libs/glibc/glibc-2.5-r1.ebuild20
3 files changed, 42 insertions, 20 deletions
diff --git a/hardened/toolchain/branches/pieworld/sys-libs/glibc/Manifest b/hardened/toolchain/branches/pieworld/sys-libs/glibc/Manifest
index c6b995a..427b76e 100644
--- a/hardened/toolchain/branches/pieworld/sys-libs/glibc/Manifest
+++ b/hardened/toolchain/branches/pieworld/sys-libs/glibc/Manifest
@@ -14,6 +14,10 @@ AUX 2.5/glibc-2.5-hardened-pie.patch 1569 RMD160 35ae4308396d59e37d050a5bedb57db
MD5 ae431c3e79196f5c5a92e3c2f0f07092 files/2.5/glibc-2.5-hardened-pie.patch 1569
RMD160 35ae4308396d59e37d050a5bedb57dbf3ae50cb3 files/2.5/glibc-2.5-hardened-pie.patch 1569
SHA256 a00285f0a167aae0a31d29ad49a391896d55e04fc8e5fc7f725ced77c702d8cf files/2.5/glibc-2.5-hardened-pie.patch 1569
+AUX glibc-respect-env-CPPFLAGS.patch 1172 RMD160 3df95477cc55d54f4909eafde3fa0f383c2c7c13 SHA1 442801b2be8ed6d94bcd0b80a8837ea05924c949 SHA256 c108b7984de8b55a042c53917a14d7697929e83c5cba5f267d2f3a09c3885573
+MD5 6d1bcb1f3786243728719b634f96266d files/glibc-respect-env-CPPFLAGS.patch 1172
+RMD160 3df95477cc55d54f4909eafde3fa0f383c2c7c13 files/glibc-respect-env-CPPFLAGS.patch 1172
+SHA256 c108b7984de8b55a042c53917a14d7697929e83c5cba5f267d2f3a09c3885573 files/glibc-respect-env-CPPFLAGS.patch 1172
AUX nscd 1621 RMD160 f6d20c4c3814f70d7741f3fa2e0b53ba32c37960 SHA1 5751fe798024c2021b7b3ed3e798618e2a38244a SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8
MD5 d142c6e0b4fd508f485d0aa9c5d12a91 files/nscd 1621
RMD160 f6d20c4c3814f70d7741f3fa2e0b53ba32c37960 files/nscd 1621
@@ -31,10 +35,10 @@ DIST glibc-2.5.tar.bz2 15321839 RMD160 25a0a460c0db1e5b7c570e5087461696f2096fd2
DIST glibc-libidn-2.5.tar.bz2 102330 RMD160 e10e85e0ee7cdab2e5518a93978cb688ccabee88 SHA1 ee7e019e01aa338e28db1eeb34abb2cb09d2f30a SHA256 de77e49e0beee6061d4c6e480f322566ba25d4e5e018c456a18ea4a8da5c0ede
DIST glibc-linuxthreads-2.5.tar.bz2 242445 RMD160 788484d035d53ac39aac18f6e3409a912eea1cfa SHA1 eb7765e5c0a14c7475f1c8b92cbe1f625a8fd76f SHA256 ee27aeba6124a8b351c720eb898917f0f8874d9a384cc2f17aa111a3d679bd2c
DIST glibc-ports-2.5.tar.bz2 409372 RMD160 e7e29df135a5f0f72760d10e5ad46de038e40725 SHA1 7da6257e641759ed29c4d316700fce6f604bc812 SHA256 80c38a005325e7539012bd665fb8e06af9ee9bfc74efb236ebff121265bfd463
-EBUILD glibc-2.5-r1.ebuild 39497 RMD160 e49564aaf68500232949392b04be245c3a42a0d7 SHA1 ff6c0b18a7afe3269279b988cd1ffd39253c99b5 SHA256 1698515d5096e4e0f837556090bae93b81c93a6b976f60aa148020fcc18a5fbb
-MD5 b8abfff842d21728e45f4ecb032e1530 glibc-2.5-r1.ebuild 39497
-RMD160 e49564aaf68500232949392b04be245c3a42a0d7 glibc-2.5-r1.ebuild 39497
-SHA256 1698515d5096e4e0f837556090bae93b81c93a6b976f60aa148020fcc18a5fbb glibc-2.5-r1.ebuild 39497
+EBUILD glibc-2.5-r1.ebuild 39143 RMD160 8668d0e874926aa8f6756e0de7e9e26afa6613f7 SHA1 432ed20d1a4b4e55efebeb32d2fb878d104fb692 SHA256 6986f89fb37f74d0818afa8f28290a48f0e9decce292c73385b88341b1b52999
+MD5 4b9cb0d7e6907e11f3f2e664cf0ac3d2 glibc-2.5-r1.ebuild 39143
+RMD160 8668d0e874926aa8f6756e0de7e9e26afa6613f7 glibc-2.5-r1.ebuild 39143
+SHA256 6986f89fb37f74d0818afa8f28290a48f0e9decce292c73385b88341b1b52999 glibc-2.5-r1.ebuild 39143
MD5 30fc9163b2a49cb4a083d02feace4918 files/digest-glibc-2.5-r1 1280
RMD160 74d079011c9a8d9155cd5f51591ca3a04cb9df26 files/digest-glibc-2.5-r1 1280
SHA256 b0af33330bd44dd7acd6f4aec9039d61b7fe9de005a8cf6edf63ee399cdeaa72 files/digest-glibc-2.5-r1 1280
diff --git a/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/glibc-respect-env-CPPFLAGS.patch b/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/glibc-respect-env-CPPFLAGS.patch
new file mode 100644
index 0000000..fa41f8e
--- /dev/null
+++ b/hardened/toolchain/branches/pieworld/sys-libs/glibc/files/glibc-respect-env-CPPFLAGS.patch
@@ -0,0 +1,30 @@
+Index: Makeconfig
+===================================================================
+RCS file: /cvs/glibc/libc/Makeconfig,v
+retrieving revision 1.320
+diff -u -p -r1.320 Makeconfig
+--- Makeconfig 28 Oct 2006 06:44:04 -0000 1.320
++++ Makeconfig 19 Mar 2007 04:28:35 -0000
+@@ -672,6 +672,7 @@ CPPFLAGS = $($(subdir)-CPPFLAGS) $(+incl
+ $(foreach lib,$(libof-$(basename $(@F))) \
+ $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
+ $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
++CPPFLAGS += $(CPPFLAGS-config)
+ override CFLAGS = -std=gnu99 \
+ $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
+ $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
+Index: config.make.in
+===================================================================
+RCS file: /cvs/glibc/libc/config.make.in,v
+retrieving revision 1.120
+diff -u -p -r1.120 config.make.in
+--- config.make.in 28 Oct 2006 06:44:04 -0000 1.120
++++ config.make.in 19 Mar 2007 04:28:36 -0000
+@@ -95,6 +95,7 @@ CC = @CC@
+ CXX = @CXX@
+ BUILD_CC = @BUILD_CC@
+ CFLAGS = @CFLAGS@
++CPPFLAGS-config = @CPPFLAGS@
+ ASFLAGS-config = @ASFLAGS_config@
+ AR = @AR@
+ RANLIB = @RANLIB@
diff --git a/hardened/toolchain/branches/pieworld/sys-libs/glibc/glibc-2.5-r1.ebuild b/hardened/toolchain/branches/pieworld/sys-libs/glibc/glibc-2.5-r1.ebuild
index 8de05e0..f2b2b87 100644
--- a/hardened/toolchain/branches/pieworld/sys-libs/glibc/glibc-2.5-r1.ebuild
+++ b/hardened/toolchain/branches/pieworld/sys-libs/glibc/glibc-2.5-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.5-r1.ebuild,v 1.2 2007/03/13 08:23:22 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.5-r1.ebuild,v 1.3 2007/03/15 16:09:05 kevquinn Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -224,6 +224,7 @@ toolchain-glibc_src_unpack() {
gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-inittls-nosysenter.patch
+ epatch "${FILESDIR}"/glibc-respect-env-CPPFLAGS.patch
einfo "Installing Hardened Gentoo SSP handler"
cp -f "${FILESDIR}"/2.5/glibc-2.5-gentoo-stack_chk_fail.c \
@@ -244,18 +245,6 @@ toolchain-glibc_src_unpack() {
-e 's:-fstack-protector$:-fstack-protector-all:' \
nscd/Makefile \
|| die "Failed to ensure nscd builds with ssp-all"
-
-# # Fixup use of PIC to choose PIC variants when built -fPIE.
-# # Prepends all files that have "#ifdef PIC" or similar, with
-# # preprocessor macros to define PIC if the compiler has
-# # defined __PIC__.
-# find ${S} -name '*.[h|S]' | \
-# xargs grep -l '^[[:space:]]*#[[:space:]]*if.*\bPIC\b' | \
-# xargs sed -i -e '1i#if defined __PIC__ && !defined PIC\
-## define PIC\
-##endif\
-#'
-
fi
gnuconfig_update
@@ -737,10 +726,9 @@ setup_flags() {
filter-flags -fstack-protector
if use hardened && gcc-specs-pie ; then
- # Force PIC macro definition for all compilations, since they're all
+ # Force PIC macro definition for all compilations since they're all
# either -fPIC or -fPIE with the default-PIE compiler.
- append-flags -DPIC
- export ASFLAGS="${ASFLAGS} -DPIC"
+ export CPPFLAGS="${CPPFLAGS} -DPIC"
else
# Don't build -fPIE without the default-PIE compiler and the
# hardened-pie patch