This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: Cross compiler questions


On 19.3.2010 11:30, Kai Ruottu wrote:

Ok, in your case the build process would be :

1. build and install binutils, "make ; make install"
2. build and install ONLY GCC, "make all-gcc ; make install-gcc"
3. possibly build and install 'libgcc', "make all-target-libgcc : make install-target-libgcc"

A typo, a colon instead of a semicolon in the previous step 3....


In order to check that the previous simple process, maybe told tens of times on maillists during
the last 15+ years, still works, I followed it strictly, after configuring, building and installing the
GNU binutils with the defaults, I configured, built and installed the current gcc-4.4.3 srcs with
the following (template) script :


../gcc-4.4.3/configure --build=i686-linux-gnu --host=i686-linux-gnu \
--target=ppc-eabi --enable-languages=c,c++ --disable-shared \
--with-gxx-include-dir=/usr/local/include/c++/4.4.3 \
--enable-version-specific-runtime-libs --with-newlib \
--with-pkgversion="by Kai Ruottu 2010q1"
#
make all-gcc
make all-target-libgcc
make install-gcc
make install-target-libgcc

The '--disable-shared' may now be vain, earlier there was a bug which tried to use the shared
'libgcc_s.so.1' with some '*-elf' targets. The default for the (IF being built) place for C++ headers
is now "target specific", not the earlier "common for all targets", the next option restores it. Also
as default the 'libstdc++' libs would be installed gcc-version-independently into the '$prefix/$target/lib',
therefore the next option. Building another GCC version later for the same target would overwrite
the gcc-version-specific 'libstdc++.a's. The '--with-newlib' also belongs to this "generic build template"
and the last tells who to sue if something doesn't work.... Generally the '--enable-languages=c,c++'
could be enough as the only extra configure option.


There was absolutely no problems in the process, I used the last binutils-2.19.51 release for the
binutils....



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