[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: followup to segfault/builtin_expect
From: |
Andreas Jaeger |
Subject: |
Re: followup to segfault/builtin_expect |
Date: |
14 Jan 2001 15:13:19 +0100 |
User-agent: |
Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.1 (Channel Islands) |
>>>>> David Ford writes:
> Andreas Jaeger wrote:
>> >>>>> David Ford writes:
>>
>> > I checked an older compile, of 2.2, and the config.log.
>> > HAVE_BUILTIN_EXPECT is undefined in the previous compile and the
>> > config.log shows a failure for it, however the config.h had it defined.
>>
>> > I undefined it and commented it out. I'd recommed someone taking a peek
>> > at the configure script to figure out why the failure resulted in a
>> > success.
>>
>> Please check it for yourself - it seem to work for everybody else.
>> The program is very simple:
>>
>> int foo (int a)
>> {
>> a = __builtin_expect (a, 10);
>> return a == 10 ? 0 : 1;
>> }
>>
>> Compile it with your comiler and check what happens.
[...]
> # gcc -o t t.c
> /lib/crt1.o: In function `_start':
> /lib/crt1.o(.text+0x18): undefined reference to `main'
> /var/tmp/ccEfOlLm.o: In function `foo':
> /var/tmp/ccEfOlLm.o(.text+0x10): undefined reference to `__builtin_expect'
> As expected. It is undefined. The problem is configure built a config.h
> with
> HAVE_BUILTIN_EXPECT defined even though the configure script did not succeed
> at this:
> configure:3160: checking for __builtin_expect
> configure:3173: gcc -nostdlib -nostartfiles -o conftest conftest.c -lgcc >&5
> /usr/local/bin/ld.orig: warning: cannot find entry symbol _start; defaulting
> to
> 08048080
> /var/tmp/ccbv0Ssj.o: In function `foo':
> /var/tmp/ccbv0Ssj.o(.text+0x10): undefined reference to `__builtin_expect'
I just tried it on my system (i686-linux) and everything works fine.
I get the same output in configure - but config.h is fine.
Since this doesn't work for you and I can't reproduce it, please check
exactly why configure fails. It might be that your /bin/sh is broken.
Andreas
--
Andreas Jaeger
SuSE Labs address@hidden
private address@hidden
http://www.suse.de/~aj