Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] net-misc/pimd RFC for new ebuild
Date: Wed, 20 Jul 2011 02:31:08
Message-Id: 20110720022953.GA4075@comet
In Reply to: Re: [gentoo-dev] net-misc/pimd RFC for new ebuild by Mike Frysinger
1 On 14:40 Tue 19 Jul , Mike Frysinger wrote:
2 > On Tue, Jul 19, 2011 at 14:32, Kacper Kowalik wrote:
3 > > W dniu 19.07.2011 19:31, Donnie Berkholz pisze:
4 > >> On 11:43 Sun 17 Jul     , Kacper Kowalik wrote:
5 > >>> W dniu 17.07.2011 10:45, Kfir Lavi pisze:
6 > >>>> src_compile() {
7 > >>>>     emake CC=$(tc-getCC) || die
8 > >>>> }
9 > >>>
10 > >>> Some systems export CC as "gcc -m64".
11 > >>
12 > >> I guess I'm a little confused here. What exactly is the problem and fix
13 > >> you're proposing? You stopped halfway through, there should've been a
14 > >> part at the end that said:
15 > >>
16 > >> ", so you need to do XX to avoid YY from happening".
17 > >
18 > > Use quotes: CC="$(tc-getCC)". Without it you could get emake CC=gcc -m64
19 > > and that would of course fail.
20 >
21 > CC="gcc -m64" is a fairly questionable setting in the first place
22 > (you're most likely doing something wrong/stupid already), but quoting
23 > the CC arg on the cmdline as suggested is the right thing.
24
25 Ah, yeah, I was forgetting that an extra level of quoting is required
26 for that use. Weren't we just saying that `VAR=foo emake` would be
27 better than `emake VAR=foo`, though, to avoid screwing up packages that
28 mangle those variables? And in that case I don't think it would need
29 quotes.
30
31 --
32 Thanks,
33 Donnie
34
35 Donnie Berkholz
36 Council Member / Sr. Developer
37 Gentoo Linux
38 Blog: http://dberkholz.com