[Bug 1084813] Review Request: gnubatch - Provides enhanced job control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1084813



--- Comment #15 from Michael Schwendt <bugs.michael@xxxxxxx> ---
> Initially I thought the include statements where not correct 

That sounds correct.

Indeed, it's overriding a CFLAGS definition (and any -I… options in there)
instead of _adding_ to existing CFLAGS (as defined in either Makefiles or the
configure script):

| gcc -O -g -Wall -fno-stack-protector  -I.. -I../src/hdrs   -c
| -o helpparse.o helpparse.c

Compare with the build using modified CFLAGS:

| gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
| -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
| -m64 -mtune=generic   -c -o helpparse.o helpparse.c

Here's how it sets the variables:

$ grep CFLAGS util/Makefile.in 
CCFLAGS        =    -O @gcc_useful_options@ @funny_compiler_options@
CFLAGS        =    $(CCFLAGS) -I$(BASE) -I$(HDRS)
    -$(CC) -c -o $@ $(CFLAGS) $(GTKINCL) xhostedit.c


Multiple options:

 * Contact upstream and request a Makefile variable that could be used to
append to CFLAGS at either configure-time or make-time.

 * Patch every file to achieve the same using either += or a new variable. That
could get tedious.

 * An old-school hack to change and reapply configure script settings. I've
noticed the script substitutes the @gcc_useful_options@ variable, so currently
that one can be changed to add something:

  %configure
  sed -i 's!\(.*gcc_useful_options.*\)"$!\1 \${RPM_OPT_FLAGS}"!' config.status
; ./config.status
  make RPM_OPT_FLAGS="%{optflags}"

Usually it's a good idea to add a grep-based guard before or after the sed
substitution.

As I'm not familiar with past gnubatch releases it could be that this hack will
not work anymore for future releases.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review





[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]