[haiku-development] Re: C runtime libs

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: Haiku Development ML <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 13 Mar 2016 16:56:58 -0400

On Mar 13, 2016 4:39 PM, "Tim Kelly" <gtkelly@xxxxxxxxxxxxxxxxx> wrote:

I see that Haiku has crti.o and crtn.o, so I set the compiler to tell ld
to link against them:

Yes, why are you doing that manually?

ld -o hello_pcc -v -d -dynamic-linker /system/haiku_loader -e __start
crti.o /tmp/ctm.n99jQw -L/boot/system/develop/lib
-L/boot/system/develop/lib/x86
-L/system/non-packaged/lib/pcc/i586-pc-haiku/1.2.0.DEVEL/lib/ -L/usr/lib/
-lbe -lpccsoftfloat -lpcc -lbe crtn.o
GNU ld version 2.17-haiku-2013_04_21
ld: crti.o: No such file: No such file or directory

You probably need to specify an absolute path. Also, .../lib and
.../lib/x86 are 2 different things - the former has GCC2 ABI libs, the
latter has GCC4 ABI libs.

Haiku's internal build toolchains in general are rather complex due to the
dual ABIs; so unless you really, really, REALLY know what you're doing,
it's a thousand times better to let the linker and compiler decide
everything for you.

-waddlesplash

Other related posts: