[Toybox] [PATCH] Support HOSTCFLAGS on musl

Rob Landley rob at landley.net
Mon Jun 18 09:23:10 PDT 2012


On 06/14/2012 03:50 AM, orc wrote:
> On Thu, 14 Jun 2012 11:52:00 +1000
> David Seikel <onefang at gmail.com> wrote:
> 
>> On Thu, 14 Jun 2012 01:30:33 +0800 orc <orc at sibserver.ru> wrote:
>>
>>> On Wed, 13 Jun 2012 11:59:23 -0500
>>> Rob Landley <rob at landley.net> wrote:
>>>
>>>> On 06/13/2012 10:02 AM, orc wrote:
>>>>> Sorry for corrupted email. I've attached original patch here.
>>>>
>>>> Could you give me a name for the commit message, please? (I like
>>>> to attribute patches properly.)
>>>>
>>>> Thanks,
>>>>
>>>> Rob
>>>>
>>>
>>> Support kconfig HOSTCFLAGS
>>>
>>> Support HOSTCFLAGS environment variable for building kconfig on musl
>>> system (HOSTCFLAGS=-D_GNU_SOURCE)
>>
>> Rob asked for your name for the commit message, not the commit
>> message.  So that he can say who made the patch.
>>
> 
> I am sorry, I misunderstand that. Just 'orc'.

Sorry for the delay, the weekend got away from me.

I noticed I already have a "CCFLAGS" (from 2007) being applied to
$HOSTCC for building install.c in both Makefile and scripts/install.sh.
It's not being used for the HOSTCC invocations in kconfig, and it seems
to me that means I'm doing it wrong.

Is this a reasonable equivalent to your patch?

--- a/configure	Sat Jun 16 15:16:08 2012 -0500
+++ b/configure	Mon Jun 18 11:16:01 2012 -0500
@@ -11,3 +11,4 @@
 [ -z "$CC" ] && CC=cc
 [ -z "$STRIP" ] && STRIP=strip
 [ -z "$HOSTCC" ] && HOSTCC=gcc
+HOSTCC="$HOSTCC $HOSTCFLAGS"

(And then ripping out the old CCFLAGS stuff which apparently never got
documented.)

It seems easiest to just add the flags straight into the one variable
since it gets expanded and reparsed for whitespace by the existing
scripts. (Admittedly that means if you have path to hostcc with a space
in it, it won't work, but that's already the case and nobody's
complained...)

Rob
-- 
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.

 1340036590.0


More information about the Toybox mailing list