Commit Graph

201 Commits

Author SHA1 Message Date
Gustavo Zacarias
5a6087d62e toolchain: add powerpc SPE ABI support
Add the ability for buildroot to build an SPE ABI enabled toolchain.

This is mandatory for e500v1/v2 cores since they don't support classic
FPU mode as the e500mc does.

Useful for Freescale's PowerQUICC III and single/dual-core QorIQ
line of processors.

The new TARGET_ABI variable is used rather than TARGET_CFLAGS for
uclibc's UCLIBC_EXTRA_CFLAGS to avoid breakish CFLAGS leaking in, a
good example being -mthumb for ARM.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-07 20:46:11 +01:00
Baruch Siach
ec8eda419a toolchain: add user defined target LDFLAGS options
Allow the user to specify additional options for the target LDFLAGS.

I use this to pass the -te500v2 option to the linker, when using the
CodeSourcery toolchain for PowerPC. This chooses the correct CRT for e500 hard
float. Otherwise I get errors like

undefined reference to `_save32gpr_31'
undefined reference to `_rest32gpr_31_x'

at final link time.

[Peter: fixup, use qstrip]
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-07-25 08:31:15 +02:00
Thomas Petazzoni
009d8fceab package/autotools: add --{enable,disable}-{shared,static} automatically
For target packages, depending on BR2_PREFER_STATIC_LIB, add the
correct combination of --{enable,disable}-{shared,static} flags to
./configure calls.

  * When BR2_PREFER_STATIC_LIB is enabled, we pass --enable-static
  --disable-shared.

  * When BR2_PREFER_STATIC_LIB is disabled, we pass --enable-static
  --enable-shared. We enable static libraries since they can still be
  useful to statically link applications against some libraries
  (sometimes it is useful for size reasons). Static libraries are
  anyway only installed in the STAGING_DIR, so it doesn't increase in
  any way the size of the TARGET_DIR.

For host packages, always pass --enable-shared and --disable-static.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-06-12 21:59:34 +02:00
Peter Korsgaard
125e2558b2 Get rid of unneeded CFLAGS
Now that we use a wrapper for external toolchains (and internal ones
default to the correct setting), we no longer need to explicitly pass
sysroot/march/mtune/mabi/floating point mode in TARGET_CFLAGS.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-05 23:39:03 +02:00
Peter Korsgaard
85dc57f6fd Add toolchain wrapper for external toolchains
Add a simple toolchain wrapper for external toolchains, which forces the
correct sysroot/march/mtune/floating point options needed to use it
with buildroot.

With this in place the external toolchain behaves similar to the internal
ones, and the special handling can be removed. This also means that the
toolchain is usable outside buildroot without having to pass any special
compiler flags.

Also adjust the downloadable external toolchain support to install under
HOST_DIR so it can be used after the temporary build files are removed.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-05 23:38:58 +02:00
Peter Korsgaard
6246704008 package/Makefile.in: ensure libtool doesn't search host dirs for libraries
Commit 7e3e8ec040 (CFLAGS/LDFLAGS: don't add -I / -L args for STAGING_DIR)
exposed a lingering libtool problem.

Unless instructed otherwise (using -L) libtool will search its built in
system path for libraries, and use those instead if found. The default
search path is '/usr/lib, /lib, /usr/local/lib', which is no good for
cross compilation.

Fix it by setting the system search path to the empty string, effectively
disabling this feature.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-05-03 15:23:40 +02:00
Peter Korsgaard
7e3e8ec040 package/Makefile.in: CFLAGS/LDFLAGS: don't add -I / -L args for STAGING_DIR
Now that we use sysroot for all toolchains, the explicit -I / -L arguments
in CFLAGS / LDFLAGS aren't needed anymore (And having them makes the build
quite noisy for certain packages as STAGING_DIR/include normally doesn't
exist).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-04-29 15:40:58 +02:00
Sonic Zhang
5d6ff452ad external toolchain: Only prefix path if specified
Only prefix the external toolchain calls with its absolute path if
BR2_TOOLCHAIN_EXTERNAL_PATH is set, otherwise just assume it will
be available in the path.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-03-28 10:00:37 +02:00
Peter Korsgaard
6a86dd9c8e pkg-config: add usr/share/pkgconfig to search path as well
A few packages (like xlib_xtrans) install their .pc files here, and
upstream pkg-config defaults to searching both /usr/lib/pkgconfig and
/usr/share/pkgconfig, so add it as well.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-03-27 21:20:04 +02:00
Peter Korsgaard
50bda85e88 pkg-config: add --with-sysroot option for compiled in default sysroot setting
Similar to the --with-pc-path option. It works just like the existing
PKG_CONFIG_SYSROOT_DIR environment variable, but compiled in.
The environment variable overrides this default setting if set.

