Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 446281 - sys-fs/quota-3.17-r1 does not respect CFLAGS during link
Summary: sys-fs/quota-3.17-r1 does not respect CFLAGS during link
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal QA
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: STABLE
Depends on:
Blocks:
 
Reported: 2012-12-06 17:13 UTC by Julian Ospald
Modified: 2014-04-21 10:53 UTC (History)
0 users

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


Attachments
quota-3.17-r1:20121205-182007.log (quota-3.17-r1:20121205-182007.log,44.08 KB, text/plain)
2012-12-06 17:13 UTC, Julian Ospald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2012-12-06 17:13:52 UTC
Created attachment 331661 [details]
quota-3.17-r1:20121205-182007.log

4.00 is affected as well

CFLAGS are missing from linking commands, but gnu docs say they should be included in _every_ gcc invocation. Correct me if I am wrong.

https://www.gnu.org/prep/standards/html_node/Command-Variables.html#Command-Variables
Comment 1 Agostino Sarubbo gentoo-dev 2012-12-06 20:30:21 UTC
gcc don't uses CFLAGS at link time, so, apart the gnu docs, for me is not a bug..
Comment 2 Julian Ospald 2012-12-06 21:31:23 UTC
(In reply to comment #1)
> gcc don't uses CFLAGS at link time, so, apart the gnu docs, for me is not a
> bug..

that's what I thought, but
a) it would only be true if all source files have been compiled prior to the gcc linking command and
b) I see QA files bug for this too


also: usually autotools standard behavior is to include cflags in all gcc invocations, same for libtool
Comment 3 SpanKY gentoo-dev 2012-12-24 02:32:58 UTC
(In reply to comment #1)

that's not really true.  gcc knows nothing of $CFLAGS or $LDFLAGS or such variables.  people often times put flags into $CFLAGS that implicitly affect linking steps w/out also putting them into $LDFLAGS.  we're not talking about just ABI flags but even simple stuff you might not realize *do* affect linking like -pthread or -fopenmp.
Comment 4 Agostino Sarubbo gentoo-dev 2012-12-31 23:11:44 UTC
(In reply to comment #3)
> (In reply to comment #1)
> 
> that's not really true.  gcc knows nothing of $CFLAGS or $LDFLAGS or such
> variables.  people often times put flags into $CFLAGS that implicitly affect
> linking steps w/out also putting them into $LDFLAGS.  we're not talking
> about just ABI flags but even simple stuff you might not realize *do* affect
> linking like -pthread or -fopenmp.

@mike

If these people will put linking stuff into CFLAGS, it's _obviously_ that they will put $(CFLAGS) into linking process.

So, viceversa if there isn't $(CFLAGS) into linking 'string' means that in CFLAGS there is nothing that can interest the linking process.

If there are people that put linking stuff into CFLAGS and they omit $(CFLAGS) from the linking process please let me know.
Comment 5 SpanKY gentoo-dev 2013-01-08 16:49:36 UTC
(In reply to comment #4)

you missed my point.  there are many gcc flags which obviously affect compiler output (e.g. -pthread or -fopenmp) but which are not obvious that they also affect linking steps.  hence it is not uncommon for people to put them into CFLAGS and forget about LDFLAGS, especially when the linking behavior only happens on some platforms.

i'm not talking about flags that are obviously linking related (like -lfoo or -Wl,-z,...).
Comment 6 Julian Ospald 2013-01-08 17:26:09 UTC
yeah, but after talking with QA about this too I think it's mostly not worth a bug report unless it becomes an actual issue for a package
Comment 7 SpanKY gentoo-dev 2013-01-09 20:04:13 UTC
(In reply to comment #6)

that depends on what you mean by "isn't an issue".  if you have a toolchain which supports multiple ABIs and attempt to build with CFLAGS=<abi selector>, all packages (like this one) will most likely fail to link, or produce an unusable executable.  we know this as a fact.

if you mean you just want to wait for someone to complain, i suspect most people won't bother.  they'll hack it up or do something else until it happens to work.
Comment 8 Julian Ospald 2014-04-21 10:53:40 UTC
+  21 Apr 2014; Julian Ospald <hasufell@gentoo.org> quota-4.01.ebuild,
+  +files/quota-4.01-cflags.patch:
+  respect CFLAGS in linking command wrt #446281