Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 240884 - net-dns/maradns: C(XX)FLAGS are ignored (at src_configure/compile)
Summary: net-dns/maradns: 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: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 22:00 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-07-29 00:17 UTC (History)
1 user (show)

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


Attachments
patch to pull CFLAGS from environment during the build (maradns-CFLAGS.patch,432 bytes, patch)
2010-02-09 21:35 UTC, Patrick McLean
Details | Diff
fixed patch to use CFLAGS from environment (maradns-CFLAGS.patch,432 bytes, patch)
2010-02-09 21:37 UTC, Patrick McLean
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-09 22:00:18 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 Justin Lecher (RETIRED) gentoo-dev 2009-05-23 09:42:47 UTC
Does this apply to all versions?
It it affect version 1.2.12.10, please block bug 270908.
Comment 2 Patrick McLean gentoo-dev 2010-02-09 21:35:03 UTC
Created attachment 219027 [details, diff]
patch to pull CFLAGS from environment during the build

This appears to be due to the author using the "set in stone" approach. This should fix the problem.
Comment 3 Patrick McLean gentoo-dev 2010-02-09 21:37:44 UTC
Created attachment 219029 [details, diff]
fixed patch to use CFLAGS from environment

Had the diff reversed on the previous patch, oops
Comment 4 MATSUU Takuto (RETIRED) gentoo-dev 2010-07-29 00:17:48 UTC
1.4.03 in cvs