This way we don't need to pass PKG_CONFIG_SYSROOT_DIR in the environment
when building for the target, and it is easier to reuse pkg-config outside
BR (E.G. for the SDK) without having to setup special environment
variables.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-30 00:37:53 +01:00
Bjørn Forsman
bc1acec143 Add CMAKETARGETS infrastructure for CMake packages
The CMAKETARGETS infrastructure makes adding CMake-based packages to
Buildroot easy. It uses the same set of variables as the autotools
infrastructure, except for autoreconf and libtool stuff which is not
needed. Usage: just call CMAKETARGETS instead of AUTOTARGETS.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-26 23:22:32 +01:00
Bjørn Forsman
73144a6e02 Makefile: generate CMake toolchain-file in $(O)
A CMake toolchain-file makes it easy to develop CMake-based packages
outside of Buildroot. Just give the toolchain-file to CMake via the
-DCMAKE_TOOLCHAIN_FILE=... option.

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-26 23:22:32 +01:00
Peter Korsgaard
d97db71d10 Use 'sysroot' rather than 'sys-root' for the sysroot/staging_dir
As pointed out on the list, using sysroot rather than sys-root is less
confusing, as this is how it is referred to in the GCC manual.

So rather than changing BR, patch ct-ng to use sysroot instead.
The next ct-ng release will use 'sysroot' as well by default.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-26 14:49:00 +01:00
Peter Korsgaard
58d107ec3f crosstool-ng: install toolchain into HOST_DIR like the internal toolchain
Simplifies code and helps us when we add SDK support in the future.
With this we no longer need to copy headers/libraries to STAGING_DIR either.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-25 16:08:50 +01:00
Peter Korsgaard
f826046578 package/Makefile.in: Fix LIBC calculation for internal ct-ng toolchains
Use uclibc for internal ct-ng toolchains configured with uClibc as well.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-25 16:01:25 +01:00
Peter Korsgaard
8f61b236c9 Use sys-root rather than sysroot for the sysroot/staging_dir
The name of the sysroot directory is arbitrary, but as ct-ng uses sys-root,
let's use that as well for consistency.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-25 15:58:04 +01:00
Gustavo Zacarias
009407e6be binutils: make it a proper package
* Convert binutils to a proper autotargets package

* Add version 2.21 and drop version 2.17

* Hook up packaged binutils for target gcc

* Build tools are on HOST_DIR now so change it

* Move cross/host gcc to HOST_DIR

* Drop kludge from commit 3c77bab2ee
  This is fixed in the next commit "gcc: install copies of libgcc,
  libstdc++ and libgcj to the sysroot" - tested for arm & x86_64
  targets.

* TARGET_CROSS now pointed to HOST_DIR too

[Peter: Config.in tweaks]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-01-02 22:55:16 +01:00
Gustavo Zacarias
74058758e4 package: drop sparc64 bits
Remove VIS optimization, it's for sparc64 and it's gone.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-29 23:13:03 +01:00
Gustavo Zacarias
87b81bb56f toolchain: move sysroot to host dir
* Drop the BR2_STAGING_DIR option
* Hardcode STAGING_DIR to $(HOST_DIR)/usr/TUPLE/sysroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-28 22:38:47 +01:00
Gustavo Zacarias
f78b344ea8 sstrip: make it a proper package
* Convert sstrip to a proper gentargets package
* Use openwrt svn version, it's basically the same one we used
* Change the hooks from old toolchain/sstrip to new package/sstrip
* Drop the old toolchain/sstrip directory
* sstrip for the target is now in Package -> Development

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-28 20:43:58 +01:00
Thomas Petazzoni
6b578c8d73 toolchain: rework C++ options
Instead of having BR2_GCC_CROSS_CXX and BR2_INSTALL_LIBSTDCPP, with
BR2_GCC_CROSS_CXX not being visible (and therefore being useless),
let's just keep BR2_INSTALL_LIBSTDCPP to enable C++ in the toolchain
and install C++ libraries on the target.

We also take that opportunity to make BR2_INSTALL_LIBSTDCPP an hidden
option, which is selected by an option in Buildroot toolchain support
or an option in External toolchain support, just as we did for other
toolchain features.

