Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 241064 - net-misc/freenet6: C(XX)FLAGS are ignored (at src_configure/compile)
Summary: net-misc/freenet6: C(XX)FLAGS are ignored (at src_configure/compile)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-10 11:26 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2008-11-28 15:57 UTC (History)
0 users

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


Attachments
Tentative, partial, untested ebuild patch (freenet6-ebuild.patch,1.64 KB, patch)
2008-10-15 10:08 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-10-10 11:26:31 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 Bernard Cafarelli gentoo-dev 2008-10-15 08:54:33 UTC
It's "set in stone" in src_unpack indeed (20 lines of sed kindly provided by jakub), time to review my makefile manual I guess...
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-10-15 10:08:22 UTC
Created attachment 168550 [details, diff]
Tentative, partial, untested ebuild patch

This patch is very untested but it might be a nice place to start. I didn't check for the CFLAGS handling in the Makefiles though; if you see you're having trouble to get them to behave let me know.
Comment 3 Bernard Cafarelli gentoo-dev 2008-11-28 15:57:59 UTC
New version has a few Makefile cleanups, and it now compiles with correct flags :)

Fixed in net-misc/freenet6-6.0_beta4, thanks for the report and initial patch!