Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 313603 - make.conf needs documentation for build-time variables like ASFLAGS, LDFLAGS, LFLAGS, YFLAGS
Summary: make.conf needs documentation for build-time variables like ASFLAGS, LDFLAGS,...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Documentation (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
Keywords: InVCS
: 307517 (view as bug list)
Depends on:
Blocks: portage-multilib 335925
  Show dependency tree
Reported: 2010-04-07 00:44 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2010-09-22 04:47 UTC (History)
2 users (show)

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

portage-make.conf.5-LDFLAGS.patch (portage-make.conf.5-LDFLAGS.patch,2.08 KB, text/plain)
2010-04-20 13:23 UTC, Nathan Phillip Brink (binki) (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-07 00:44:51 UTC
When a user sees a bug or rhetorical appeal such as bug 129413, he is introduced to the concept of placing a variable which affects the build process of a program. 

It has been standardized, thanks to general use and autoconf, that the LDFLAGS present in make.conf refers to flags that may be passed only to ${CC}. Thus, one sets LDFLAGS="-Wl,--as-needed,-t" instead of LDFLAGS="--as-needed -t". But other flags have much blurrier definitions. Automake claims that CCASFLAGS may be passed to ${CCAS}, where CCAS=${CC} generally. That leaves ASFLAGS to be passed directly to ${AS}.

So it may be argued that if one sets ASFLAGS in make.conf, one must _not_ escape them -- the ASFLAGS must be in a form understandable by ${AS}. Then CCASFLAGS must be recognized and defined such that options needing to be passed to ${AS} must be escaped with -Wa like LDFLAGS are escaped with -Wl.

If setting LDFLAGS, ASFLAGS, or CCASFLAGS at all is unsupported, I think make.conf.example and the make.conf manpage should document this. If otherwise, documentation on the acceptable forms of variables such as ASFLAGS is needed. If it is legal to set ASFLAGS without -Wa as I discussed above, I have some other bugs to file against misbehaving packages :-).

I'm setting this bug to block the portage-multilib tracker because portage-multilib depends on ASFLAGS not requiring -Wa escapes. Whatever judgement is made as a result of this bug will affirm or invalidate portage-multilib's current approach to ASFLAGS.
Comment 1 Zac Medico gentoo-dev 2010-04-07 01:34:32 UTC
*** Bug 307517 has been marked as a duplicate of this bug. ***
Comment 2 SpanKY gentoo-dev 2010-04-19 23:33:39 UTC
make.conf is already cluttered with crap most users could care less about.  LDFLAGS is about the only variable i might include in there, but ASFLAGS/LFLAGS/YFLAGS/etc... have no business.

if you want to document them in some extended document on then that's fine, but make.conf is inappropriate.
Comment 3 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-04-20 13:23:55 UTC
Created attachment 228509 [details]

This attempts to fix documentation just for LDFLAGS.
Comment 4 Zac Medico gentoo-dev 2010-06-10 23:44:38 UTC
(In reply to comment #3)
> Created an attachment (id=228509) [details]
> portage-make.conf.5-LDFLAGS.patch
> This attempts to fix documentation just for LDFLAGS.

Thanks, this is in git now:;a=commit;h=1a716a5f949b84cd8a84871ad7caa9d985fe91fc
Comment 5 Zac Medico gentoo-dev 2010-09-22 04:47:49 UTC
This is fixed in 2.1.9.