Some work definitely remains to be done :

 - The name BR2_INSTALL_LIBSTDCPP is ugly, but we keep it for the
   moment in order to avoid changing all packages.

 - We should clarify the other language-related options (Fortran,
   Java, Objective-C, etc.).

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-12-13 22:04:35 +01:00
Thomas Petazzoni
6c492d5e7b toolchain: add support for external toolchain profiles and download
Instead of letting the user define all the details of his external
toolchain, we define a set of profiles for well-known external
toolchains (CodeSourcery ones only at the moment, can easily be
extended with other toolchains).

Once a profile has been choosen, the user is offered the choice of
either letting Buildroot download and install the external toolchain,
or (as before) to tell Buildroot where the toolchain is installed on
the system.

We of course provide a "custom profile", through which the user can
configure Buildroot to use a custom external toolchain for which no
profile is available.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-13 21:56:49 +01:00
Thomas Petazzoni
17b66affdf ccache: rework ccache management
* ccache is now a normal package (both for the host and the target).

 * ccache option is now part of the "Build options" menu. It will
   automatically build ccache for the host before building anything,
   and will use it to cache builds for both host compilations and
   target compilations.

 * bump ccache to 3.1.3

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-12-08 17:51:49 +01:00
Gustavo Zacarias
0dc940cdee Makefile: introduce KSTRIPCMD to strip kernel modules
When sstrip is selected it tries to strip kernel modules too.
Unfortunately this fails with a "unrecognized program segment header
size" error thus interrupting the build process.

We introduce a new $(KSTRIPCMD) strip command for this, being a regular
strip when sstrip is selected and an empty stub when not stripping.

At the same time get rid of the REMOVE_SECTION_* variables, as they are
only used once.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-30 16:28:41 +01:00
Marcelo Roberto Jimenez
1fbd9ef813 package/Makefile.in: Add OBJDUMP=$(TARGET_OBJDUMP) to TARGET_CONFIGURE_OPTS
Closes #2857

The OBJDUMP was missing from TARGET_CONFIGURE_OPTS, this patch adds it
to the proper place in package/Makefile.in.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-11-27 22:36:28 +01:00
Peter Korsgaard
3be4968343 Optimize (-O2) host binaries by default
Default HOST_CFLAGS to -O2, so host tools (like the cross compiler) are
built with optimization by default.

Based on a patch by Will Newton <will.newton@gmail.com>.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-10-29 21:00:26 +02:00
Mike Frysinger
d2f7323f78 toolchain: do not require full path
If the toolchain can be found via $PATH, then requiring the full path to
it is unnecessary.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-16 16:46:44 -04:00
Yann E. MORIN
10c1eec2c3 toolchain: add new toolchain backend: crosstool-NG
[Peter: indent Config.in, shuffle make targets around]
Signed-off-by: Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-10-01 16:40:40 +02:00
Peter Korsgaard
d0c3d1cf43 sed: get rid of host-sed variant
And all the infrastructure surrounding it. A broken sed implementation
is quite rare nowadays, as seen by the fact that the current host-sed
support has been broken for a while, so just get rid of it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-09-30 23:09:39 +02:00
Thomas Petazzoni
ece1f4225c Fix computation of REAL_GNU_TARGET_NAME
The current computation of REAL_GNU_TARGET_NAME is incorrect for
non-ARM glibc platforms because it generates something such as
mipsel-unknown-linux- as the REAL_GNU_TARGET_NAME.

So we correct this by :

 * Adding "gnu" in the suffix when glibc is used, so that in the
   previous case we will have mipsel-unknown-linux-gnu

 * Improving the ARM_EABI code to correctly append "eabi" when glibc
   is selected, so that we have arm-unknown-linux-gnueabi, and to
   append "gnueabi" when uclibc is selected, so that we have
   arm-unknown-linux-uclibcgnueabi. The little trick here is that LIBC
   and ABI aren't completely orthogonal on ARM.

This fixes problems such as :

checking host system type... Invalid configuration
`mipsel-unknown-linux-': machine `mipsel-unknown-linux' not recognized

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-29 16:04:38 +02:00
Thomas Petazzoni
ef2c11e51a Remove unused X11_PREFIX option
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-28 00:30:26 +02:00
Peter Korsgaard
e49e2feda4 Makefile: fix ldconfig selection for internal toolchains
Commit ed0d45fdd (Choose host/target ldconfig based on availability)
added a runtime check for a cross-ldconfig being available.
Unfortunately this checks runs too early (at package/Makefile.in parsing
time), so it always fails when using an internal toolchain as ldconfig
isn't built yet.

