Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360765 - =net-misc/tor-0.2.2.23_alpha-r1 appends CFLAGS="-O2" by itself
Summary: =net-misc/tor-0.2.2.23_alpha-r1 appends CFLAGS="-O2" by itself
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-27 13:20 UTC by Agostino Sarubbo
Modified: 2011-03-28 10:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2011-03-27 13:20:09 UTC
$summary

example:
my current cflags are:
CFLAGS="-march=native"

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..   -I../../src/common     -march=native -Wall -g -O2 -fno-strict-aliasing -march=native -MT address.o -MD -MP -MF .deps/address.Tpo -c -o address.o address.c

It append also -g
Comment 1 Anthony Basile gentoo-dev 2011-03-27 13:29:05 UTC
Okay, I guess the question here is, what do we mean by "respects CFLAGS"?

On =net-misc/tor-0.2.2.23_alpha-r1 (and only that ebuild for experimentation) I made it so the user can override *any* CFLAGS by doing

CFLAGS="-O1" emerge =net-misc/tor-0.2.2.23_alpha-r1

Then you get

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..  -DSHARE_DATADIR="\"/usr/share\"" -DLOCALSTATEDIR="\"/var/lib\"" -DBINDIR="\"/usr/bin\"" -I../../src/common     -O1 -Wall -g -O2 -fno-strict-aliasing -O1 -MT dnsserv.o -MD -MP -MF .deps/dnsserv.Tpo -c -o dnsserv.o dnsserv.c

Notice the -O1 ... -O2 ... -O1.  Since -O1 is last it will override the default -O2.  Thus the user's CFLAGS are respected *over* the build system's default.

What you're asking is that I remove the build system's default CFLAGS of -g and -O2 and respect user CFLAGS.

Let me look at this again.
Comment 2 Agostino Sarubbo gentoo-dev 2011-03-27 13:38:18 UTC
CFLAGS="-march=native" emerge -av tor:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../..   -I../../src/common     -march=native -Wall -g -O2 -fno-strict-aliasing -MT crypto.o -MD -MP -MF .deps/crypto.Tpo -c -o crypto.o crypto.c


-O2 and -g are included :P
Comment 3 Anthony Basile gentoo-dev 2011-03-28 00:24:57 UTC
Please test again.  I did not rev bump tor-0.2.2.23_alpha-r1 because this is a minor change does not affect users who have already compiled tor on their systems.
Comment 4 Agostino Sarubbo gentoo-dev 2011-03-28 10:04:30 UTC
it works!
closed as resolved fixed ;)