Buildroot fork.
Go to file
Thomas De Schampheleire 2a87b64f8e toolchain-external: align library locations in target and staging dir
The toolchain-external logic is roughly:
- populate the staging dir by rsyncing the entire ${ARCH_LIB_DIR} and
  usr/${ARCH_LIB_DIR} from sysroot.
- populate the target dir by explictly copying some libraries from sysroot
  into target/lib and some other libraries in target/usr/lib, the split
  being hardcoded into buildroot regardless of the location in the sysroot.

This means that a library libfoo could be located in:
  staging/lib/libfoo.so
  target/usr/lib/libfoo.so

When debugging an application that links against this library, gdb will
fruitlessly search for 'usr/lib/libfoo.so' in staging, and then suggest to
use 'set solib-search-path' which is a hack, really.

To solve the problem, we need to make sure that libraries from the toolchain
are installed in the same relative location in staging and target.
Achieve this by:
- replacing the convoluted search for libraries using for+find in sysroot
  with a simple find in staging.
- determining DESTDIR for each library individually based on the location in
  staging.
- treating LIB_EXTERNAL_LIBS and USR_LIB_EXTERNAL_LIBS equivalently

These changes also allow for the removal of most arguments to
copy_toolchain_lib_root in the method itself and their callers.

Test procedure:
- set configuration for a given toolchain
- make clean toolchain
- find output/target | sort > /tmp/out-before
- apply patch
- make clean toolchain
- find output/target | sort > /tmp/out-after
- diff -u /tmp/out-before /tmp/out-after

The only changes should be some libraries moving from lib to usr/lib or vice
versa. Notable examples being libstdc++ and libatomic.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas:
 - use -L instead of -follow in the find invocation, as suggested by
   Arnout.
 - move the BR2_STATIC_LIBS condition as a make condition rather than
   a shell condition, as suggested by Arnout.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-25 22:46:28 +02:00
arch i386: properly define BR2_ARCH for all x86 subarchitectures 2016-04-21 23:05:28 +02:00
board configs: add Raspberry Pi 3 defconfig 2016-04-25 14:07:58 +02:00
boot barebox: extract package name argument 2016-04-24 17:47:02 +02:00
configs configs/raspberrypi3: sync kernel version with rpi/rpi2 2016-04-25 14:07:58 +02:00
docs Revert "core: add the possibility to provide help for custom rules" 2016-04-17 10:55:37 +02:00
fs fs/common: generate users before setting permissions 2016-02-01 07:25:36 +01:00
linux linux: properly install all images in the initramfs case 2016-04-25 21:40:47 +02:00
package toolchain-external: align library locations in target and staging dir 2016-04-25 22:46:28 +02:00
support support/scripts/check-host-rpath: also check HOST_DIR/{bin, sbin} 2016-04-21 22:17:36 +02:00
system skeleton: Recreate /var/run symlink 2016-02-11 23:20:38 +01:00
toolchain toolchain-external: align library locations in target and staging dir 2016-04-25 22:46:28 +02:00
.defconfig arch/x86: remove support for i386 2016-04-18 23:38:34 +02:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
CHANGES Update for 2016.02 2016-03-01 21:47:30 +01:00
Config.in Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_4_6 2016-03-20 14:55:27 +01:00
Config.in.legacy arch/x86: remove support for i386 2016-04-18 23:38:34 +02:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
Makefile Revert "core: add the possibility to provide help for custom rules" 2016-04-17 10:55:37 +02:00
Makefile.legacy Makefile.legacy: fix recursive invocation with BUILDROOT_DL_DIR and _CONFIG 2014-02-11 08:14:57 +01:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches