This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --host versus --target


Thank you, Michael and Yann, for the quick and detailed responses!

I wasn't aware there existed different strategies for putting together
a cross-root-filesystem, I'm quite happy you took the time to list
them. Ironically, looking through the list (and I realize you're not
going to agree) I think option #1 is the best. Having recently put in
the time to put together such an image, I can attest it was quite a
pain getting the various packages to compile correctly. If I was
_really_ lucky, what I was trying to compile would have autotools
support, but even then CFLAGS would often not be handled correctly. So
specifying a value for CFLAGS on the cmdline would often clobber flags
the package needed to compile correctly. Then, I would often
additionally need to specify "-L" options so the linker so it could
find the libraries against which I wanted to link (why the link step
wouldn't work even though I was providing --sysroot is a bit of a
mystery still). If the package used C++ I would then have to
determine/guess if I needed to use CPPFLAGS, CXXFLAGS, or CCFLAGS.

I can appreciate you have your reasons for not liking option 1, but
from my point of view: for what other purpose does the cross-compiler
exist other than to create a cross-filesystem? It's not like I'm going
to then use the cross-compiler to cross-compile random bits and pieces
which aren't going to be put on the image anyway, so preserving its
integrity is irrelevant to me. Besides, for all the effort and
trail-and-error it would save me, I'd rather just rebuild the cross
toolchain and have multiple copies of it installed on my development
machine if I needed a pristine one or was putting together multiple
images. I'm guessing there are probably other reasons?

I'm assuming, however, to use option 1 I would need to specify the
toolchain's sysroot directory as the --prefix? Won't that mess up the
dynamic loader on the target (although if all libraries are installed
to $SYSROOT/lib and $SYSROOT/usr/lib I'm guessing it'll just work)?

Best regards,
    Trevor

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]