[Fedora-packaging] Removing of unwanted compiler flags from $RPM_OPT_FLAGS

Tom 'spot' Callaway tcallawa at redhat.com
Mon Sep 11 18:12:35 UTC 2006


On Mon, 2006-09-11 at 19:40 +0200, Jochen Schmitt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> becouse I have to find out, that some packages like blender have
> trouble if you are specify $RPM_OPT_FLAGS I have tried to search
> a method to remove selected compiler options from $RPM_OPT_FLAGS.
> 
> My suggestion to solve this problem you may find at
> 
> http://www.fedoraproject.org/wiki/JochenSchmitt/RemoveCFlagsFromRpmOptFlags#preview
> 
> I will be happy for any comment and improvements.

That seems like serious overkill. Gambas can't build with the
FORTIFY_SOURCE flag, so I remove it like this:

# Gambas can't deal with -Wp,-D_FORTIFY_SOURCE=2
CFLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g'

Thats it. No extra shell scripts necessary. :)

~spot
-- 
Tom "spot" Callaway || Red Hat || Fedora || Aurora || GPG ID: 93054260

"We must not confuse dissent with disloyalty. We must remember always
that accusation is not proof and that conviction depends upon evidence
and due process of law. We will not walk in fear, one of another. We
will not be driven by fear into an age of unreason, if we dig deep in
our history and our doctrine, and remember that we are not descended
from fearful men -- not from men who feared to write, to speak, to
associate and to defend causes that were, for the moment, unpopular."
-- Edward R. Murrow, March 9, 1954




More information about the Fedora-packaging mailing list