Fix it by moving the check to the only place it is used (target-finalize).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-26 23:57:01 +02:00
Malte Starostik
ed0d45fdd4 Choose host/target ldconfig based on availability
Decide whether to use the host or target ldconfig based on an
availability check instead of internal/external toolchain selection.  An
external toolchain may very well provide an ldconfig while the host's
one may fail.
External toolchain generated by Gentoo crossdev:

$ LC_ALL=C i686-pc-linux-uclibc-ldconfig -r output/target/; echo $?
i686-pc-linux-uclibc-ldconfig: skipping /usr/lib: No such file or directory
0

vs. the host (x86_64-pc-linux-gnu) version:

$ LC_ALL=C /sbin/ldconfig -r output/target/; echo $?
/sbin/ldconfig: Can't open configuration file
output/target/etc/ld.so.conf: No such file or directory
/sbin/ldconfig: Can't open cache file /var/cache/ldconfig/aux-cache
: No such file or directory
1

Signed-off-by: Malte Starostik <m-starostik@versanet.de>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-07-18 22:46:06 +02:00
Thomas Petazzoni
e721a7c07e Merge TARGET_CONFIGURE_ENV into TARGET_CONFIGURE_OPTS
TARGET_CONFIGURE_ENV defines CFLAGS, LDFLAGS, CXXFLAGS and FCFLAGS,
separatly from all other variables that are part of
TARGET_CONFIGURE_OPTS. This is useless and not consistent with the
HOST_CONFIGURE_ variables, therefore we merge TARGET_CONFIGURE_ENV
into TARGET_CONFIGURE_OPTS and fix the few users of
TARGET_CONFIGURE_ENV.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:41 +02:00
Thomas Petazzoni
0ab16a01bb Remove $(TOOLCHAIN_DIR)/bin and $(STAGING_DIR)/{usr/bin,bin} from the PATH
These shouldn't be needed. Even when the cross-compiler is in
$(STAGING_DIR)/usr/bin, we anyway use an absolute path for TARGET_CC,
TARGET_LD and al.

Not having $(STAGING_DIR)/{usr/bin,bin} in the PATH will avoid having
Buildroot trying to run target binaries.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:41 +02:00
Thomas Petazzoni
359090e693 Remove *_FOR_TARGET variables from TARGET_CONFIGURE_OPTS
Those variables are not standard.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:40 +02:00
Thomas Petazzoni
efb1d8d3f4 Cleanup TARGET_CONFIGURE_OPTS
The definition of CC, LD, GCC, CPP, CXX and FC shouldn't contain the
CFLAGS/LDFLAGS/CXXFLAGS, those should be passed through the
appropriate variables.

However, the --sysroot option is a particular case here: it needs to
be part of the CC/LD/GCC/etc. definitions otherwise libtool strips it
from the CFLAGS/LDFLAGS.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:40 +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
Thomas Petazzoni
b07030a708 Separate flags from commands in HOST_CONFIGURE_OPTS
Just as we did for LD/LDFLAGS, pass CFLAGS and CXXFLAGS in their own
variables.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:40 +02:00
Thomas Petazzoni
8e8103bfb5 Remove unneeded variables in HOST_CONFIGURE_OPTS
When building packages for the host, the *_FOR_BUILD and *_FOR_TARGET
variables are not needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:39 +02:00
Thomas Petazzoni
4fdecac9d6 Solve the host tools relying on host libraries problem
We build host tools installed in $(HOST_DIR)/usr/bin, and some of them
rely on host libraries in $(HOST_DIR)/usr/lib. So when these host
tools are executed, they need to find the host libraries, which are
not installed in a default location.

In c1b6242fdc we tried to use
LD_LIBRARY_PATH when building target packages to solve this
problem. Unfortunately, LD_LIBRARY_PATH is not only used to find
libraries at run-time, but also at compile time. So it leads the build
of some packages, such as icu, to fail.

Therefore, in 0d1830b07d, we reverted
the LD_LIBRARY_PATH idea.

The other option to solve this problem was to hardcode a RPATH value
in the host binaries that would reference the location of host
libraries. We added this -Wl,-rpath option to HOST_CFLAGS in
6b939d40f6. Unfortunately, this caused
problems when building binutils, as reported in bug 1789 so this
change was reverted in e1a7d916e9.

