tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cross compiling and crtbeginS.o




To: tech-toolchain%netbsd.org@localhost

Subject: cross compiling and crtbeginS.o

From: Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>

Date: Tue, 26 Feb 2008 19:48:34 +1300


Hi all,
I'm cross compiling NetBSD for a
n embedded platform. I've been eyeing  up the MK* variables listed in share/mk/bsd.README. One that caught  my eye is MKGCC=no. I won't need to run GCC on the target  environment, so why waste time compiling it?

There seems to b
e some confusion over where crtbeginS.o (and  crtendS.o) fit into the scheme of things.

gnu/lib/cr
tstuff4/Makefile will not do anything if MKGCC=no with the  comment "If using an external toolchain, we expect crtbegin/crtend to  be supplied by that toolchain's run-time support". OK.

share/mk/
bsd.lib.mk unconditionally refers to ${_GCC_CRTBEGINS} and $  {_GCC_CRTENDS} which in turn seems to cause problems generating  dependencies because make can't work out how these files should be  built. I can fix this by putting .if ${MKGCC} != no ... in share/mk/  bsd.lib.mk. OK.

Then we fail
 to create libc.so.12.149 because $TOOLDIR/bin/arm--  netbsdelf-gcc doesn't have it's own copy of crtbeginS.o. I created  one after reading tools/gcc/README.mknative and added an appropriate -  B flag the link line for libc.so.12.149 at which point libgcc_pic  couldn't be found.

Is it my imag
ination, or am I the first person to use MKGCC=no with  the new(ish) tools infrastructure?

Am I ri
ght in guessing that the only real solution is to have a full  installation of GCC for cross compilation?

Cheers,
Lloyd
p.s. I'm cross compiling
 from NetBSD/amd64 4.0 to NetBSD/evbarm 4.0,  but I don't think that will make a difference.



Follow-Ups:

re: cross compiling and crtbeginS.o
From: matthew green




Prev by Date: re: C++ binary compatibility problems after gcc update?

Next by Date: re: cross compiling and crtbeginS.o

Previous by Thread: C++ binary compatibility problems after gcc update?

Next by Thread: re: cross compiling and crtbeginS.o

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index