All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] add support for common ABI options (for FLAT)
@ 2010-11-18 11:51 Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2010-11-18 11:51 UTC (permalink / raw)
  To: buildroot

Buildroot atm assumes shared library support everywhere.  This is not the
case with FLAT toolchains where everything is static.  So start common ABI
options to let targets control this behavior.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
note: this depends on the initial Blackfin support patch

 target/Config.in.arch                    |   13 +++++++++++++
 toolchain/helpers.mk                     |   12 +++++++++---
 toolchain/toolchain-external/ext-tool.mk |    4 ++++
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index 5b3e325..c032e45 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -40,6 +40,15 @@ config BR2_xtensa
 	bool "xtensa"
 endchoice
 
+config BR2_ABI_FLAT
+	bool
+	default n
+
+config BR2_ABI_ELF
+	bool
+	default y
+	depends on !BR2_ABI_FLAT
+
 #
 # Keep the variants separate, there's no need to clutter everything else.
 # sh is fairly "special" in this regard, as virtually everyone else has
@@ -135,12 +144,16 @@ choice
 	default BR2_BFIN_FLAT
 config BR2_BFIN_FDPIC
 	bool "FDPIC"
+	select BR2_ABI_ELF
 config BR2_BFIN_FLAT
 	bool "FLAT"
+	select BR2_ABI_FLAT
 config BR2_BFIN_FLAT_SEP_DATA
 	bool "FLAT (Separate data)"
+	select BR2_ABI_FLAT
 config BR2_BFIN_SHARED_FLAT
 	bool "Shared FLAT"
+	select BR2_ABI_FLAT
 endchoice
 
 choice
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 05d43e7..3b4a603 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -189,12 +189,18 @@ check_uclibc_feature = \
 #
 # $1: sysroot directory
 #
-check_uclibc = \
-	SYSROOT_DIR="$(strip $1)"; \
+ifeq ($(BR2_ABI_FLAT),y)
+check_uclibc_ldso = :
+else
+check_uclibc_ldso = \
 	if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
-	fi; \
+	fi
+endif
+check_uclibc = \
+	SYSROOT_DIR="$(strip $1)"; \
+	$(check_uclibc_ldso); \
 	UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \
 	$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,BR2_INET_IPV6,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 2501256..8ada29a 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -41,7 +41,11 @@
 
 uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
+ifeq ($(BR2_ABI_FLAT),y)
+LIB_EXTERNAL_LIBS=
+else
 LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
+endif
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
 LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so
 endif
-- 
1.7.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] add support for common ABI options (for FLAT)
@ 2011-03-28  7:43 Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2011-03-28  7:43 UTC (permalink / raw)
  To: buildroot

Buildroot atm assumes shared library support everywhere.  This is not the
case with FLAT toolchains where everything is static.  So start common ABI
options to let targets control this behavior.

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 target/Config.in.arch                    |   13 +++++++++++++
 toolchain/helpers.mk                     |   12 +++++++++---
 toolchain/toolchain-external/ext-tool.mk |    4 ++++
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index 7c80945..687efcd 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -40,6 +40,15 @@ config BR2_xtensa
 	bool "xtensa"
 endchoice
 
+config BR2_ABI_FLAT
+	bool
+	default n
+
+config BR2_ABI_ELF
+	bool
+	default y
+	depends on !BR2_ABI_FLAT
+
 #
 # Keep the variants separate, there's no need to clutter everything else.
 # sh is fairly "special" in this regard, as virtually everyone else has
@@ -135,12 +144,16 @@ choice
 	default BR2_BFIN_FLAT
 config BR2_BFIN_FDPIC
 	bool "FDPIC"
+	select BR2_ABI_ELF
 config BR2_BFIN_FLAT
 	bool "FLAT"
+	select BR2_ABI_FLAT
 config BR2_BFIN_FLAT_SEP_DATA
 	bool "FLAT (Separate data)"
+	select BR2_ABI_FLAT
 config BR2_BFIN_SHARED_FLAT
 	bool "Shared FLAT"
+	select BR2_ABI_FLAT
 endchoice
 
 choice
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index db7c7f1..b432713 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -181,12 +181,18 @@ check_uclibc_feature = \
 #
 # $1: sysroot directory
 #
-check_uclibc = \
-	SYSROOT_DIR="$(strip $1)"; \
+ifeq ($(BR2_ABI_FLAT),y)
+check_uclibc_ldso = :
+else
+check_uclibc_ldso = \
 	if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
-	fi; \
+	fi
+endif
+check_uclibc = \
+	SYSROOT_DIR="$(strip $1)"; \
+	$(check_uclibc_ldso); \
 	UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \
 	$(call check_uclibc_feature,__ARCH_USE_MMU__,BR2_USE_MMU,$${UCLIBC_CONFIG_FILE},MMU support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_LFS__,BR2_LARGEFILE,$${UCLIBC_CONFIG_FILE},Large file support) ;\
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index f6249ef..75a36e7 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -44,7 +44,11 @@
 
 uclibc: dependencies $(STAMP_DIR)/ext-toolchain-installed
 
+ifeq ($(BR2_ABI_FLAT),y)
+LIB_EXTERNAL_LIBS=
+else
 LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
+endif
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
 LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so
 endif
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-28  7:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 11:51 [Buildroot] [PATCH] add support for common ABI options (for FLAT) Mike Frysinger
2011-03-28  7:43 Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.