Commit Graph

1217 Commits

Author SHA1 Message Date
Peter Korsgaard ebf21166b7 uClibc: remove old 0.9.28 support
Not supported upstream and needs complicated workaround for the NPTL stuff.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-29 17:02:29 +02:00
Khem Raj c6c7b99733 gcc-4.2.4: Add patch to accept --with-abi=aapcs-linux
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-29 16:57:10 +02:00
Khem Raj cfbf8abc33 Add support for uclibc NPTL toolchain.
This patch modifies current toolchain build sequence so that
NPTL enabled toolchain can be built. The new sequence works
well with linuxthreads as well.

It introduces a new pass for gcc cross compilation. The new
sequence is binutils->gcc-initial->linux-headers -> uclibc-configured
(some cheats to generate phony shared libc.so and libm.o)
-> gcc-intermediate(with shared lib support) -> uclibc -> gcc-final

I also added a new sample config arm_nptl_toolchain_defconfig which
builds the toolchain and busybox.

I have only tried it on arm. However it should work for other
architectures which support NPTL on uclibc e.g. mips, sh, x86, ppc, x86_64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-29 16:57:00 +02:00
Thomas Petazzoni 5575d205c3 toolchain: remove multilib
Supporting multilib is much more than just passing --enable-multilib
to gcc. You have to actually build the C library several times (once
for each multilib variant you want to support in your toolchain), and
to pass MULTILIB_OPTIONS/MULTILIB_EXCEPTIONS values to gcc to let it
know the set of multilib variants you're interested in.

Since we'll probably never support multilib toolchains in Buildroot,
just get rid of this BR2_ENABLE_MULTILIB option.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-28 23:21:45 +02:00
Thomas Petazzoni 6d4a992e2b gcc: remove option on SJLJ exceptions
This is a very advanced option, and it seems, according to
http://choices.cs.uiuc.edu/exceptions.pdf that SJLJ exceptions aren't
really interesting.

Users really interested by this can always use the
BR2_EXTRA_GCC_CONFIG_OPTIONS is they want.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-28 17:38:31 +02:00
Yann E. MORIN 2508b16d66 toolchain: move buildroot config files
Handle the internal toolchain backend mechanism the
same way we handle other backends.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:20:08 +02:00
Yann E. MORIN ed0200993e toolchain: move makefile includes
Including a bunch of Makefiles with wildcard makes it impossible to add
new toolchain backends. Avoid that by namely including needed files.

