[lfs-support] make check for glibc

Baho Utot baho-utot at columbus.rr.com
Wed Jan 23 11:39:23 PST 2013


On 01/23/2013 02:22 PM, Baho Utot wrote:
> On 01/23/2013 02:10 PM, Bruce Dubbs wrote:
>> Baho Utot wrote:
>>> On 01/23/2013 12:43 PM, Philippe Delavalade wrote:
>>>> Hi.
>>>>
>>>> When testing glibc in chapter 6, i obtain an error which looks like one of
>>>> those signaled in the book but :
>>>>
>>>> make[2]: *** [/sources/glibc-build/rt/tst-cputimer1.out] Error 1
>>>> make[1]: *** [rt/tests] Error 2
>>>>
>>>> Another error is marked as (ignored) but does not appear in the book :
>>>>
>>>> make[2]: [/sources/glibc-build/conform/run-conformtest.out] Error 1 (ignored)
>>>>
>>>> I guess I can go ahead but if someone can confirm :-)
>>>>
>>>> Thanks.
>>>>
>>> Are you on i686 or x86_64?
>>>
>>> I always had errors on i686 until I compiled glibc with  the following
>>> CFLAGS and CXXFLAGS
>>>
>>> -O2 -g -march=i486 -mtune=i686 -pipe
>>>
>>> Using those flags gives me a clean check with no errors at all.
>> -march overrides -mtune.  The later is only used if there is no
>> appropriate -march setting (rarely).

-march=cpu-type
Generate instructions for the machine type cpu-type. In contrast to 
-mtune=cpu-type, which merely tunes the generated code for the specified 
cpu-type, -march=cpu-type allows GCC to generate code that may not run 
at all on processors other than the one indicated. Specifying 
-march=cpu-type implies -mtune=cpu-type.

-mtune=cpu-type
Tune to cpu-type everything applicable about the generated code, except 
for the ABI and the set of available instructions. While picking a 
specific cpu-type schedules things appropriately for that particular 
chip, the compiler does not generate any code that cannot run on the 
default machine type unless you use a -march=cpu-type option. For 
example, if GCC is configured for i686-pc-linux-gnu then -mtune=pentium4 
generates code that is tuned for Pentium 4 but still runs on i686 machines.




> if I use -march=i686 mtune=i686 then the checks are not clean and
> several fail
>
>
>> -pipe is build optimization and doesn't do anything for the generated
>> code.
>>
>> -g adds debugging info.  Probably not needed and removed later with the
>> strip command.
>>
>>      -- Bruce
>>




More information about the lfs-support mailing list