fedoras default cflags & clang

Richard W.M. Jones rjones at redhat.com
Thu May 29 21:03:50 UTC 2014

On Thu, May 29, 2014 at 04:28:18PM -0400, Tim St Clair wrote:
> I've been seeing this bug crop up in many circles: 
> https://bugzilla.redhat.com/show_bug.cgi?id=1099282
> Many folks like to use clang as their primary compiler for various
> reasons, is there anyone who knows a workaround or fix?

If you're building RPMs locally, you can drop your own definition of
__global_cflags into '~/.rpmmacros':

%__global_cflags    -O2 -g ..etc..

If you are building a package that uses an autoconf-generated
configure script, then simply setting CFLAGS before running configure
should be enough, eg:

    rpm --eval '%{__global_cflags}' |
      sed 's/-fstack-protector-strong//'
  )" \


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.

More information about the devel mailing list