Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Petazzoni
530777aaeb gcc: provide option to enable mudflap support
The mudflap library is only useful if one uses the -fmudflap gcc
option to do more checks on pointers/arrays. This commit adds an
option to enable/disable mudflap support at the gcc level. By default,
it is disabled, which saves a little bit of build time compared to the
default of gcc which consists in enabling mudflap support.

Since mudflap is now disabled by default, and ensured to never be enabled
on platforms where it is not available, some gcc.mk code that was used to
disable mudflap in problematic configurations can be removed.

Whether -fmudflap is used when building is left to the user.

[Peter: tweak commit text, fix white space]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 23:24:35 +02:00
Thomas Petazzoni
df9bbb779f gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro
Each stage of the gcc build needs to make a small dance before the
configuration step to create a build sub-directory and a symbolic link
to the configure script. The common gcc.mk had a
HOST_GCC_CONFIGURE_SYMLINK already used by the gcc-initial and
gcc-intermediate steps, but the gcc-final step wasn't using it.

This commit fixes this inconsistency, and therefore removes the
HOST_GCC_FINAL_CONFIGURE_SYMLINK macro.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 23:01:06 +02:00
Thomas Petazzoni
14a2d0b5ab toolchain: add support for glibc
The support for eglibc 2.17 was added to the internal toolchain
backend for 2013.08. This commit now adds glibc 2.18 support to the
internal toolchain backend.

Since the building procedure is very similar to the one of eglibc, we
have renamed the 'eglibc' package to 'glibc', and made it capable of
handling either glibc or eglibc.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 22:58:37 +02:00
Thomas Petazzoni
cd04552e89 gcc: fix Objective-C support
This commit fixes the Objective-C support in the gcc package by making
sure that the runtime Objective-C library is properly installed to the
target.

It also takes this opportunity to slightly reword the Config.in option
help text to have a more meaningful explanation.

Finally, it fixes the gcc-final.mk code to use the correct
BR2_INSTALL_OBJC option rather than the non-existing
BR2_GCC_CROSS_OBJC option, to decide whether Objective-C support
should be enabled or not in the cross-compiler.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 22:57:29 +02:00
Thomas Petazzoni
69a534b2aa gcc: fix Fortran support
This commit fixes the Fortran support in the gcc package by making
sure that the runtime Fortran library is properly installed to the
target.

It also takes this opportunity to slightly reword the Config.in option
help text, to no longer mention gcc < 4.2 since they are no longer
supported in Buildroot, and to have a more meaningful explanation.

Finally, it fixes the gcc-final.mk code to use the correct
BR2_INSTALL_FORTRAN option rather than the non-existing
BR2_GCC_CROSS_FORTRAN option, to decide whether Fortran support should
be enabled or not in the cross-compiler.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-15 22:54:41 +02:00
Peter Korsgaard
5128cc6602 gcc: pass MAKEINFO=missing in the environment rather than as a ./configure arg
Fixes a build issue with the avr32 toolchain:

http://jenkins.free-electrons.com/job/buildroot/config=atngw100_defconfig/104/

Invalid configuration `MAKEINFO=missing': machine `MAKEINFO=missing' not
recognized

Instead pass it in the environment of ./configure, similar to how it was
done originally in 62322acb2c (toolchain/gcc: disable makeinfo).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-04 16:22:30 +02:00
Markos Chandras
027ef3f2b2 gcc-final: Drop obsolete code for handling lib64
Since 5628776c4a
"toolchain-external: fix lib64 symlinks"

lib64 is a symlink to lib so there is no reason to copy the libraries
to lib64 anymore. This fixes multiple building problems
for buildroot toolchains:

