Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 241080

Summary: net-misc/redir: C(XX)FLAGS are ignored (at src_configure/compile)
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: darkside, espen.hustad
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Respect user set CC, CFLAGS and LDFLAGS, and various other QA fixes
Respect user set CC, CFLAGS and LDFLAGS, and various other QA fixes.

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-10-10 11:30:34 UTC
I don't know the build system for this program (and this is a generic bug template so I cannot tell you which program exactly is), but my tests shows that it's not respecting CFLAGS (or CXXFLAGS) properly.

Please look into it, since it's important to respect user CFLAGS and CXXFLAGS.

Warning: this bug might look like a false positive because you actually have your CFLAGS being used; this happens if the CFLAGS are "set in stone" in the build system during src_unpack/src_prepare. While QA has not as of this moment expressed to me a preference, I'd sincerely suggest to avoid the set-in-stone approach, so that ebuild commands could work to reproduce the actual results.

To avoid the set in stone approach:

- consider just changing CFLAGS= to CFLAGS+= if the build system enables warnings;
- if the buildsystem does not use CFLAGS variable at all, in the sed use '$(CFLAGS)', single quoted, so that the CFLAGS variable is picked up;
- use '$(OPTCFLAGS)' in the sed and then use make OPTCFLAGS=$CFLAGS.

Thanks,
Diego
Comment 1 Espen Hustad 2009-05-17 20:05:46 UTC
Created attachment 191581 [details, diff]
Respect user set CC, CFLAGS and LDFLAGS, and various other QA fixes

This also fixes bug #241016
Comment 2 Espen Hustad 2009-05-20 23:16:21 UTC
Created attachment 191963 [details, diff]
Respect user set CC, CFLAGS and LDFLAGS, and various other QA fixes.

This also fixes bug #241016
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-05-30 02:00:43 UTC
Does that emake line really fix the stripping issue?
Comment 4 Espen Hustad 2009-05-30 02:16:59 UTC
Yes, see below.

espen@suspended ~/Development/gentoo/redir-2.2.1 $ grep LDFLAGS Makefile
LDFLAGS = -s
        ${CC} ${LDFLAGS} -o redir ${OBJS} ${LIBS}

I have also tested the ebuild with the patch applied. :)
Comment 5 Pacho Ramos gentoo-dev 2012-02-26 12:24:21 UTC
  30 May 2009; Jeremy Olexa <darkside@gentoo.org> redir-2.2.1.ebuild:
  (non maintainer commit) Respect flags and QA fixes, bug 241080 by Espen Hustad