Subject: Need help: Out-of-tree cross compilation.
To: None <firstname.lastname@example.org>
From: marty fouts <email@example.com>
Date: 05/26/2006 11:39:23
I've confused myself and need advice.
I'm trying to set up a build system that allows me to build
applications out-of-tree but cross compiled for NetBSD, because I need
to crosscompile aps for NetBSD on a Linux box, as I've mentioned
I've looked at the log output from a system build, and, as far as I
can tell, the Makefile below duplicates the command arguments
necessary for the crosscompile.
I get a hello binary, and it looks fine, except that it's missing the
elf section with the NetBSD note, which, I presume, is the reason why
NetBSD gives a 'wrong architecture' message and refuses to run the
What is the last bit of magic I'm missing in my compilation to make
the binary a NetBSD binary?
Here's the makefile (cut'n'paste, so tabs are screwed up)
CFLAGS=-nostdinc -isystem ../netbsd_quilt/src/obj/destdir.evbarm/usr/include
$(LD) $(LDFLAGS) -o hello $(LDFLAGS1) hello.o $(LIBS)
$(CC) $(CFLAGS) -c hello.c