Re: Compiling BETA2 with clang fails

From: Olivier Smedts <olivier_at_gid0.org>
Date: Tue, 6 Sep 2011 14:34:19 +0200
2011/9/6 Dimitry Andric <dim_at_freebsd.org>:
> On 2011-09-05 06:01, Volodymyr Kostyrko wrote:
> ...
>>>
>>> You should not unconditionally add -fPIC. Remove it, and try again.
>>> (The -Qunused-arguments is fine, btw.)
>>
>> 0k, here you go. Just as you say - no -fPIC, no ccache, no anything.
>
> ...
>>
>> /usr/obj/usr/src/tmp/usr/lib/crt1.o: In function `_start1':
>> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x7d): undefined reference to
>> `atexit'
>> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x84): undefined reference to
>> `_init_tls'
>> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x90): undefined reference to
>> `atexit'
>> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0xad): undefined reference to
>> `exit'
>
> Hm, sorry that I did not notice it before, but maybe you are having the
> issue described here:
>
> http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026594.html

I think it's more like the following issue, which is not new :
http://lists.freebsd.org/pipermail/freebsd-current/2011-May/024509.html

I personally avoid -march=native with clang on recent CPUs, and use
-march=core2 instead on a Core2 and a Corei7.

-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: olivier_at_gid0.org        - against HTML email & vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  "Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas."
Received on Tue Sep 06 2011 - 10:34:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC