[Top][All Lists]

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

cross compiling newbie questions

From: Steffen DETTMER
Subject: cross compiling newbie questions
Date: Tue, 2 Sep 2008 11:16:57 +0200
User-agent: Mutt/1.4.1i


we use autoconf (and automake) with self-written
scripts since a long time but probably wrong in several aspects.

I hope this is the right place to ask, otherwise please tell!

If I understood correctly, passing --host in general enables
cross compiling.

My question in short:

  How to correctly set mandatory default options like -isystem
  and -nostdlib -lmylibc?

In more detail:

A standard case for us is to use arm-elf-gcc, but the final
result is not (really) ELF. Additionally, there are mandatory
compiler options that need to be set.

We `defined' a name for this, lets say `arm-ingenico-elf_device'
(the value of `device' depends) and use this in case
statements to select options. Is this wrong and how would it be

When arm-elf-gcc (which is symlinked in $PATH as
arm-ingenico-elf_device-gcc and so on) is checked by configure,
lets say some AC_CHECK_FUNCS(), configure by default thinks our
target would support the ANSI-C functions, because it uses the
compilers default C system headers. But later, we overwrite
system includes via CFLAGS and get completely different headers,
we also set -nostdlib and do not use crtbegin.o etc. (if we'd
remove those files, configure would find that the compiler is not

We do want that additionally to the specific --host configure
parameter heaps of variables like CFLAGS= etc must be passed to
configure, because this seems to be difficult to use and it is
redundant (those flags are manadatory for the build target and
thus there is no need to require them as parameters).

How to check compilers/environments with mandatory parameters?

We could workaround by setting/unsetting CPPFLAGS etc. in, but I guess this is the wrong way.

Would a better way to configure the gcc to default to the correct
headers and linker options, and if so, how? Any pointers? I
looked in the GCC documentation but found no way how to configure
defaults (except with command line options of course).

Another way could be to have arm-ingenico-elf_device-gcc etc
being a wrapper passing -isystem etc, but I think this is ugly.

An additional difficulty is that usually we poll the libraries
and system headers from CVS and have it in a subdirectory. I'm
not sure if this matches the philosophy of a `toolchain' - we
have half of it installed and other half of it in the srcdist.
How to use this correctly?

Thanks for reading this.



About Ingenico Throughout the world businesses rely on Ingenico for secure and 
expedient electronic transaction acceptance. Ingenico products leverage proven 
technology, established standards and unparalleled ergonomics to provide 
optimal reliability, versatility and usability. This comprehensive range of 
products is complemented by a global array of services and partnerships, 
enabling businesses in a number of vertical sectors to accept transactions 
anywhere their business takes them. This message may contain confidential and/or privileged 
information. If you are not the addressee or authorized to receive this for the 
addressee, you must not use, copy, disclose or take any action based on this 
message or any information herein. If you have received this message in error, 
please advise the sender immediately by reply e-mail and delete this message. 
Thank you for your cooperation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]