[...]
mv: 'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib64/libuClibc-0.9.33.2.so'
and 'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib/libuClibc-0.9.33.2.so'
are the same file
mv: 'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib64/libutil-0.9.33.2.so'
and 'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib/libutil-0.9.33.2.so'
are the same file
mv: 'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib64/libutil.so.0'
and 'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib/libutil.so.0'
are the same file
rmdir: failed to remove
'output/host/usr/mips64-buildroot-linux-uclibc/sysroot/lib64': Not a directory
[...]

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-08-28 16:17:19 +02:00
Francois Perrad
7fc685c9e0 gcc: fix !BR2_LARGEFILE builds
see http://lists.busybox.net/pipermail/buildroot/2013-August/076278.html

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-08-07 17:50:21 +02:00
Peter Korsgaard
fedf4815ba gcc-final: ensure TARGET_DIR/usr/lib exists before copying to it
Got dropped in the toolchain/gcc -> package/gcc conversion.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-17 09:31:06 +02:00
Thomas Petazzoni
d2e3cc389d gcc: create symbolic link to ld-linux in EABIhf/gcc 4.7/eglibc
When using eglibc, the ld-linux loader is installed as
ld-linux-armhf.so.3, but gcc 4.7.x was not yet updated, and generates
binaries that reference ld-linux.so.3. This was fixed starting with
gcc 4.8.x. In order to be able to use gcc 4.7, we create the
appropriate symbolic link.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-16 15:22:10 +02:00
Thomas Petazzoni
f03a9be4c3 gcc: remove BR2_GCC_SHARED_LIBGCC option
Commit 6b48b48034 ("add a know to enable/disable building a shared
libgcc"), from october 2006, isn't really as to why a
BR2_GCC_SHARED_LIBGCC option was needed. However, now that gcc has
been converted to the package infrastructure, it causes problems
because the host packages are always being passed --enable-shared
--disable-static, so re-adding --disable-shared on top of that break
things.

Moreover, our tests indicate that both a shared *and* a static version
of libgcc are built, and that linking dynamically and statically a
program that uses libgcc_s gives correct results: dynamically linked
against libgcc_s in the first case, statically linked in the second
case.

Therefore, it appears that this option is no longer necessary, and
removing it has the advantage of fixing the builds of
qemu_mips64_malta_defconfig and qemu_sparc_ss10_defconfig, both of
which had BR2_GCC_SHARED_LIBGCC not enabled.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-11 16:26:52 +02:00
Thomas Petazzoni
8d29893893 eglibc: enable support in the Buildroot toolchain backend
Using the newly introduced 'eglibc' package, this commit enables the
option of building a toolchain using the eglibc C library in the
Buildroot toolchain backend.

In details, this commit:

 * Creates a choice to select uClibc or eglibc in the Buildroot
   toolchain backend (in toolchain/toolchain-buildroot/Config.in), and
   removes the fact that the Buildroot toolchain backend forcefully
   enables uClibc (toolchain/Config.in).

 * Creates a BUILDROOT_LIBC variables, which points to the package
   implementing the C library (i.e either 'uclibc' or 'eglibc').

 * Modifies the gcc-final and gcc-intermediate makefiles to use the
   BUILDROOT_LIBC variable instead of hardcoding the use of uclibc.

 * Ensures that TLS support is always enabled when building eglibc.

[Peter: fix commit text to refer to BUILDROOT_LIBC]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-04 11:08:27 +02:00
Thomas Petazzoni
00e9b1e4f7 gcc-initial, gcc-intermediate, gcc-final: optimize extraction
Several sub-directories of the gcc code base are in fact not needed
for the Buildroot build: libjava/, libgo/ and gcc/testsuite/ being the
biggest ones. Avoiding their extraction saves quite a bit of disk
space, and compensates a bit the fact that we now extract three times
the gcc source code.

This requires changing the 100-uclibc-conf.patch to no longer patch
files from the libjava/ directory, since this directory is no longer
extracted.

[Peter: add comment about why this is done]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-03 23:37:23 +02:00
Thomas Petazzoni
4d7c13dd53 gcc-final: new package
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-03 22:59:27 +02:00