The external toolchain still needs to include all the toolchain/*/*.mk
sub-makefiles, as they are needed to build a toolchain that runs on the
target. It is to be noted that the cross-toolchain is not built in this
case, as the make-targets to build the cross-toolchain are not present
in the $(BASE_TARGETS) variable, which is later used to create the
dependency rules.

Also, the comment 'Explicit ordering' has been removed, as it is mis-
leading. It is make's responsibility to create the proper ordering based
on the dependency rules it finds in the Makefiles

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:20:06 +02:00
Yann E. MORIN f78ea9fcf0 toolchain: rename external toolchain dir
Rename the external toolchain directory.
When new backends are here, it will be easier to sort them out
if they are all prefixed the same way.

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:20:03 +02:00
Yann E. MORIN ed181aeedb toolchain: move helper functions from external toolchain
The helper functions used for external toolchains may also be useful
to alternate toolchain backends (currently, the external toolchain is
the sole user).

Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-28 16:19:56 +02:00
Peter Korsgaard 91f8edad3e Merge branch 'avr32-toolchain-fix' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-07-27 23:06:16 +02:00
Thomas Petazzoni 460ba963ac toolchain: remove redundant and incorrect --with-build-time-tools option
This option is already part of the gcc configure options through the
BR2_CONFIGURE_BUILD_TOOLS variable (in toolchain/Makefile.in).

Additionnally, the value that was passed in the AVR32 specific case
was incorrect: it was $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin
instead of $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 22:58:05 +02:00
Thomas Petazzoni c7f180eca5 toolchain: Remove now-unused variables
The variable BR2_SYSROOT_STAGING_DESTDIR is no longer used, since now
the prefix for gcc is already set to the correct location.

The variable BR2_SYSROOT_TARGET_DESTDIR was already unused.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 22:56:51 +02:00
Thomas Petazzoni 2ae84ac85f binutils,gcc: use correct --prefix
The cross binutils and cross gcc are actually going to be executed
from $(STAGING_DIR)/usr, so the correct prefix is $(STAGING_DIR)/usr
and not /usr.

This also fixes what is known as the "AVR32 toolchain build failure",
which was due to the fact that the prefix directory wasn't writable
(since it was /usr).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 22:56:36 +02:00
Peter Korsgaard 3fdf280568 Merge branch 'various-bumps' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-07-27 22:52:19 +02:00
Thomas Petazzoni 3c77bab2ee Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc
This commit solves bug #1051. The problem in this bug in that WebKit
compiles a sample C program, which uses WebKit. As WebKit is written
in C++, even though the program it built with CROSS-gcc, it must be
linked with libstdc++. However, CROSS-gcc can't find the libstdc++ has
it's hidden inside <sysroot>/<tuple>/lib.

Therefore, this commit creates a symbolic link <sysroot>/<tuple>/lib
-> <sysroot>/lib before running the CROSS-gcc installation. While this
may look like a hack, this is the solution used by both Crosstool-NG
and OpenWRT.

Moreover, with this symbolic link in place, I think bug #1741 may also
be solved. The problem in this bug is that the linker tries to link
against /lib/libc.so.0. This is due to the fact that the linker finds
a libc.so script file in the original toolchain location and not
inside the copy of the toolchain sysroot in $(STAGING_DIR). As the
script file is found outside of the current toolchain sysroot, ld
considers the script has non-sysrooted, and therefore doesn't prefix
all paths found in the script file (such as /lib/libc.so.0) with the
sysroot path, leading to the failure.

So, in details, this commit :

 * Adds a BR2_ARCH_IS_64 invisible config knob that is used to know if
   the arch is a 64 bits architecture or not.

 * Creates the <sysroot>/<tuple>/lib -> <sysroot>/lib symbolic link,
   and the <sysroot>/<tuple>/lib64 -> <sysroot>/lib64 symbolic link if
   needed.

 * Fixes the external toolchain sysroot detection code so that the
   'sed' replacement is done *after* the readlink -f evaluation.

I have tested this by building ARM, x86 and x86_64 toolchains with
Buildroot, and then use these toolchains as external toolchains to
build a full X.org/Gtk/WebKit/Midori stack. I have also done a
complete ARM Buildroot internal toolchain build with the same full
X.org/Gtk/WebKit/Midori stack.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 22:49:36 +02:00
Thomas Petazzoni 454b70d03a target-g++: fix build
Just as we did to fix target-gcc, pass CXX_FOR_TARGET when building
target g++, and remove useless copies of g++ and c++.

Tested on ARM by compiling a simple C++ program using <iostream> on
the target and running it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 22:32:02 +02:00
Thomas Petazzoni fed6a2a6ea target-gcc: remove useless copies of gcc
When doing the "make install" of target, three identical copies of gcc
are installed in $(TARGET_DIR)/usr/bin:

  039adcc582c365f12ba6fc5f96098128  arm-unknown-linux-uclibcgnueabi-gcc
  039adcc582c365f12ba6fc5f96098128  arm-unknown-linux-uclibcgnueabi-gcc-4.3.5
  039adcc582c365f12ba6fc5f96098128  gcc

This patch removes the first two copies and keeps only the common "gcc" one.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 18:23:32 +02:00
Thomas Petazzoni 4e62eeed19 target-gcc: no need to strip binaries, remove .la files and doc
This is done in a global way by the target-finalize target of the main
Makefile.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 18:23:32 +02:00
Thomas Petazzoni f43054d841 target-gcc: fix build
Now that $(STAGING_DIR)/usr/bin is no longer in the PATH, we need to
pass the absolute paths to $(TARGET_CC) when building the target gcc
compiler.

This commit fixes the target gcc build problem reported on the list. I
have successfully been able to build a target gcc for ARM, use it to
compile a hello world application on the target and run this
application.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 18:23:16 +02:00
Thomas Petazzoni 5e8e1cdb60 target-gcc: Get rid of TARGET_GCC_FLAGS
This variable is used only once, so let's just hardcode its value at
its call site.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-27 18:22:44 +02:00
Peter Korsgaard 39e6ba1b39 java: mark as broken
We haven't had any updates to the java packages in a long time,
gcj in 4.3.x doesn't build, and 4.4.x is missing ecj1, so it cannot
have many users.

Mark it as broken and remove during the 2010.11 cycle, unless someone
steps up to maintain it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-26 22:25:19 +02:00
Peter Korsgaard c0e307b848 sstrip: fix section length corruption bug
Based on openwrt #6847:

https://dev.openwrt.org/ticket/6847

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-13 13:10:39 +02:00
Peter Korsgaard 0ac8553664 toolchain/gcc: cleanup softfloat selection
We don't have a BR2_SOFT_FLOAT_FP option, and -mfloat-abi should also
be used for big endian ARM.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-09 09:20:58 +02:00
Luca Ceresoli e766f13d17 ext-toolchains: fix libnss_*.so installation with external glibc
Commit 7192668 introduced a wrong spelling of BR2_TOOLCHAIN_EXTERNAL_GLIBC
that prevented libnss_files.so and libnss_dns.so from being installed.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-08 23:06:53 +02:00
Peter Korsgaard 74708bad15 Merge branch 'misc-fixes' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-07-08 10:21:16 +02:00
Darius Augulis d0169fda21 GETPT support is needed by rxvt.
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
2010-07-07 08:20:22 +02:00
Thomas Petazzoni a1c8fa41f6 Update all packages to quote $(TARGET_CC)
Now that TARGET_CC contains several space-separated words, it must be
used quoted everywhere.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:20:21 +02:00
Thomas Petazzoni 08235f7144 external-toolchain: adjust tests on TARGET_CC and TARGET_CXX
Following the changes to TARGET_CC/TARGET_CXX to include the --sysroot
option, these variables not only contain the path to the compiler, but
also the --sysroot option. For that reason, we cannot anymore just use
"test -x" to test for the compiler presence. Instead, we see if
$(TARGET_CC) -v and $(TARGET_CXX) -v return a zero status.

Moreover, --sysroot now needs to be filtered out of $(TARGET_CC) and
not $(TARGET_CFLAGS) when asking the toolchain for its original
sysroot and arch sysroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:18:42 +02:00
Thomas Petazzoni dc67c7f4dc Rework sysroot option handling
The external toolchain and internal toolchain cases both need to use
the --sysroot option, and they have almost identical
LDFLAGS/CFLAGS/CXXFLAGS definition, so we can factorize these
definitions.

Moreover, the --isysroot option is implied by --sysroot so there's no
need to specify both.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:40 +02:00
Peter Korsgaard e09aa60493 uClibc: workaround 0.9.31 / GCC PR32219 issue with static linking
Closes #2143

Fixes crash on static linking without stdio / x86. Both patches are from
upstream uClibc.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 14:19:36 +02:00
Thomas Petazzoni ecb7642cce external-toolchain: hardcode the destination directory for a library
Until now, the function copy_toolchain_lib_root was copying a given
library to the target filesystem by assuming that it should be at the
same place it was in the toolchain sysroot.

However, with Buildroot hiding libstdc++ in
/usr/<target-name>/lib(64), this isn't correct, and it is probably
safer not to rely on the toolchain organization anyway.

Therefore :

 * Instead of having a single EXTERNAL_LIBS variable, we now have
   LIB_EXTERNAL_LIBS and USR_LIB_EXTERNAL_LIBS, which respectively
   list the libraries that should be copied to /lib and /usr/lib. As
   of today, only libstdc++ is part of the second list.

 * The copy_toolchain_lib_root takes another argument, which is the
   destination directory of the library, relative to $(TARGET_DIR)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 08:01:00 +02:00
Thomas Petazzoni 2bf32a3307 external-toolchain: handle libstdc++/libgcc_s for BR toolchains
Most toolchains have their libraries either in /lib or /usr/lib
relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
have basic libraries in /lib, and libstdc++/libgcc_s in
/usr/<target-name>/lib(64).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 08:00:22 +02:00
Thomas Petazzoni 086e4b7475 uclibc: add patch to fix fcntl64() on 64 bits targets
The patch is already in upstream uClibc, in the master branch, at
http://git.buildroot.net/uClibc/commit/?id=6f1daaaf2d94c1e6184add44eda38b0781b88cf0.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:59:58 +02:00
Thomas Petazzoni 4b17cef16b external-toolchain: recognize uClibc 64 bits toolchains
With uClibc 64 bits toolchain, the dynamic loader is named
ld64-uClibc.so.0 and not ld-uClibc.so.0. So, this commit adjust the
uClibc detection code for external toolchains.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:59:39 +02:00
Thomas Petazzoni dd5ca4beb5 external-toolchain: mention MIPS and PowerPC CodeSourcery toolchains
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:59:19 +02:00
Thomas Petazzoni e774eb0c9d external-toolchain: create lib64 symlinks if needed
Create lib64 -> lib and usr/lib64 -> usr/lib symbolic links in the
target and staging directories. This is needed for some 64 bits
toolchains such as the Crosstool-NG toolchains, for which the path to
the dynamic loader and other libraries is /lib64, but the libraries
are stored in /lib.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:58:46 +02:00
Thomas Petazzoni 914f19ca1e external-toolchain: support 64 bits glibc toolchains
On 64 bits glibc toolchains, the dynamic loader is named
ld-linux-x86-64.so and not simply ld-linux.so. So, adjust the
detection of the C library accordingly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:57:03 +02:00
Thomas Petazzoni 6d51053637 external-toolchain: only copy existing directories of the sysroot
Instead of copying all directories in "etc lib sbin usr", check that
each of them exists before doing the copy. This is only to avoid an
harmless error message.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:56:26 +02:00
Thomas Petazzoni 07d15f907b ext-toolchain: Fix ARCH_SYSROOT detection
For the detection of the ARCH_SYSROOT_DIR (which contains the C
library variant specific to the compiler flags), we used to pass only
the -march argument instead of the full TARGET_CFLAGS. This was done
because TARGET_CFLAGS contains --sysroot, and we don't want to tell
here the compiler which sysroot to use, because we're specifically
asking the compiler where the *normal* arch sysroot directory is.

Unfortunately, there are some multilib variants that aren't decided
only based on -march, but also on -msoft-float or other compiler
flags. Therefore, we take the opposite approach: pass the full
TARGET_CFLAGS, from which we have stripped the --sysroot option.

For example, this allows a PowerPC CodeSourcery toolchain, on which
we're using the soft-float multilib variant, to work properly as an
external toolchain.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:55:59 +02:00
Thomas Petazzoni 7192668cbf ext-toolchains: take into account other Glibc dynamic loader variants
External toolchains using Glibc have different names for the dynamic
loader. Some of them name it ld-linux.so.*, while some others (such as
the PowerPC and MIPS CodeSourcery toolchains) name it simply ld.so.*.

Therefore, we fix the glibc detection code to handle this case.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 07:53:22 +02:00
Peter Korsgaard 861dde63b2 kernel-headers: bump 2.6.31-34 stable versions
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-06 00:38:54 +02:00
Peter Korsgaard 52b8d0478a toolchain: remove unused special detection of old toolchains
We only support gcc >= 4.2.x for the internal toolchain.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-02 09:13:30 +02:00
Peter Korsgaard bec3480a44 check-host-sed.sh: use mktemp for temporary file
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-21 23:02:31 +02:00
Peter Korsgaard 1e627bf212 uClibc: 0.9.31.config: enable UCLIBC_SV4_DEPRECATED option
Needed by xfsprogs.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-18 11:48:58 +02:00
Peter Korsgaard 5fd095b374 toolchain: remove gcc 4.1.2 and non-sysroot support
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-15 23:16:55 +02:00
Peter Korsgaard 144e4ed085 toolchain/gcc: Use 4.3.x like for 4.4, get rid of older 4.3.x versions
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-15 22:58:17 +02:00
Gustavo Zacarias 947a9b8586 toolchain: bump gcc 4.3.x series to 4.3.5
Closes #2065

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-15 22:54:44 +02:00
Paul Jones 36391de0db Fix potentially conflicting build flags
Change the default target optimisation value so
it does not conflict with gcc optimization level

Signed-off-by: Paul Jones <paul@pauljones.id.au>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-15 10:50:15 +02:00
Nick Leverton 016eb67078 dependencies.sh: fix CWD in PATH check
Closes #1999

Signed-off-by: Nick Leverton <nick@leverton.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-09 12:04:25 +02:00
Peter Korsgaard 3d5198c19b kernel-headers: add 2.6.34
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-06-01 22:07:48 +02:00