[ECOS] --with-gxx-include-dir option

Bart Veer bartv@ecoscentric.com
Mon Mar 24 21:44:00 GMT 2003

>>>>> "Teo" == Teo Han Wei <thanwei@rfnetech.com> writes:

    Teo> I know this is a GCC problem, but I thought some of you guys
    Teo> out there might be able to help. I'm tring to run ecos on my
    Teo> board, and I'm stuck at building the toolchain.

    Teo> I am currently trying to build the toolchain for my
    Teo> mipsisa32-elf target, on a redhat linux machine.

First, have you tried the prebuilt mipsisa32-elf toolchain provided by
eCosCentric? The install script for the eCos 2.0beta release allows
you to install various prebuilt toolchains, see

    Teo> No problems with binutils.

    Teo> Building GCC though gave me problems when i use the
    Teo> --with-gxx-include-dir option to configure GCC, as stated in
    Teo> "Building a toolchain for use with eCos" under the GCC build
    Teo> instructions. Its either segmentation fault, or some internal
    Teo> compiler error etc.

    Teo> I've then removed the --with-gxx-include-dir option and
    Teo> everything went well.

    Teo> My question is , if the option is necessary, and what impact
    Teo> does it have on my system if I were to remove it?

The short answer is that --with-gxx-include-dir is optional, you can
safely remove it.

Now for the not so short answer. This configuration option controls
where the C++ header files like <new> get installed. The default
location is in $(PREFIX)/include. That is fine for building a native
toolchain. For building a cross-compiler it is not quite right:
$(PREFIX)/include is for host-side header files, and <new> is a
target-side header file. Hence for the toolchains we build we specify
--with-gxx-include-dir and put the C++ headers somewhere more
appropriate. A useful side effect is that this allows us to remove all
of $(PREFIX)/include from the download tarballs, saving bandwidth,
since there is no longer anything in that directory which is needed
for cross compilation.

Specifying --with-gxx-include-dir only really affects two things. The
generated makefile will place the C++ headers in the specified
location. Also <target>-g++ has some built-in paths to help it find
things like the C++ header files, so some of those built-ins will
change. I have no idea why any of this would cause a segmentation


Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list