aboutsummaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorGravatar Matt Weber <matthew.weber@rockwellcollins.com>2019-10-27 15:59:02 -0500
committerGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2019-10-28 23:09:33 +0100
commit25a5b9665d7d3c7603283847ff6a278f61812514 (patch)
treeb05c16fa908869d289aade30693575a26bcf378c /toolchain
parentd4773b610a40be1d3ac7d793033abaf4eb2491ed (diff)
downloadbuildroot-25a5b9665d7d3c7603283847ff6a278f61812514.tar.gz
buildroot-25a5b9665d7d3c7603283847ff6a278f61812514.tar.bz2
toolchain: expose BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS for all toolchain types
This patch extends the "copy extra GCC libraries to target" feature to also work for internal toolchains. The variable has been renamed to be BR2_TOOLCHAIN_EXTRA_LIBS and the configuration option moved under the generic toolchain package. For external toolchains, the step that does the copy is still in the copy_toolchain_lib_root() helper which copies from the sysroot to the target. For the internal toolchain, the host gcc-final package does a post install hook to copy the libraries from the toolchain build folders to both the sysroot and target(!static). Examples where this can be useful is for adding debug libraries to the target like the GCC libsanitizer (libasan/liblsan/...). Cc: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Config.in14
-rw-r--r--toolchain/toolchain-external/pkg-toolchain-external.mk2
-rw-r--r--toolchain/toolchain-external/toolchain-external-custom/Config.in.options8
3 files changed, 15 insertions, 9 deletions
diff --git a/toolchain/Config.in b/toolchain/Config.in
index c9aa95985f..7960131f0c 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -221,6 +221,20 @@ config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST
Note: the full set of gconv libs are ~8MiB (on ARM).
+config BR2_TOOLCHAIN_EXTRA_LIBS
+ string "Extra toolchain libraries to be copied to target"
+ default BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS if BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS != "" # legacy
+ depends on !BR2_STATIC_LIBS
+ help
+ If your toolchain provides extra libraries that need to be
+ copied to the target filesystem, enter them here, separated
+ by spaces. The library should not include a suffix or any
+ type of pre/post wildcard.
+
+ Examples where this can be useful is for adding debug
+ libraries to the target like the GCC libsanitizer.
+ e.g. "libasan liblsan libtsan libubsan"
+
# This boolean is true if the toolchain provides a built-in full
# featured gettext implementation (glibc), and false if only a stub
# gettext implementation is provided (uclibc, musl)
diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 7dfd2bf1bd..50cfef23f5 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -156,7 +156,7 @@ ifeq ($(BR2_TOOLCHAIN_HAS_DLANG),y)
TOOLCHAIN_EXTERNAL_LIBS += libgdruntime.so* libgphobos.so*
endif
-TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
+TOOLCHAIN_EXTERNAL_LIBS += $(addsuffix .so*,$(call qstrip,$(BR2_TOOLCHAIN_EXTRA_LIBS)))
#
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
index a36747f490..fd95f8201b 100644
--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
@@ -438,12 +438,4 @@ config BR2_TOOLCHAIN_EXTERNAL_OPENMP
support. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
-config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
- string "Extra toolchain libraries to be copied to target"
- help
- If your external toolchain provides extra libraries that
- need to be copied to the target filesystem, enter them
- here, separated by spaces. They will be copied to the
- target's /lib directory.
-
endif