Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44825 - filter-flags fails to remove -pie
Summary: filter-flags fails to remove -pie
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: solar (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 01:58 UTC by Christian Rubbert
Modified: 2004-03-16 14:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to introduce filter-ldflags into flag-o-matic.eclass (flag-o-matic.eclass-ceed.diff,842 bytes, patch)
2004-03-16 11:35 UTC, Christian Rubbert
Details | Diff
ncurses-5.4-r1.ebuild: make use of filter-ldflags to strip -pie (ncurses-5.4-r1.ebuild-ceed.diff,371 bytes, patch)
2004-03-16 11:35 UTC, Christian Rubbert
Details | Diff
glibc-2.3.3_pre20040207.ebuild: make use of filter-ldflags to strip -pie (glibc-2.3.3_pre20040207.ebuild-ceed.diff,424 bytes, patch)
2004-03-16 11:36 UTC, Christian Rubbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Rubbert 2004-03-16 01:58:48 UTC
Good morning.

filter-flags seems to fail filtering -pie from LDFLAGS which i set as follows in /etc/make.conf: LDFLAGS="${LDFLAGS} -pie"

The packages reproducably affected are for example ncurses and glibc, altough ncurses-5.4-r1 is actively filtering -pie - well, supposed to. When removing the LDFLAGS entry, the build completes fine.

Machines this was tested on:
- Fresh experimental stage1 spp pie install (ncurses fails on scripts/bootstrap-2.6.sh)
- Relatively new (~1 week) install with standard stage3, completely up to date
- cluckj's machine (#gentoo-hardened)

The errors (don't want to clobber up this bug):
- Fresh stage1: http://ceed.de/~ceed/ncurses-error.txt
                http://ceed.de/~ceed/ncurses-emerge-info.txt
- cluckj:       http://ceed.de/~ceed/ncurses-cluckj.txt

Thanks,
Christian Rubbert
Comment 1 solar (RETIRED) gentoo-dev 2004-03-16 07:57:57 UTC
Does this not work for you?


--- /usr/portage/sys-libs/ncurses/ncurses-5.4-r1.ebuild	2004-03-03 13:34:55.000000000 -0500
+++ ncurses-5.4-r1.ebuild	2004-03-11 19:28:55.663034328 -0500
@@ -33,6 +33,7 @@
 	# Shared objects are compiled properly with -fPIC, but
 	# standard libs also require this.
 	64-bit && append-flags -fPIC
+	filter-flags -pie
 
 	# Detect mips systems
 	use mips && gnuconfig_update
Comment 2 Christian Rubbert 2004-03-16 09:46:18 UTC
That's already in standard portage and does not help, the same error crops up.
Comment 3 solar (RETIRED) gentoo-dev 2004-03-16 10:13:19 UTC
lets try this then.

-	filter-flags -pie
+	LDFLAGS="${LDFLAGS/-pie/-nopie}"

http://dev.gentoo.org/~solar/pie-20040314/ncurses-5.4-r1.ebuild.patch
Comment 4 Christian Rubbert 2004-03-16 11:35:08 UTC
Created attachment 27483 [details, diff]
Patch to introduce filter-ldflags into flag-o-matic.eclass
Comment 5 Christian Rubbert 2004-03-16 11:35:44 UTC
Created attachment 27484 [details, diff]
ncurses-5.4-r1.ebuild: make use of filter-ldflags to strip -pie
Comment 6 Christian Rubbert 2004-03-16 11:36:00 UTC
Created attachment 27485 [details, diff]
glibc-2.3.3_pre20040207.ebuild: make use of filter-ldflags to strip -pie
Comment 7 Christian Rubbert 2004-03-16 11:36:41 UTC
I added filter-ldflags to /usr/portage/eclass/flag-o-matic.eclass, and changed the ncurses and glibc ebuilds accordingly. This works for me, and should for everyone :)

See posted diffs.
Comment 8 solar (RETIRED) gentoo-dev 2004-03-16 11:46:25 UTC
Now thats the stuff dreams are made of.
Thanks ceed I'll merge these shortly.
Comment 9 solar (RETIRED) gentoo-dev 2004-03-16 14:12:03 UTC
filter-ldflags() {} added to flag-o-matic
filter-ldflags -pie added to ncurses
filter-ldflags -pie added to glibc