Then, we tried to use -Wl,-rpath in HOST_LDFLAGS, but it was causing
problems with fakeroot not recognizing 'ld' as the GNU linker, since
the -Wl,-rpath cannot be understood by 'ld' directly, only by 'gcc'.

This commit is a new attempt at using HOST_LDFLAGS, but in this case
we modified the definition of HOST_LD to *not* contain
HOST_LDFLAGS. LDFLAGS are being set separatly. It solved the fakeroot
issue and was tested against nearly 300 packages of Buildroot.

For more details on this story, see
 http://lists.busybox.net/pipermail/buildroot/2010-June/035580.html
 http://lists.busybox.net/pipermail/buildroot/2010-June/035581.html
 http://lists.busybox.net/pipermail/buildroot/2010-June/035586.html
 http://lists.busybox.net/pipermail/buildroot/2010-June/035609.html
 https://bugs.busybox.net/show_bug.cgi?id=1789

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-07-07 08:14:39 +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
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
e1a7d916e9 Revert "Add -rpath option for host package compilation"
Closes #1789

This reverts commit 6b939d40f6.

The problem this commit tries to fix is valid, but the fix unfortunately
seems to cause worse problems on certain distributions/setups, so revert
for now.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-30 10:42:17 +02:00
Peter Korsgaard
0d6068ae01 Merge branch 'misc-fixes2' of git://git.busybox.net/~tpetazzoni/git/buildroot 2010-05-08 00:09:11 +02:00
Thomas Petazzoni
5e1fbd2c33 Fix the computation of REAL_GNU_TARGET_NAME
When the selected C library is glibc, the C library shouldn't be
mentionned in REAL_GNU_TARGET_NAME. In other words:

 arm-unknown-linux-uclibcgnueabi must be used for uClibc
 arm-unknown-linux-gnueabi must be used for glibc

This fixes the build of GDB on the target, as reported by Quotient
Remainder <quotientvremainder@gmail.com>.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-06 23:08:37 +02:00
Thomas Petazzoni
2eb4b09529 Add staging libraries directories to -L in external case
In order to solve issues of libtool trying to link target components
against host libraries, it seems that specifying -L$(STAGING_DIR)/lib
and -L$(STAGING_DIR)/usr/lib works.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-05-06 20:18:41 +02:00
Thomas Petazzoni
6b939d40f6 Add -rpath option for host package compilation
In c1b6242fdc, we added
$(HOST_DIR)/usr/lib to LD_LIBRARY_PATH when building target packages,
because the build of target packages sometimes require host tools
installed in $(HOST_DIR)/usr/bin which themselves require host
libaries installed in $(HOST_DIR)/usr/lib.

Unfortunately, this solution didn't work, as libtool then tried to
link target binaries against host libraries. So $(HOST_DIR)/usr/lib
got removed from LD_LIBRARY_PATH in
0d1830b07d.

However, this meant that we went back to the previous situation, in
which host tools used during compilation of target components might
require host libraries. An example :

make[2]: Entering directory `/home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/build/xfont_font-adobe-100dpi-1.0.1'
/home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/host/usr/bin/mkfontdir /home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/target/usr/share/fonts/X11/100dpi
/home/test/buildroot/output.ctng-arm-eglibc-2010-05-04-12-41-00/host/usr/bin/mkfontscale: error while loading shared libraries: libfontenc.so.1: cannot open shared object file: No such file or directory

Therefore, we try another solution: make sure that host binaries are
linked with an -rpath option, so that $(HOST_DIR)/usr/lib doesn't need
to be in LD_LIBRARY_PATH for them to find their libraries.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2010-05-06 20:17:38 +02:00
Lionel Landwerlin
0d1830b07d package: Add $(HOST_DIR)/usr/lib to LD_LIBRARY_PATH for host but not target
Some packages like icu requires to be compiled against the host system
first to be able to compile against the target. This is due to the
usage of self generated binaries by the package to build itself. When
the generated tools also depends on generated libraries it is required
to add the path to these libraries in the library path
(LD_LIBRARY_PATH) especially for the configure step.

Adding $(HOST_DIR)/usr/lib to LD_LIBRARY_PATH for target compilation
might break the link step by mixing host libraries and target
binaries.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 13:37:11 +02:00
Thomas Petazzoni
65e80a0b0b Remove BR2_GNU_TARGET_SUFFIX and compute GNU_TARGET_NAME
Instead of asking the user about the GNU target suffix, just compute
it automatically from the other configuration options.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2010-05-03 00:00:08 +02:00