Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 310149 - dev-libs/nss ebuild disregards CFLAGS in bitiness test
Summary: dev-libs/nss ebuild disregards CFLAGS in bitiness test
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: portage-multilib
  Show dependency tree
 
Reported: 2010-03-18 23:37 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2010-03-28 14:50 UTC (History)
0 users

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


Attachments
nss-3.12.5-r1.ebuild-CFLAGS-looknice.patch (nss-3.12.5-r1.ebuild-CFLAGS-looknice.patch,1.00 KB, text/plain)
2010-03-18 23:45 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details

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-03-18 23:37:20 UTC
src_compile() has the following line:
``
$(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o
''

${CFLAGS} should always be passed to the compiler. In particular, uhm, portage-multilib uses CFLAGS to switch ABIs (it uses the -m32 switch when it wants 32-bit code).
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-03-18 23:45:02 UTC
Created attachment 224201 [details]
nss-3.12.5-r1.ebuild-CFLAGS-looknice.patch

I couldn't help but notice that the ebuild also does some weird sed expression stuff with pkg-config which can be avoided using pkg-config's --variable functionaliy ;-)
Comment 2 Jory A. Pratt gentoo-dev 2010-03-23 13:26:56 UTC
The sed expressions are correct if you look at the code. Far as cflags are concerned will look at that later tonight.
Comment 3 Jory A. Pratt gentoo-dev 2010-03-28 02:44:54 UTC
The check is fine as is. The multilib profile should be setting its compiler before the check is made to determine the arch being built for.
Comment 4 Jory A. Pratt gentoo-dev 2010-03-28 02:45:08 UTC
The check is fine as is. The multilib profile should be setting its compiler before the check is made to determine the arch being built for.
Comment 5 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2010-03-28 04:24:56 UTC
(In reply to comment #4)
> The check is fine as is. The multilib profile should be setting its compiler
> before the check is made to determine the arch being built for.

Multilib support in GCC is not the same thing as crosscompiling. In fact, crossdev and portage-multilib are incompatible and will remain so for a while AFAIK.

Bitiness can be affected by CFLAGS. See gcc's manpage for the -m32 and -m64 flags.
Comment 6 Jory A. Pratt gentoo-dev 2010-03-28 14:50:48 UTC
I went ahead and added cflags which I still say is not needed. Will find in -r1 which uses official release media for 12.6