# @FUNCTION: strip-flags # @DESCRIPTION: # Strip C[XX]FLAGS of everything except known good/safe flags. however, it's implementation: for var in $(all-flag-vars) ; do where all-flag-vars() returns amongst others LDFLAGS. I need my -L and -R/-Wl,-rpath directions to get a non-crashing binutils during Prefix bootstrap, so please either: a) update desc for strip-flags, and add -L/-R/-Wl,-rpath, to allowed flags, or b) restrict strip-flags to only C[XX]FLAGS, as per description, or c) suggest a backdoor which I can use to get binutils linked against the correct libraries
yes, the documentation needs updating, but the underlying change was on purpose allowing those linker flags should be fine
how about something like this? Index: flag-o-matic.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v retrieving revision 1.169 diff -u -r1.169 flag-o-matic.eclass --- flag-o-matic.eclass 26 Feb 2012 12:09:44 -0000 1.169 +++ flag-o-matic.eclass 5 May 2012 08:37:49 -0000 @@ -20,7 +20,7 @@ echo {C,CPP,CXX,CCAS,F,FC,LD}FLAGS } -# {C,CXX,F,FC}FLAGS that we allow in strip-flags +# {C,CPP,CXX,CCAS,F,FC,LD}FLAGS that we allow in strip-flags # Note: shell globs and character lists are allowed setup-allowed-flags() { ALLOWED_FLAGS="-pipe" @@ -52,6 +52,9 @@ # 4.6 ALLOWED_FLAGS+=" -mno-fsgsbase -mno-rdrnd -mno-f16c -mno-bmi -mno-tbm" + # LDFLAGS + ALLOWED_FLAGS+=" -L* -R* -Wl,*" + export ALLOWED_FLAGS return 0 } @@ -311,7 +314,8 @@ # @FUNCTION: strip-flags # @DESCRIPTION: -# Strip C[XX]FLAGS of everything except known good/safe flags. +# Strip *FLAGS of everything except known good/safe flags. This runs over all +# flags returned by all_flag_vars(). strip-flags() { local x y var Should things like -Wa,* be also allowed?
ping
(In reply to comment #2) LGTM
thanks, comitted