[PATCH] fix cc_ge and cc_le

Bernhard Fischer rep.nop at aon.at
Mon Mar 13 18:46:59 UTC 2006


On Mon, Mar 13, 2006 at 01:06:36PM -0500, Rob Landley wrote:
>On Monday 13 March 2006 12:13 pm, Cristian Ionescu-Idbohrn wrote:
>> On Mon, 13 Mar 2006, Rob Landley wrote:
>> > On Monday 13 March 2006 1:43 am, Denis Vlasenko wrote:
>> > > Without this fix, make thinks that
>> > >
>> > > gcc 3.4.3 <= gcc 4.0.0
>> >
>> > Um, gcc 3.4 _is_ less than gcc 4.0, isn't it?
>> >
>> > > is not true.
>> >
>> > I'm confused.
>>
>>   # Check if CC version is greater or equal than given MAJOR,MINOR
>>   define cc_ge
>>   $(shell [ $(CC_MAJOR) -ge $(1) -a $(CC_MINOR) -ge $(2) ] && echo y)
>>   endef
>>
>> The macro wants both CC_MAJOR _and_ CC_MINOR greater-or-equal.
>
>Ah, that makes sense.
>
>> If current gcc is 4.0 and $(call cc_ge,3,4), ...),
>> [ $(CC_MAJOR) -ge $(1) ] is true, but [ $(CC_MINOR) -ge $(2) ] is false.
>>
>> Maybe this is better:
>>
>> define cc_ge
>> $(shell [ `expr $(CC_MAJOR) \* 100 \+ $(CC_MINOR)` -ge \
>> 	  `expr $(1) \* 100 \+ $(2)` ] && echo y)
>> endef
>
>That dies with:
>/bin/sh: line 0: [:         : integer expression expected

I'm about to revert the whole stuff back to rev.14406, so this all is
moot as there is no such thing as cc_ge or cc_le in a moment.
>
>Rob
>-- 
>Never bet against the cheap plastic solution.
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox
>



More information about the busybox mailing list