* [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements
@ 2010-12-05 9:25 Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection Thomas Petazzoni
` (15 more replies)
0 siblings, 16 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
Hello,
Here is a set of patches that mainly improves the toolchain
configuration and support, with two majors directions :
* Turn BR2_LARGEFILE, BR2_INET_RPC, BR2_INET_RPC and similar options
into hidden options, and let the toolchain backends present them as
they wish. For example for RPC, xthe Buildroot backend says "Do you
want RPC ?" while the external toolchain backend doesn't show the
option when glibc is used, or present an option "Does your
toolchain has RPC ?" when uclibc is used.
So really those options should now be called
BR2_TOOLCHAIN_HAS_LARGEFILE, BR2_TOOLCHAIN_HAS_INET_RPC, etc, but
we kept the old names in this patch series because changing them
impacts all packages. This will be done later.
A first commit handles largefile, rpc, ipv6, locale and program
invocation options, and some later commits handle the C++ option
and thread options.
* Extend external toolchain with "profiles", i.e well-known external
toolchains. For those toolchains, Buildroot can automatically
download and install them and will automatically select the
appropriate configuration options (C library used, RPC, IPv6,
locale, etc.). So an user can know tell Buildroot to use a
CodeSourcery toolchain, and Buildroot will do all the job. Such
toolchains are extracted in $(O)/external-toolchain, but my intent
is to move it to $(O)/toolchain once Gustavoz's toolchain cleanup
work is done.
This work keeps the ability of doing some more manual things with
external toolchains:
- For an external toolchain profile, you can tell Buildroot *not*
to download it, and in that case, you must provide Buildroot
with the location of the external toolchain.
- You keep the ability to specify a custom profile, where you
will have to tell Buildroot everything: location of the
toolchain, toolchain prefix, C library used, etc.
In my opinion, those two directions really make the external
toolchains easier and simpler to use. One topic left is the gdb
options, but I decided not to change it, in order to not conflict too
much with Gustavoz's work.
The rest of the changes are more minor modifications, related to these
toolchain improvements.
Regards,
Thomas
The following changes since commit 7e9c3a387820154fd1355f23c2669072c0c3a5f7:
Peter Korsgaard (1):
docs/news.html: add 2010.11 announce link
are available in the git repository at:
git://git.busybox.net/~tpetazzoni/git/buildroot for-2011.02/toolchain-improvements
Thomas Petazzoni (15):
toolchain: Improve C library option selection
toolchain: remove ending semi-colon in helpers
toolchain: add support for external toolchain profiles and download
toolchain: remove toolchain-specific stripping
toolchain: rework C++ options
toolchain: move Stack Protection Support option
ltp-testsuite: bump version and use autotargets
toolchain: rework thread options
toolchain: check that the thread option selection is correct
gcc: disable libgomp when thread support is disabled
uclibc: add patch for uClibc snapshot to fix build issue
toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used
toolchain: expose thread options in the Crosstool-NG backend
toolchain: more verbose in crosstool-ng backend
package: pass TARGET_MAKE_ENV at install/clean/uninstall steps
Makefile | 3 +-
package/Makefile.autotools.in | 10 +-
package/Makefile.in | 12 +-
package/dmalloc/dmalloc.mk | 6 +-
package/ltp-testsuite/Config.in | 15 +-
...tp-testsuite-20101031-disable-controllers.patch | 25 ++
.../ltp-testsuite-disable-ipv6-tests.patch | 123 ----------
.../ltp-testsuite-enable-openposix-for-nptl.patch | 33 ---
.../ltp-testsuite-generate-needs-bash.patch | 8 -
.../ltp-testsuite-sched-getaffinity.patch | 11 -
.../ltp-testsuite-uclibc-syscalls.patch | 11 -
package/ltp-testsuite/ltp-testsuite.mk | 68 +------
package/lzma/Config.in | 4 +-
package/multimedia/ffmpeg/ffmpeg.mk | 6 +-
package/openvpn/openvpn.mk | 6 +-
package/rpm/Config.in | 4 +-
toolchain/Config.in | 5 +-
toolchain/Makefile.in | 6 -
toolchain/gcc/gcc-uclibc-4.x.mk | 8 +-
toolchain/helpers.mk | 16 +-
toolchain/toolchain-buildroot/Config.in.2 | 101 ++++++++
toolchain/toolchain-common.in | 121 ++---------
toolchain/toolchain-crosstool-ng/Config.in | 95 ++++++++-
.../toolchain-crosstool-ng/crosstool-ng.config | 8 +-
toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 25 ++-
toolchain/toolchain-external/Config.in | 240 +++++++++++++++++++-
toolchain/toolchain-external/Config.in.2 | 17 --
toolchain/toolchain-external/ext-tool.mk | 212 ++++++++++++------
...tconf-only-use-specs-names-when-available.patch | 131 +++++++++++
toolchain/uClibc/uclibc.mk | 2 +-
30 files changed, 827 insertions(+), 505 deletions(-)
create mode 100644 package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-disable-ipv6-tests.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-enable-openposix-for-nptl.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-generate-needs-bash.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-sched-getaffinity.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-uclibc-syscalls.patch
delete mode 100644 toolchain/toolchain-external/Config.in.2
create mode 100644 toolchain/uClibc/uClibc.snapshot.getconf-only-use-specs-names-when-available.patch
Thanks,
--
Thomas Petazzoni
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:14 ` Peter Korsgaard
2010-12-05 9:25 ` [Buildroot] [PATCH 02/15] toolchain: remove ending semi-colon in helpers Thomas Petazzoni
` (14 subsequent siblings)
15 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
Turn BR2_LARGEFILE, BR2_INET_IPV6, BR2_INET_RPC, BR2_USE_WCHAR,
BR2_ENABLE_LOCALE and BR2_PROGRAM_INVOCATION into hidden options.
Then, for Buildroot toolchains, external toolchains and Crosstool-NG
toolchains, provide visible options that selects the hidden options.
This allows :
* To show a different label and help text in the case of Buildroot
toolchain (do you want to enable feature X ?) and in the case of
external toolchain (is feature X available in your toolchain ?)
* To not show any option when a glibc external toolchain is selected
(since glibc is assumed to support all of largefile, IPv6, RPC,
WCHAR, locale and program invocation) and have them all selected in
that case.
There is some amount of duplication between Buildroot toolchain config
options and Crosstool-NG toolchain config options, because kconfig
doesn't allow to source the same Config.in file twice (even if under
mutually exclusive conditions). This duplication is more readable that
the hack that consists in splitting files in multiple pieces.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/toolchain-buildroot/Config.in.2 | 50 +++++++++++++++++++++++
toolchain/toolchain-common.in | 57 +++++----------------------
toolchain/toolchain-crosstool-ng/Config.in | 53 +++++++++++++++++++++++++
toolchain/toolchain-external/Config.in | 59 ++++++++++++++++++++++++++++
4 files changed, 172 insertions(+), 47 deletions(-)
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index 2a17796..d052b84 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -1,6 +1,56 @@
# Buildroot backend specific options
if BR2_TOOLCHAIN_BUILDROOT
+
+comment "Toolchain Options"
+
+config BR2_TOOLCHAIN_BUILDROOT_LARGEFILE
+ bool "Enable large file (files > 2 GB) support?"
+ select BR2_LARGEFILE
+ help
+ Enable this option if you want your toolchain to support
+ files bigger than 2 GB.
+
+config BR2_TOOLCHAIN_BUILDROOT_INET_IPV6
+ bool "Enable IPv6"
+ select BR2_INET_IPV6
+ help
+ Enable this option if you want your toolchain to support
+ IPv6.
+
+config BR2_TOOLCHAIN_BUILDROOT_INET_RPC
+ bool "Enable RPC"
+ select BR2_INET_RPC
+ help
+ Enable this option if you want your toolchain to support
+ RPC (needed for NFS, for example).
+
+config BR2_TOOLCHAIN_BUILDROOT_WCHAR
+ bool "Enable WCHAR support"
+ select BR2_USE_WCHAR
+ help
+ Enable this option if you want your toolchain to support
+ wide characters (i.e characters longer than 8 bits, needed
+ for locale support).
+
+config BR2_TOOLCHAIN_BUILDROOT_LOCALE
+ bool "Enable toolchain locale/i18n support"
+ select BR2_TOOLCHAIN_BUILDROOT_WCHAR
+ select BR2_ENABLE_LOCALE
+ help
+ Enable this option if you want your toolchain to support
+ localization and internationalization.
+
+config BR2_TOOLCHAIN_BUILDROOT_PROGRAM_INVOCATION
+ bool "Enable 'program invocation name'"
+ select BR2_PROGRAM_INVOCATION
+ help
+ Enable this option if you want your toolchain to support the
+ GNU-specific program_invocation_name and
+ program_invocation_short_name strings. Some GNU packages
+ (like tar and coreutils) utilize these for extra useful
+ output, but in general are not required.
+
source "toolchain/elf2flt/Config.in"
source "toolchain/mklibs/Config.in"
source "toolchain/sstrip/Config.in"
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index f67c30a..ea47466 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -5,42 +5,23 @@
# so put it here instead
source "toolchain/gdb/Config.in"
-comment "Common Toolchain Options"
-
config BR2_LARGEFILE
- bool "Enable large file (files > 2 GB) support?"
- help
- If you are building your own toolchain and you want to
- support files larger than 2GB then enable this option.
- If you have an external binary toolchain that has been
- built with large file support (files > 2GB) then enable
- this option.
+ bool
config BR2_INET_IPV6
- bool "Enable IPv6"
- help
- If you are building your own toolchain and you want to
- enable IPV6 support then enable this option.
- If you have an external binary toolchain that has been
- built with IPV6 support then enable this option.
+ bool
config BR2_INET_RPC
- bool "Enable RPC"
- help
- Enable RPC. RPC support is needed for nfs.
- If you are building your own toolchain and you want to
- enable RPC support then enable this option.
- If you have an external binary toolchain that has been
- built with RPC support then enable this option.
+ bool
+
+config BR2_USE_WCHAR
+ bool
config BR2_ENABLE_LOCALE
- bool "Enable toolchain locale/i18n support?"
- select BR2_USE_WCHAR
- help
- If you are building your own toolchain and you want to
- enable locale/i18n support then enable this option.
- If you have an external binary toolchain that has been
- built with locale/i18n support then enable this option.
+ bool
+
+config BR2_PROGRAM_INVOCATION
+ bool
config BR2_ENABLE_LOCALE_PURGE
bool "Purge unwanted locales"
@@ -78,14 +59,6 @@ config BR2_NEEDS_GETTEXT_IF_LOCALE
bool
default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE)
-config BR2_USE_WCHAR
- bool "Enable WCHAR support"
- help
- If you are building your own toolchain and you want to
- enable WCHAR support then enable this option.
- If you have an external binary toolchain that has been built
- with WCHAR support then enable this option.
-
config BR2_PREFER_SOFT_FLOAT
bool
default y if BR2_arm || BR2_armeb || BR2_avr32 || BR2_mips || BR2_mipsel
@@ -135,16 +108,6 @@ choice
depends on BR2_UCLIBC_VERSION_SNAPSHOT
endchoice
-config BR2_PROGRAM_INVOCATION
- bool "Enable 'program invocation name'"
- help
- Support for the GNU-specific program_invocation_name and
- program_invocation_short_name strings. Some GNU packages
- (like tar and coreutils) utilize these for extra useful
- output, but in general are not required.
- If you have an external binary toolchain that has been built
- with program invocation support then enable this option.
-
config BR2_GCC_CROSS_CXX
bool
help
diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
index f9b7e69..db3506e 100644
--- a/toolchain/toolchain-crosstool-ng/Config.in
+++ b/toolchain/toolchain-crosstool-ng/Config.in
@@ -45,6 +45,59 @@ config BR2_TOOLCHAIN_CTNG_CONFIG
To finetune your toolchain, you can also call:
make ctng-menuconfig
+if BR2_TOOLCHAIN_CTNG_uClibc
+
+comment "Toolchain Options"
+
+config BR2_TOOLCHAIN_CTNG_uClibc_LARGEFILE
+ bool "Enable large file (files > 2 GB) support?"
+ select BR2_LARGEFILE
+ help
+ Enable this option if you want your toolchain to support
+ files bigger than 2 GB.
+
+config BR2_TOOLCHAIN_CTNG_uClibc_INET_IPV6
+ bool "Enable IPv6"
+ select BR2_INET_IPV6
+ help
+ Enable this option if you want your toolchain to support
+ IPv6.
+
+config BR2_TOOLCHAIN_CTNG_uClibc_INET_RPC
+ bool "Enable RPC"
+ select BR2_INET_RPC
+ help
+ Enable this option if you want your toolchain to support
+ RPC (needed for NFS, for example).
+
+config BR2_TOOLCHAIN_CTNG_uClibc_WCHAR
+ bool "Enable WCHAR support"
+ select BR2_USE_WCHAR
+ help
+ Enable this option if you want your toolchain to support
+ wide characters (i.e characters longer than 8 bits, needed
+ for locale support).
+
+config BR2_TOOLCHAIN_CTNG_uClibc_LOCALE
+ bool "Enable toolchain locale/i18n support"
+ select BR2_TOOLCHAIN_CTNG_uClibc_WCHAR
+ select BR2_ENABLE_LOCALE
+ help
+ Enable this option if you want your toolchain to support
+ localization and internationalization.
+
+config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION
+ bool "Enable 'program invocation name'"
+ select BR2_PROGRAM_INVOCATION
+ help
+ Enable this option if you want your toolchain to support the
+ GNU-specific program_invocation_name and
+ program_invocation_short_name strings. Some GNU packages
+ (like tar and coreutils) utilize these for extra useful
+ output, but in general are not required.
+
+endif # BR2_TOOLCHAIN_CTNG_uClibc
+
config BR2_TOOLCHAIN_CTNG_STRIP_LIBS
bool "Strip libs copied to target"
default !BR2_STRIP_none
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index a340de6..f83f2cb 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -10,9 +10,68 @@ config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_GLIBC
bool "glibc"
+ select BR2_LARGEFILE
+ select BR2_INET_IPV6
+ select BR2_INET_RPC
+ select BR2_USE_WCHAR
+ select BR2_ENABLE_LOCALE
+ select BR2_PROGRAM_INVOCATION
endchoice
+if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+
+config BR2_TOOLCHAIN_EXTERNAL_LARGEFILE
+ bool "Toolchain has large file support ?"
+ select BR2_LARGEFILE
+ help
+ Select this option if your external toolchain supports
+ largefile. If you don't know, leave the default value,
+ Buildroot will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_INET_IPV6
+ bool "Toolchain has IPv6 support ?"
+ select BR2_INET_IPV6
+ help
+ Select this option if your external toolchain supports
+ IPv6. If you don't know, leave the default value, Buildroot
+ will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
+ bool "Toolchain has RPC support ?"
+ select BR2_INET_RPC
+ help
+ Select this option if your external toolchain supports
+ RPC. If you don't know, leave the default value, Buildroot
+ will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_WCHAR
+ bool "Toolchain has WCHAR support ?"
+ select BR2_USE_WCHAR
+ help
+ Select this option if your external toolchain supports
+ WCHAR. If you don't know, leave the default value, Buildroot
+ will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_LOCALE
+ bool "Toolchain has locale support ?"
+ select BR2_TOOLCHAIN_EXTERNAL_WCHAR
+ select BR2_ENABLE_LOCALE
+ help
+ Select this option if your external toolchain has locale
+ support. If you don't know, leave the default value,
+ Buildroot will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_PROGRAM_INVOCATION
+ bool "Toolchain has program invocation support ?"
+ select BR2_PROGRAM_INVOCATION
+ help
+ Select this option if your external toolchain has program
+ invocation support. If you don't know, leave the default
+ value, Buildroot will tell you if it's correct or not.
+
+endif
+
config BR2_TOOLCHAIN_EXTERNAL_STRIP
bool
default y
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 02/15] toolchain: remove ending semi-colon in helpers
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download Thomas Petazzoni
` (13 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
Some helpers had their final line ending with a semi-colon, some did
not. For consistency, remove the final semi-colon from all helpers,
it's the responsability of the caller to add the final semi-colon as
needed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/helpers.mk | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 05d43e7..43c6db3 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -201,7 +201,7 @@ check_uclibc = \
$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_INET_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
- $(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support) ;\
+ $(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support)
#
# Check that the Buildroot configuration of the ABI matches the
@@ -221,7 +221,7 @@ check_arm_abi = \
if [ x$(BR2_ARM_EABI) = x"y" -a $${EXT_TOOLCHAIN_ABI} = "oabi" ] ; then \
echo "Incorrect ABI setting" ; \
exit 1 ; \
- fi ; \
+ fi
#
# Check that the external toolchain supports C++
@@ -231,7 +231,7 @@ check_cplusplus = \
if test $$? -ne 0 ; then \
echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \
exit 1 ; \
- fi ; \
+ fi
#
# Check that the cross-compiler given in the configuration exists
@@ -241,4 +241,4 @@ check_cross_compiler_exists = \
if test $$? -ne 0 ; then \
echo "Cannot execute cross-compiler '$(TARGET_CC)'" ; \
exit 1 ; \
- fi ; \
+ fi
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 02/15] toolchain: remove ending semi-colon in helpers Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:26 ` Peter Korsgaard
2010-12-05 9:25 ` [Buildroot] [PATCH 04/15] toolchain: remove toolchain-specific stripping Thomas Petazzoni
` (12 subsequent siblings)
15 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
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>
---
Makefile | 3 +-
package/Makefile.in | 10 +-
toolchain/Config.in | 5 +-
toolchain/toolchain-external/Config.in | 169 ++++++++++++++++++++++--
toolchain/toolchain-external/Config.in.2 | 17 ---
toolchain/toolchain-external/ext-tool.mk | 210 +++++++++++++++++++++---------
6 files changed, 316 insertions(+), 98 deletions(-)
delete mode 100644 toolchain/toolchain-external/Config.in.2
diff --git a/Makefile b/Makefile
index 596470f..c62c269 100644
--- a/Makefile
+++ b/Makefile
@@ -272,6 +272,7 @@ STAMP_DIR:=$(BASE_DIR)/stamps
BINARIES_DIR:=$(BASE_DIR)/images
TARGET_DIR:=$(BASE_DIR)/target
TOOLCHAIN_DIR=$(BASE_DIR)/toolchain
+TOOLCHAIN_EXTERNAL_DIR=$(BASE_DIR)/external-toolchain
TARGET_SKELETON=$(TOPDIR)/fs/skeleton
BR2_DEPENDS_DIR=$(BUILD_DIR)/buildroot-config
@@ -586,7 +587,7 @@ endif
clean:
rm -rf $(STAGING_DIR) $(TARGET_DIR) $(BINARIES_DIR) $(HOST_DIR) \
- $(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR)
+ $(STAMP_DIR) $(BUILD_DIR) $(TOOLCHAIN_DIR) $(TOOLCHAIN_EXTERNAL_DIR)
distclean: clean
ifeq ($(DL_DIR),$(TOPDIR)/dl)
diff --git a/package/Makefile.in b/package/Makefile.in
index 2ca8c31..d8b85fa 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -114,13 +114,13 @@ REAL_GNU_TARGET_NAME=$(ARCH)-unknown-linux-$(LIBC)$(ABI)
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
TARGET_CROSS=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-TOOLCHAIN_EXTERNAL_PREFIX:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
-TOOLCHAIN_EXTERNAL_PATH:=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
-ifneq ($(TOOLCHAIN_EXTERNAL_PATH),)
-TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_PATH)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
+TOOLCHAIN_EXTERNAL_PREFIX=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
+TOOLCHAIN_EXTERNAL_LOCATION=$(TOOLCHAIN_EXTERNAL_DIR)
else
-TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_PREFIX)-
+TOOLCHAIN_EXTERNAL_LOCATION=$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
endif
+TARGET_CROSS=$(TOOLCHAIN_EXTERNAL_LOCATION)/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
else ifeq ($(BR2_TOOLCHAIN_CTNG),y)
TARGET_CROSS=$(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-
endif
diff --git a/toolchain/Config.in b/toolchain/Config.in
index d476cbf..8baa0c1 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -13,6 +13,10 @@ config BR2_TOOLCHAIN_BUILDROOT
config BR2_TOOLCHAIN_EXTERNAL
bool "External toolchain"
+ help
+ Select if you want to use an existing cross-compiling
+ toolchain. Buildroot can either download automatically a
+ toolchain, or use an already installed toolchain.
config BR2_TOOLCHAIN_CTNG
bool "Crosstool-NG toolchain"
@@ -29,6 +33,5 @@ source "toolchain/toolchain-external/Config.in"
source "toolchain/toolchain-crosstool-ng/Config.in"
source "toolchain/toolchain-common.in"
source "toolchain/toolchain-buildroot/Config.in.2"
-source "toolchain/toolchain-external/Config.in.2"
endmenu
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index f83f2cb..60866e1 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -1,15 +1,142 @@
-#
-
if BR2_TOOLCHAIN_EXTERNAL
+
choice
- prompt "External toolchain C library"
- default BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+ prompt "Toolchain"
-config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
- bool "uClibc"
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
+ bool "CodeSourcery ARM 2010.09"
+ depends on BR2_arm
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+ help
+ Toolchain for the ARM architecture, from CodeSourcery. It
+ uses gcc 4.5.1, binutils 2.20, glibc 2.11 and gdb 7.2.50,
+ kernel headers 2.6.35.2. It has support for the following
+ variants:
+ - ARMv5TE, little endian, soft-float, glibc
+ - ARMv4T, little endian, soft-float, glibc
+ - ARMv7-A, Thumb 2, little endian, soft-float, glibc
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
+ bool "CodeSourcery ARM 2010q1"
+ depends on BR2_arm
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+ help
+ Toolchain for the ARM architecture, from CodeSourcery. It
+ uses gcc 4.4.1, binutils 2.19, glibc 2.11, gdb 7.0.50 and
+ kernel headers 2.6.32. It has support for the following
+ variants:
+ - ARMv5T, little endian, soft-float, glibc
+ - ARMv4T, little endian, soft-float, glibc
+ - ARMv7-A, Thumb 2, little endian, soft-float, glibc
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1
+ bool "CodeSourcery ARM 2009q1"
+ depends on BR2_arm
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+ help
+ Toolchain for the ARM architecture, from CodeSourcery. It
+ uses gcc 4.3.3, binutils 2.19, glibc 2.8 and gdb 6.8 and
+ kernel headers 2.6.30. It has support for the following
+ variants:
+ - ARMv5T, little endian, soft-float, glibc
+ - ARMv4T, little endian, soft-float, glibc
+ - ARMv7-A, Thumb 2, little endian, soft-float, glibc
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
+ bool "CodeSourcery MIPS 4.4"
+ depends on BR2_mips || BR2_mipsel
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+ help
+ Toolchain for the MIPS architecture, from CodeSourcery. It
+ uses gcc 4.4.1, binutils 2.19, glibc 2.11, uClibc 0.9.30 and
+ gdb 7.0, kernel headers 2.6.32. It has support for the
+ following variants:
+ - MIPS32 O32 big endian glibc
+ - MIPS32 O32 little endian glibc
+ - MIPS32 big endian soft float glibc
+ - MIPS32 little endian soft float glibc
+ - MIPS32 big endian microMIPS glibc
+ - MIPS32 little endian microMIPS glibc
+ - MIPS32 big endian soft float microMIPS glibc
+ - MIPS32 little endian soft float microMIPS glibc
+ - MIPS32 big endian uclibc
+ - MIPS32 little endian uclibc
+ - MIPS32 big endian soft float uclibc
+ - MIPS32 little endian soft float uclibc
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+ bool "CodeSoucery PowerPC 2010.09"
+ depends on BR2_powerpc
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+ help
+ Toolchain for the PowerPC architecture, from
+ CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
+ gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
+ the following variants:
+ - 603 glibc, 32 bits
+ - 603 soft float glibc, 32 bits
+ - e600 altivec glibc, 32 bits
+ - e500v1 glibc, 32 bits
+ - e500v2 glibc, 32 bits
+ - e500mc glibc, 32 bits
+ - 970 glibc hard-float, 64 bits
+
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
+ bool "CodeSoucery PowerPC 2010.09"
+ depends on BR2_sh
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+ help
+ Toolchain for the SuperH architecture, from CodeSourcery. It
+ uses gcc 4.5.1, binutils 2.20, glibc 2.11, uClibc 0.9.30,
+ gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
+ the following variants:
+ - SH4A, glibc, little endian
+ - SH4A, glibc, big endian
+ - SH4A, uClibc, little endian
+ - SH4A, uClibc, big endian
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+ bool "Custom toolchain"
+ help
+ Use this option to use a custom toolchain pre-installed on
+ your system.
+
+endchoice
+
+config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
+ bool "Download toolchain automatically"
+ default y
+ depends on !BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+ help
+ When enabled, Buildroot will automatically download and
+ install the selected external toolchain. When disabled,
+ Buildroot will use a pre-installed toolchain.
+
+config BR2_TOOLCHAIN_EXTERNAL_PATH
+ string "Toolchain path"
+ default "/path/to/toolchain/usr"
+ depends on !BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
+ help
+ Path to where the external toolchain is installed.
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
+ string "Toolchain prefix"
+ depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+ default "$(ARCH)-linux"
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+ string
+ default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1
+ default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
+ default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
+ default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
+ default "powerpc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+ default "sh4-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
+ default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
+ if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
config BR2_TOOLCHAIN_EXTERNAL_GLIBC
- bool "glibc"
+ bool
select BR2_LARGEFILE
select BR2_INET_IPV6
select BR2_INET_RPC
@@ -17,9 +144,26 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_ENABLE_LOCALE
select BR2_PROGRAM_INVOCATION
+config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+ bool
+
+if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+
+choice
+ prompt "External toolchain C library"
+ default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+ bool "uClibc"
+ select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC
+ bool "glibc"
+ select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+
endchoice
-if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
config BR2_TOOLCHAIN_EXTERNAL_LARGEFILE
bool "Toolchain has large file support ?"
@@ -70,12 +214,17 @@ config BR2_TOOLCHAIN_EXTERNAL_PROGRAM_INVOCATION
invocation support. If you don't know, leave the default
value, Buildroot will tell you if it's correct or not.
-endif
+endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+
+endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
config BR2_TOOLCHAIN_EXTERNAL_STRIP
bool
default y
+ depends on BR2_TOOLCHAIN_EXTERNAL
prompt "Strip shared libraries"
help
Strip shared libraries copied from the external toolchain.
-endif
+
+endif # BR2_TOOLCHAIN_EXTERNAL
+
diff --git a/toolchain/toolchain-external/Config.in.2 b/toolchain/toolchain-external/Config.in.2
deleted file mode 100644
index 489558c..0000000
--- a/toolchain/toolchain-external/Config.in.2
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-
-if BR2_TOOLCHAIN_EXTERNAL
-config BR2_TOOLCHAIN_EXTERNAL_PATH
- string "External toolchain path"
- default "/path/to/staging_dir/usr"
- help
- Path to where the external toolchain is installed.
-
-config BR2_TOOLCHAIN_EXTERNAL_PREFIX
- string "External toolchain prefix"
- default "$(ARCH)-linux"
- help
- This the the external toolchain prefix. For example:
- armeb-unknown-linux-gnu, mipsel-unknown-linux-gnu, etc.
-
-endif
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 7e4645d..900c06d 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -2,8 +2,9 @@
#
# This file implements the support for external toolchains, i.e
# toolchains that have not been produced by Buildroot itself and that
-# are already available on the system on which Buildroot runs. So far,
-# we have tested this with:
+# Buildroot can download from the Web or that are already available on
+# the system on which Buildroot runs. So far, we have tested this
+# with:
#
# * Toolchains generated by Crosstool-NG
# * Toolchains generated by Buildroot
@@ -13,17 +14,21 @@
#
# The basic principle is the following
#
-# 1. Perform some checks on the conformity between the toolchain
-# configuration described in the Buildroot menuconfig system, and the
-# real configuration of the external toolchain. This is for example
-# important to make sure that the Buildroot configuration system
-# knows whether the toolchain supports RPC, IPv6, locales, large
-# files, etc. Unfortunately, these things cannot be detected
-# automatically, since the value of these options (such as
-# BR2_INET_RPC) are needed at configuration time because these
-# options are used as dependencies for other options. And at
-# configuration time, we are not able to retrieve the external
-# toolchain configuration.
+# 1. a. For toolchains downloaded from the Web, Buildroot already
+# knows their configuration, so it just downloads them and extract
+# them in $(TOOLCHAIN_EXTERNAL_DIR).
+#
+# 1. b. For pre-installed toolchains, perform some checks on the
+# conformity between the toolchain configuration described in the
+# Buildroot menuconfig system, and the real configuration of the
+# external toolchain. This is for example important to make sure that
+# the Buildroot configuration system knows whether the toolchain
+# supports RPC, IPv6, locales, large files, etc. Unfortunately, these
+# things cannot be detected automatically, since the value of these
+# options (such as BR2_INET_RPC) are needed at configuration time
+# because these options are used as dependencies for other
+# options. And at configuration time, we are not able to retrieve the
+# external toolchain configuration.
#
# 2. Copy the libraries needed at runtime to the target directory,
# $(TARGET_DIR). Obviously, things such as the C library, the dynamic
@@ -55,61 +60,138 @@ LIB_EXTERNAL_LIBS+=libthread_db.so
endif # gdbserver
endif # ! no threads
-# SYSROOT_DIR selection. We first try the -print-sysroot option,
-# available in gcc 4.4.x and in some Codesourcery toolchains. If this
-# option is not available, we fallback to the value of --with-sysroot
-# as visible in CROSS-gcc -v. We don't pass any option to gcc that
-# could select a multilib variant as we want the "main" sysroot, which
-# contains all variants of the C library in the case of multilib
-# toolchains.
+# Details about sysroot directory selection.
+#
+# To find the sysroot directory:
+#
+# * We first try the -print-sysroot option, available in gcc 4.4.x
+# and in some Codesourcery toolchains.
+#
+# * If this option is not available, we fallback to the value of
+# --with-sysroot as visible in CROSS-gcc -v.
+#
+# When doing those tests, we don't pass any option to gcc that could
+# select a multilib variant (such as -march) as we want the "main"
+# sysroot, which contains all variants of the C library in the case of
+# multilib toolchains. We use the TARGET_CC_NO_SYSROOT variable, which
+# is the path of the cross-compiler, without the
+# --sysroot=$(STAGING_DIR), since what we want to find is the location
+# of the original toolchain sysroot. This "main" sysroot directory is
+# stored in SYSROOT_DIR.
+#
+# Then, multilib toolchains are a little bit more complicated, since
+# they in fact have multiple sysroots, one for each variant supported
+# by the toolchain. So we need to find the particular sysroot we're
+# interested in.
+#
+# To do so, we ask the compiler where its sysroot is by passing all
+# flags (including -march and al.), except the --sysroot flag since we
+# want to the compiler to tell us where its original sysroot
+# is. ARCH_SUBDIR will contain the subdirectory, in the main
+# SYSROOT_DIR, that corresponds to the selected architecture
+# variant. ARCH_SYSROOT_DIR will contain the full path to this
+# location.
+#
+# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The
+# fact is that in multilib toolchains, the header files are often only
+# present in the main sysroot, and only the libraries are available in
+# each variant-specific sysroot directory.
+
TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC))
-SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null)
-ifeq ($(SYSROOT_DIR),)
-SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;')
+
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
+TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(TOOLCHAIN_EXTERNAL_DIR)/.extracted
+else
+TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(STAMP_DIR)/ext-toolchain-checked
+endif
+
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1),y)
+TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/
+TOOLCHAIN_EXTERNAL_SOURCE=arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1),y)
+TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/
+TOOLCHAIN_EXTERNAL_SOURCE=arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009),y)
+TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/arm/portal/package7851/public/arm-none-linux-gnueabi/
+TOOLCHAIN_EXTERNAL_SOURCE=arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44),y)
+TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/mips/portal/package7401/public/mips-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=mips-4.4-303-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y)
+TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/power/portal/package7703/public/powerpc-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009),y)
+TOOLCHAIN_EXTERNAL_SITE=http://www.codesourcery.com/sgpp/lite/superh/portal/package7783/public/sh-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else
+# A value must be set (even if unused), otherwise the
+# $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) rule would override the main
+# $(DL_DIR) rule
+TOOLCHAIN_EXTERNAL_SOURCE=none
endif
-# Now, find if the toolchain specifies a sub-directory for the
-# specific architecture variant we're interested in. This is the case
-# with multilib toolchain, when the selected architecture variant is
-# not the default one. To do so, we ask the compiler by passing all
-# flags, except the --sysroot flag since we want to the compiler to
-# tell us where its original sysroot is. ARCH_SUBDIR will contain the
-# subdirectory, in the main SYSROOT_DIR, that corresponds to the
-# selected architecture variant. ARCH_SYSROOT_DIR will contain the
-# full path to this location.
-ARCH_SUBDIR=$(shell $(TARGET_CC_NO_SYSROOT) $(TARGET_CFLAGS) -print-multi-directory)
-ARCH_SYSROOT_DIR=$(SYSROOT_DIR)/$(ARCH_SUBDIR)
+# Download and extraction of a toolchain
+$(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE):
+ $(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE),$(TOOLCHAIN_EXTERNAL_SOURCE))
+
+$(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)
+ mkdir -p $(@D)
+ $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+ touch $@
-$(STAMP_DIR)/ext-toolchain-installed:
+# Checks for an already installed toolchain: check the toolchain
+# location, check that it supports sysroot, and then verify that it
+# matches the configuration provided in Buildroot: ABI, C++ support,
+# type of C library and all C library features.
+$(STAMP_DIR)/ext-toolchain-checked:
@echo "Checking external toolchain settings"
$(Q)$(call check_cross_compiler_exists)
-ifeq ($(strip $(SYSROOT_DIR)),)
- @echo "External toolchain doesn't support --sysroot. Cannot use."
- exit 1
-endif
-ifeq ($(BR2_arm),y)
- $(Q)$(call check_arm_abi)
-endif
-ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
- $(Q)$(call check_cplusplus)
-endif
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
- $(Q)$(call check_uclibc,$(SYSROOT_DIR))
-else
- $(Q)$(call check_glibc,$(SYSROOT_DIR))
-endif
- mkdir -p $(TARGET_DIR)/lib
- @echo "Copy external toolchain libraries to target..."
- $(Q)for libs in $(LIB_EXTERNAL_LIBS); do \
- $(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
- done
- $(Q)for libs in $(USR_LIB_EXTERNAL_LIBS); do \
- $(call copy_toolchain_lib_root,$(ARCH_SYSROOT_DIR),$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
- done
- @echo "Copy external toolchain sysroot to staging..."
- $(Q)$(call copy_toolchain_sysroot,$(SYSROOT_DIR),$(ARCH_SYSROOT_DIR),$(ARCH_SUBDIR))
- # Create lib64 symbolic links if needed
- $(Q)if [ -L $(ARCH_SYSROOT_DIR)/lib64 ] ; then \
- $(call create_lib64_symlinks) ; \
+ $(Q)SYSROOT_DIR=`$(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null` ; \
+ if test -z "$${SYSROOT_DIR}" ; then \
+ SYSROOT_DIR=`readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;'` ; \
+ fi ; \
+ if test -z "$${SYSROOT_DIR}" ; then \
+ @echo "External toolchain doesn't support --sysroot. Cannot use." ; \
+ exit 1 ; \
+ fi ; \
+ if test x$(BR2_arm) == x"y" ; then \
+ $(call check_arm_abi) ; \
+ fi ; \
+ if test x$(BR2_INSTALL_LIBSTDCPP) == x"y" ; then \
+ $(call check_cplusplus) ; \
+ fi ; \
+ if test x$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC) == x"y" ; then \
+ $(call check_uclibc,$${SYSROOT_DIR}) ; \
+ else \
+ $(call check_glibc,$${SYSROOT_DIR}) ; \
fi
- @touch $@
+
+# Integration of the toolchain into Buildroot: find the main sysroot
+# and the variant-specific sysroot, then copy the needed libraries to
+# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers)
+# to $(STAGING_DIR).
+$(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
+ $(Q)SYSROOT_DIR=`$(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null` ; \
+ if test -z "$${SYSROOT_DIR}" ; then \
+ SYSROOT_DIR=`readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;'` ; \
+ fi ; \
+ if test -z "$${SYSROOT_DIR}" ; then \
+ @echo "External toolchain doesn't support --sysroot. Cannot use." ; \
+ exit 1 ; \
+ fi ; \
+ ARCH_SUBDIR=`$(TARGET_CC_NO_SYSROOT) $(TARGET_CFLAGS) -print-multi-directory` ; \
+ ARCH_SYSROOT_DIR=$${SYSROOT_DIR}/$${ARCH_SUBDIR} ; \
+ mkdir -p $(TARGET_DIR)/lib ; \
+ echo "Copy external toolchain libraries to target..." ; \
+ for libs in $(LIB_EXTERNAL_LIBS); do \
+ $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+ done ; \
+ for libs in $(USR_LIB_EXTERNAL_LIBS); do \
+ $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+ done ; \
+ echo "Copy external toolchain sysroot to staging..." ; \
+ $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR}) ; \
+ if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \
+ $(call create_lib64_symlinks) ; \
+ fi ; \
+ touch $@
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 04/15] toolchain: remove toolchain-specific stripping
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (2 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 05/15] toolchain: rework C++ options Thomas Petazzoni
` (11 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
We already handle the stripping of libraries in $(TARGET_DIR) at the
global level, so there's no need to have toolchain-specific option and
code for this.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/helpers.mk | 9 ---------
toolchain/toolchain-crosstool-ng/Config.in | 6 ------
toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 4 ++--
toolchain/toolchain-external/Config.in | 8 --------
toolchain/toolchain-external/ext-tool.mk | 4 ++--
5 files changed, 4 insertions(+), 27 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 43c6db3..24f379d 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -15,13 +15,11 @@
# $1: arch specific sysroot directory
# $2: library name
# $3: destination directory of the libary, relative to $(TARGET_DIR)
-# $4: strip (y|n), default is to strip
#
copy_toolchain_lib_root = \
ARCH_SYSROOT_DIR="$(strip $1)"; \
LIB="$(strip $2)"; \
DESTDIR="$(strip $3)" ; \
- STRIP="$(strip $4)"; \
\
LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
find -L . -path "./lib/$${LIB}.*" -o \
@@ -39,13 +37,6 @@ copy_toolchain_lib_root = \
cp -d $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/; \
elif test -f $${FULLPATH}; then \
$(INSTALL) -D -m0755 $${FULLPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIB}; \
- case "$${STRIP}" in \
- (0 | n | no) \
-;; \
- (*) \
- $(TARGET_CROSS)strip "$(TARGET_DIR)/$${DESTDIR}/$${LIB}"; \
-;; \
- esac; \
else \
exit -1; \
fi; \
diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
index db3506e..5ba1071 100644
--- a/toolchain/toolchain-crosstool-ng/Config.in
+++ b/toolchain/toolchain-crosstool-ng/Config.in
@@ -98,10 +98,4 @@ config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION
endif # BR2_TOOLCHAIN_CTNG_uClibc
-config BR2_TOOLCHAIN_CTNG_STRIP_LIBS
- bool "Strip libs copied to target"
- default !BR2_STRIP_none
- help
- Strip shared libraries copied from the toolchain.
-
endif # BR2_TOOLCHAIN_CTNG
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index 31797c4..1c5e864 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -65,10 +65,10 @@ $(STAMP_DIR)/ct-ng-toolchain-installed: $(STAMP_DIR)/ct-ng-toolchain-built
echo "CTNG_SYSROOT='$${CTNG_SYSROOT}'"; \
echo "Copy external toolchain libraries to target..."; \
for libs in $(CTNG_LIBS_LIB); do \
- $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},$$libs,/lib,$(BR2_TOOLCHAIN_CTNG_STRIP_LIBS)); \
+ $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},$$libs,/lib); \
done; \
for libs in $(CTNG_LIBS_USR_LIB); do \
- $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},$$libs,/usr/lib,$(BR2_TOOLCHAIN_CTNG_STRIP_LIBS)); \
+ $(call copy_toolchain_lib_root,$${CTNG_SYSROOT},$$libs,/usr/lib); \
done; \
echo "Copy external toolchain sysroot to staging..."; \
$(call copy_toolchain_sysroot,$${CTNG_SYSROOT},$${CTNG_SYSROOT},)
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 60866e1..fe4fc17 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -218,13 +218,5 @@ endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
-config BR2_TOOLCHAIN_EXTERNAL_STRIP
- bool
- default y
- depends on BR2_TOOLCHAIN_EXTERNAL
- prompt "Strip shared libraries"
- help
- Strip shared libraries copied from the external toolchain.
-
endif # BR2_TOOLCHAIN_EXTERNAL
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 900c06d..6f6ec29 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -184,10 +184,10 @@ $(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
mkdir -p $(TARGET_DIR)/lib ; \
echo "Copy external toolchain libraries to target..." ; \
for libs in $(LIB_EXTERNAL_LIBS); do \
- $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+ $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/lib); \
done ; \
for libs in $(USR_LIB_EXTERNAL_LIBS); do \
- $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/usr/lib,$(BR2_TOOLCHAIN_EXTERNAL_STRIP)); \
+ $(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/usr/lib); \
done ; \
echo "Copy external toolchain sysroot to staging..." ; \
$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR}) ; \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 05/15] toolchain: rework C++ options
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (3 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 04/15] toolchain: remove toolchain-specific stripping Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:38 ` Peter Korsgaard
2010-12-12 10:25 ` Yann E. MORIN
2010-12-05 9:25 ` [Buildroot] [PATCH 06/15] toolchain: move Stack Protection Support option Thomas Petazzoni
` (10 subsequent siblings)
15 siblings, 2 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
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 could have two independent options: one to tell whether the
toolchain has C++ support (on which packages would depend on) and
another to tell whether the C++ library should be installed (that
packages would select). This would allow to have a C++-free target
filesystem even if the toolchain used actually supports C++.
- We should clarify the other language-related options (Fortran,
Java, Objective-C, etc.).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.in | 2 +-
package/lzma/Config.in | 4 ++--
package/rpm/Config.in | 4 ++--
toolchain/gcc/gcc-uclibc-4.x.mk | 2 +-
toolchain/toolchain-buildroot/Config.in.2 | 16 ++++++++++++++++
toolchain/toolchain-common.in | 25 +++----------------------
toolchain/toolchain-crosstool-ng/Config.in | 8 ++++++++
toolchain/toolchain-external/Config.in | 9 +++++++++
8 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/package/Makefile.in b/package/Makefile.in
index d8b85fa..b56b706 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -299,7 +299,7 @@ ifneq ($(BR2_INET_IPV6),y)
DISABLE_IPV6= --disable-ipv6
endif
-ifneq ($(BR2_GCC_CROSS_CXX),y)
+ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
TARGET_CONFIGURE_OPTS+=CXX=false
endif
diff --git a/package/lzma/Config.in b/package/lzma/Config.in
index 4904721..2b94dde 100644
--- a/package/lzma/Config.in
+++ b/package/lzma/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_LZMA
bool "lzma"
- depends on BR2_GCC_CROSS_CXX
+ depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_DEPRECATED
help
Lempel Ziv compression method (LZMA) is a compression
@@ -9,4 +9,4 @@ config BR2_PACKAGE_LZMA
http://tukaani.org/lzma/
comment "lzma requires a toolchain with C++ support"
- depends on !BR2_GCC_CROSS_CXX && BR2_DEPRECATED
+ depends on !BR2_INSTALL_LIBSTDCPP && BR2_DEPRECATED
diff --git a/package/rpm/Config.in b/package/rpm/Config.in
index 448606c..8d4c6a3 100644
--- a/package/rpm/Config.in
+++ b/package/rpm/Config.in
@@ -25,11 +25,11 @@ config BR2_PACKAGE_RPM_BZIP2_PAYLOADS
config BR2_PACKAGE_RPM_XZ_PAYLOADS
bool "support for xz payloads"
depends on BR2_PACKAGE_RPM
- depends on BR2_GCC_CROSS_CXX
+ depends on BR2_INSTALL_LIBSTDCPP
help
Support for xz payloads in RPM.
comment "xz payload support requires a toolchain with c++ support"
- depends on !BR2_GCC_CROSS_CXX
+ depends on !BR2_INSTALL_LIBSTDCPP
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index af085f7..eec6523 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -67,7 +67,7 @@ GCC_STAGING_PREREQ+=$(STAGING_DIR)/usr/lib/libc.a
GCC_TARGET_LANGUAGES:=c
GCC_CROSS_LANGUAGES:=c
-ifeq ($(BR2_GCC_CROSS_CXX),y)
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
GCC_CROSS_LANGUAGES:=$(GCC_CROSS_LANGUAGES),c++
endif
ifeq ($(BR2_GCC_CROSS_FORTRAN),y)
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index d052b84..dd459fc 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -51,6 +51,22 @@ config BR2_TOOLCHAIN_BUILDROOT_PROGRAM_INVOCATION
(like tar and coreutils) utilize these for extra useful
output, but in general are not required.
+config BR2_TOOLCHAIN_BUILDROOT_C_PLUS_PLUS
+ bool "Enable C++ support"
+ select BR2_INSTALL_LIBSTDCPP
+ depends on !(! BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE && \
+ BR2_TOOLCHAIN_BUILDROOT_LOCALE && \
+ BR2_UCLIBC_VERSION_0_9_31)
+ help
+ Enable this option if you want your toolchain to support the
+ C++ language and you want C++ libraries to be installed on
+ your target system.
+
+comment "C++ support broken in uClibc 0.9.31 with locale enabled with gcc 4.2"
+ depends on !BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE && \
+ BR2_TOOLCHAIN_BUILDROOT_LOCALE && \
+ BR2_UCLIBC_VERSION_0_9_31
+
source "toolchain/elf2flt/Config.in"
source "toolchain/mklibs/Config.in"
source "toolchain/sstrip/Config.in"
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index ea47466..2c54acd 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -23,6 +23,9 @@ config BR2_ENABLE_LOCALE
config BR2_PROGRAM_INVOCATION
bool
+config BR2_INSTALL_LIBSTDCPP
+ bool
+
config BR2_ENABLE_LOCALE_PURGE
bool "Purge unwanted locales"
help
@@ -108,28 +111,6 @@ choice
depends on BR2_UCLIBC_VERSION_SNAPSHOT
endchoice
-config BR2_GCC_CROSS_CXX
- bool
- help
- If you are building your own toolchain and want to build
- a C++ cross-compiler this needs to be enabled.
- If you have an external binary toolchain that has a C++ compiler
- and you want to use it then you need to enable this option.
-
-config BR2_INSTALL_LIBSTDCPP
- bool "Build/install c++ compiler and libstdc++?"
- select BR2_GCC_CROSS_CXX
- depends on !(! BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE && BR2_ENABLE_LOCALE && BR2_UCLIBC_VERSION_0_9_31)
- help
- If you are building your own toolchain and want to build and install
- the C++ compiler and library then you need to enable this option.
- If you have an external toolchain that has been built with C++
- support and you want to use the compiler / library then you need
- to select this option.
-
-comment "C++ support broken in uClibc 0.9.31 with locale enabled with gcc 4.2"
- depends on !BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE && BR2_ENABLE_LOCALE && BR2_UCLIBC_VERSION_0_9_31
-
config BR2_TARGET_OPTIMIZATION
string "Target Optimizations"
default "-pipe"
diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
index 5ba1071..b345297 100644
--- a/toolchain/toolchain-crosstool-ng/Config.in
+++ b/toolchain/toolchain-crosstool-ng/Config.in
@@ -98,4 +98,12 @@ config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION
endif # BR2_TOOLCHAIN_CTNG_uClibc
+config BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS
+ bool "Enable C++ support"
+ select BR2_INSTALL_LIBSTDCPP
+ help
+ Enable this option if you want your toolchain to support the
+ C++ language and you want C++ libraries to be installed on
+ your target system.
+
endif # BR2_TOOLCHAIN_CTNG
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index fe4fc17..1366f07 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -143,6 +143,7 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_USE_WCHAR
select BR2_ENABLE_LOCALE
select BR2_PROGRAM_INVOCATION
+ select BR2_INSTALL_LIBSTDCPP
config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
bool
@@ -214,6 +215,14 @@ config BR2_TOOLCHAIN_EXTERNAL_PROGRAM_INVOCATION
invocation support. If you don't know, leave the default
value, Buildroot will tell you if it's correct or not.
+config BR2_TOOLCHAIN_EXTERNAL_C_PLUS_PLUS
+ bool "Toolchain has C++ support ?"
+ select BR2_INSTALL_LIBSTDCPP
+ help
+ Enable this option if you want your external toolchain has
+ support for C++. If you don't know, leave the default value,
+ Buildroot will tell you if it's correct or not.
+
endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 06/15] toolchain: move Stack Protection Support option
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (4 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 05/15] toolchain: rework C++ options Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets Thomas Petazzoni
` (9 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
The BR2_USE_SSP option is only used inside the uClibc build, so only
meaningful for Buildroot internal toolchains. Therefore, the option is
moved to the right location so that it isn't visible when working with
external toolchains.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/toolchain-buildroot/Config.in.2 | 9 +++++++++
toolchain/toolchain-common.in | 9 ---------
toolchain/uClibc/uclibc.mk | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index dd459fc..9cf54d4 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -67,6 +67,15 @@ comment "C++ support broken in uClibc 0.9.31 with locale enabled with gcc 4.2"
BR2_TOOLCHAIN_BUILDROOT_LOCALE && \
BR2_UCLIBC_VERSION_0_9_31
+config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
+ bool "Enable stack protection support"
+ help
+ Enable stack smashing protection support using GCCs
+ -fstack-protector[-all] option.
+
+ See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
+ for details.
+
source "toolchain/elf2flt/Config.in"
source "toolchain/mklibs/Config.in"
source "toolchain/sstrip/Config.in"
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 2c54acd..5502ab4 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -76,15 +76,6 @@ config BR2_SOFT_FLOAT
functions, then everything will need to be compiled with soft
floating point support (-msoft-float).
-config BR2_USE_SSP
- bool "Enable stack protection support"
- help
- Enable stack smashing protection support using GCCs
- -fstack-protector[-all] option.
-
- See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
- for details.
-
choice
prompt "Thread library implementation"
default BR2_PTHREADS_OLD
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 1ed40cc..e05e16c 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -271,7 +271,7 @@ else
-e 's,.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=y\nHAS_FPU=y\nUCLIBC_HAS_FLOATS=y\n,g' \
$(UCLIBC_DIR)/.oldconfig
endif
-ifeq ($(BR2_USE_SSP),y)
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
$(SED) 's,^.*UCLIBC_HAS_SSP[^_].*,UCLIBC_HAS_SSP=y,g' $(UCLIBC_DIR)/.oldconfig
else
$(SED) 's,^.*UCLIBC_HAS_SSP[^_].*,UCLIBC_HAS_SSP=n,g' $(UCLIBC_DIR)/.oldconfig
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (5 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 06/15] toolchain: move Stack Protection Support option Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:42 ` Peter Korsgaard
2010-12-05 9:25 ` [Buildroot] [PATCH 08/15] toolchain: rework thread options Thomas Petazzoni
` (8 subsequent siblings)
15 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
Reworking ltp-testsuite is needed in order to get rid of some
thread-specific options that will be cleaned-up in the next commit.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/ltp-testsuite/Config.in | 15 ++-
...tp-testsuite-20101031-disable-controllers.patch | 25 ++++
.../ltp-testsuite-disable-ipv6-tests.patch | 123 --------------------
.../ltp-testsuite-enable-openposix-for-nptl.patch | 33 -----
.../ltp-testsuite-generate-needs-bash.patch | 8 --
.../ltp-testsuite-sched-getaffinity.patch | 11 --
.../ltp-testsuite-uclibc-syscalls.patch | 11 --
package/ltp-testsuite/ltp-testsuite.mk | 68 +----------
8 files changed, 42 insertions(+), 252 deletions(-)
create mode 100644 package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-disable-ipv6-tests.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-enable-openposix-for-nptl.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-generate-needs-bash.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-sched-getaffinity.patch
delete mode 100644 package/ltp-testsuite/ltp-testsuite-uclibc-syscalls.patch
diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in
index efe0db7..e059af3 100644
--- a/package/ltp-testsuite/Config.in
+++ b/package/ltp-testsuite/Config.in
@@ -1,7 +1,18 @@
-config BR2_PACKAGE_LTP-TESTSUITE
+config BR2_PACKAGE_LTP_TESTSUITE
bool "ltp-testsuite"
- depends on BROKEN
+ depends on !BR2_PTHREADS_NONE
+ # Several tests of LTP use legacy functions that are usually
+ # not available in uClibc.
+ depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
+ BR2_TOOLCHAIN_CTNG_glibc || \
+ BR2_TOOLCHAIN_CTNG_eglibc
help
The Linux Test Project provides a huge testsuite for Linux.
http://ltp.sourceforge.net/
+
+comment "ltp-testsuite requires a glibc toolchain with thread support"
+ depends on (!BR2_TOOLCHAIN_EXTERNAL_GLIBC && \
+ !BR2_TOOLCHAIN_CTNG_glibc && \
+ !BR2_TOOLCHAIN_CTNG_eglibc) || \
+ BR2_PTHREADS_NONE
diff --git a/package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch b/package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch
new file mode 100644
index 0000000..57d6038
--- /dev/null
+++ b/package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch
@@ -0,0 +1,25 @@
+Disable controllers testcases
+
+The cpuset controllers testcases do not build due to bug
+https://sourceforge.net/tracker/?func=detail&aid=3126942&group_id=3382&atid=103382. Disabling
+just the cpuset controllers do not seem to be easily possible, and
+those controller features are rarely used on embedded systems anyway.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ testcases/kernel/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: ltp-testsuite-20101031/testcases/kernel/Makefile
+===================================================================
+--- ltp-testsuite-20101031.orig/testcases/kernel/Makefile
++++ ltp-testsuite-20101031/testcases/kernel/Makefile
+@@ -28,7 +28,7 @@
+ #
+ # KEEP THIS LIST ALPHABETIZED PLEASE!
+ ifneq ($(UCLINUX),1)
+-SUBDIRS := containers connectors controllers fs hotplug io ipc mem \
++SUBDIRS := containers connectors fs hotplug io ipc mem \
+ numa performance_counters power_management pty sched \
+ security syscalls timers tracing
+ else
diff --git a/package/ltp-testsuite/ltp-testsuite-disable-ipv6-tests.patch b/package/ltp-testsuite/ltp-testsuite-disable-ipv6-tests.patch
deleted file mode 100644
index 6f1a927..0000000
--- a/package/ltp-testsuite/ltp-testsuite-disable-ipv6-tests.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-diff -ur ltp-full-20070228/testcases/network/sctp/func_tests/Makefile ltp-full-20070228-patched/testcases/network/sctp/func_tests/Makefile
---- ltp-full-20070228/testcases/network/sctp/func_tests/Makefile 2007-02-28 22:40:32.000000000 -0600
-+++ ltp-full-20070228-patched/testcases/network/sctp/func_tests/Makefile 2007-07-05 22:40:08.524219814 -0500
-@@ -26,8 +26,6 @@
-
- LOADLIBES += $(LIBS) -lltp -lsctputil -lsctp -lpthread
-
--V6FLAGS = -DTEST_V6=1 $(CFLAGS)
--
- SRCS = $(wildcard *.c)
-
- V4_TARGETS = test_1_to_1_accept_close test_1_to_1_addrs test_1_to_1_connect \
-@@ -42,11 +40,7 @@
- test_sctp_sendrecvmsg test_sockopt test_tcp_style \
- test_timetolive test_1_to_1_connectx test_connectx
-
--V6_TARGETS = test_basic_v6 test_fragments_v6 test_getname_v6 \
-- test_inaddr_any_v6 test_peeloff_v6 test_sctp_sendrecvmsg_v6 \
-- test_sockopt_v6 test_tcp_style_v6 test_timetolive_v6
--
--all: $(V4_TARGETS) $(V6_TARGETS)
-+all: $(V4_TARGETS)
-
- test_1_to_1_accept_close: test_1_to_1_accept_close.c
- test_1_to_1_addrs: test_1_to_1_addrs.c
-@@ -68,47 +62,19 @@
- test_assoc_shutdown: test_assoc_shutdown.c
- test_autoclose: test_autoclose.c
- test_basic: test_basic.c
--test_basic_v6: test_basic_v6.o
- test_connect: test_connect.c
- test_fragments: test_fragments.c
--test_fragments_v6: test_fragments_v6.o
- test_getname: test_getname.c
--test_getname_v6: test_getname_v6.o
- test_inaddr_any: test_inaddr_any.c
--test_inaddr_any_v6: test_inaddr_any_v6.o
- test_peeloff: test_peeloff.c
--test_peeloff_v6: test_peeloff_v6.o
- test_recvmsg: test_recvmsg.c
- test_sctp_sendrecvmsg: test_sctp_sendrecvmsg.c
--test_sctp_sendrecvmsg_v6: test_sctp_sendrecvmsg_v6.o
- test_sockopt: test_sockopt.c
--test_sockopt_v6: test_sockopt_v6.o
- test_tcp_style: test_tcp_style.c
--test_tcp_style_v6: test_tcp_style_v6.o
- test_timetolive: test_timetolive.c
--test_timetolive_v6: test_timetolive_v6.o
- test_1_to_1_connectx: test_1_to_1_connectx.c
- test_connectx: test_connectx.c
-
--test_basic_v6.o: test_basic.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_fragments_v6.o: test_fragments.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_getname_v6.o: test_getname.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_inaddr_any_v6.o: test_inaddr_any.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_peeloff_v6.o: test_peeloff.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_sctp_sendrecvmsg_v6.o: test_sctp_sendrecvmsg.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_sockopt_v6.o: test_sockopt.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_tcp_style_v6.o: test_tcp_style.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--test_timetolive_v6.o: test_timetolive.c
-- $(CC) -c $(V6FLAGS) -o $@ $^
--
- v4test: ${V4_TARGETS}
- @for a in $^; \
- do \
-@@ -123,26 +89,9 @@
- fi; \
- done
-
--v6test: ${V6_TARGETS}
-- @for a in $^; \
-- do \
-- echo "./$$a"; \
-- if ./$$a; \
-- then \
-- echo "$$a passes"; \
-- echo ""; \
-- else \
-- echo "$$a fails"; \
-- exit 1; \
-- fi; \
-- done
--
- install:
- ln -f $(V4_TARGETS) ../../../bin
-- ln -f $(V6_TARGETS) ../../../bin
-
- clean:
- rm -f $(V4_TARGETS)
-- rm -f $(V6_TARGETS)
-- rm -f ../../../bin/$(V6_TARGETS)
- rm -f *.o
-diff -ur ltp-full-20070228/testcases/network/stress/ns-tools/Makefile ltp-full-20070228-patched/testcases/network/stress/ns-tools/Makefile
---- ltp-full-20070228/testcases/network/stress/ns-tools/Makefile 2007-02-28 22:40:31.000000000 -0600
-+++ ltp-full-20070228-patched/testcases/network/stress/ns-tools/Makefile 2007-07-05 22:39:27.593059603 -0500
-@@ -10,9 +10,8 @@
- ns-echoclient
-
- BINS=ns-tcpserver ns-tcpclient ns-udpserver ns-udpclient \
-- ns-icmpv4_sender ns-icmpv6_sender \
-+ ns-icmpv4_sender \
- ns-udpsender \
-- ns-icmp_redirector \
- ns-mcast_receiver ns-igmp_querier \
- ns-mcast_join
-
-diff -ur ltp-full-20070228/tools/Makefile ltp-full-20070228-patched/tools/Makefile
---- ltp-full-20070228/tools/Makefile 2007-02-28 22:40:41.000000000 -0600
-+++ ltp-full-20070228-patched/tools/Makefile 2007-07-05 22:39:27.593059603 -0500
-@@ -1,4 +1,4 @@
--SUBDIRS = apicmds genload netpipe-2.4 netpipe-2.4-ipv6 #top-LTP
-+SUBDIRS = apicmds genload netpipe-2.4 #top-LTP
-
- CFLAGS+= -Wall -I../include
- LOADLIBES+= -L../lib -lltp
diff --git a/package/ltp-testsuite/ltp-testsuite-enable-openposix-for-nptl.patch b/package/ltp-testsuite/ltp-testsuite-enable-openposix-for-nptl.patch
deleted file mode 100644
index ebb888c..0000000
--- a/package/ltp-testsuite/ltp-testsuite-enable-openposix-for-nptl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ur ltp-full-20060615/testcases/Makefile ltp-full-20060615-patched/testcases/Makefile
---- ltp-full-20060615/testcases/Makefile 2006-01-31 08:48:38.000000000 -0600
-+++ ltp-full-20060615-patched/testcases/Makefile 2006-07-04 22:20:40.298850250 -0500
-@@ -1,4 +1,4 @@
--SUBDIRS = `ls */Makefile | sed "s/Makefile//g" | grep -v open | grep -v pounder | grep -v DOTS`
-+SUBDIRS = `ls */Makefile | sed "s/Makefile//g" | grep -v open_hpi | grep -v pounder | grep -v DOTS`
- UCLINUX_SUBDIRS = kernel
-
- all:
-diff -ur ltp-full-20060615/testcases/open_posix_testsuite/LDFLAGS ltp-full-20060615-patched/testcases/open_posix_testsuite/LDFLAGS
---- ltp-full-20060615/testcases/open_posix_testsuite/LDFLAGS 2005-06-03 11:29:49.000000000 -0500
-+++ ltp-full-20060615-patched/testcases/open_posix_testsuite/LDFLAGS 2006-07-04 22:21:34.322226500 -0500
-@@ -14,3 +14,5 @@
- # allow for the NPTL-specific compilation (used in some test cases)
- # Note: this sometimes require the package nptl-devel.*.rpm to be installed.
- #-I /usr/include/nptl -L /usr/lib/nptl -D_XOPEN_SOURCE=600 -lpthread -lrt -lm
-+
-+-D_XOPEN_SOURCE=600 -lpthread -lrt -lm -D_GNU_SOURCE
-diff -ur ltp-full-20060615/testcases/open_posix_testsuite/Makefile ltp-full-20060615-patched/testcases/open_posix_testsuite/Makefile
---- ltp-full-20060615/testcases/open_posix_testsuite/Makefile 2006-05-21 18:38:52.000000000 -0500
-+++ ltp-full-20060615-patched/testcases/open_posix_testsuite/Makefile 2006-07-04 22:22:16.660872500 -0500
-@@ -45,7 +45,10 @@
- TIMEOUT = $(top_builddir)/t0 $(TIMEOUT_VAL)
-
-
--all: build-tests run-tests
-+all: build-tests $(top_builddir)/t0
-+
-+install:
-+ @echo " "
-
- build-tests: $(BUILD_TESTS:.c=.test)
- run-tests: $(RUN_TESTS:.test=.run-test)
diff --git a/package/ltp-testsuite/ltp-testsuite-generate-needs-bash.patch b/package/ltp-testsuite/ltp-testsuite-generate-needs-bash.patch
deleted file mode 100644
index 1f28956..0000000
--- a/package/ltp-testsuite/ltp-testsuite-generate-needs-bash.patch
+++ /dev/null
@@ -1,8 +0,0 @@
---- ltp-full-20061121/testcases/network/generate.sh.orig 2006-12-07 22:21:56.000000000 -0700
-+++ ltp-full-20061121/testcases/network/generate.sh 2006-12-07 22:22:05.000000000 -0700
-@@ -1,4 +1,4 @@
--#!/bin/sh
-+#!/bin/bash
- #
- # Copyright (c) International Business Machines Corp., 2001
- #
diff --git a/package/ltp-testsuite/ltp-testsuite-sched-getaffinity.patch b/package/ltp-testsuite/ltp-testsuite-sched-getaffinity.patch
deleted file mode 100644
index 9e4a9d8..0000000
--- a/package/ltp-testsuite/ltp-testsuite-sched-getaffinity.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ltp-full-20090630/testcases/kernel/syscalls/sched_getaffinity/Makefile 2009-06-15 19:38:04.000000000 +0100
-+++ ltp-full-20090630.mod/testcases/kernel/syscalls/sched_getaffinity/Makefile 2009-07-02 15:02:33.000000000 +0100
-@@ -16,7 +16,7 @@
- # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- #
-
--CFLAGS += -I../../../../include -Wall
-+CFLAGS += -I../../../../include -Wall -D_GNU_SOURCE
- LDLIBS += -L../../../../lib -lltp
-
- SRCS = $(wildcard *.c)
diff --git a/package/ltp-testsuite/ltp-testsuite-uclibc-syscalls.patch b/package/ltp-testsuite/ltp-testsuite-uclibc-syscalls.patch
deleted file mode 100644
index 866a56c..0000000
--- a/package/ltp-testsuite/ltp-testsuite-uclibc-syscalls.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ltp-full-20090630/testcases/kernel/syscalls/Makefile 2009-02-26 11:37:28.000000000 +0000
-+++ ltp-full-20090630.mod/testcases/kernel/syscalls/Makefile 2009-07-02 14:57:30.000000000 +0100
-@@ -25,7 +25,7 @@
- #
- # Commented this out since there are directories here we don't want built by default
- #
--SUBDIR = `ls */Makefile | sed "s/Makefile//g"`
-+SUBDIR = `ls */Makefile | sed "s/Makefile//g" | grep -vE "^clock_nanosleep|quotactl|sched_getaffinity|sigreturn|unshare"`
- UCLINUX_SUBDIR = `ls */Makefile | sed "s/Makefile//g" | grep -vE "^fork|epoll|capget|capset|chmod|chown|llseek|nftw|clone|profil|getcontext|remap_file_pages"`
-
- all:
diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk
index 7be12fd..8f2a986 100644
--- a/package/ltp-testsuite/ltp-testsuite.mk
+++ b/package/ltp-testsuite/ltp-testsuite.mk
@@ -3,68 +3,8 @@
# ltp-testsuite
#
#############################################################
-LTP_TESTSUITE_VERSION:=20090630
-LTP_TESTSUITE_SOURCE:=ltp-full-$(LTP_TESTSUITE_VERSION).tgz
-LTP_TESTSUITE_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ltp
-LTP_TESTSUITE_CAT:=$(ZCAT)
-LTP_TESTSUITE_ROOT:=$(TARGET_DIR)/root
-LTP_TESTSUITE_DIR:=$(LTP_TESTSUITE_ROOT)/ltp-full-$(LTP_TESTSUITE_VERSION)
+LTP_TESTSUITE_VERSION = 20101031
+LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).bz2
+LTP_TESTSUITE_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/ltp
-#
-# Enable patches based upon different toolchain configuration options.
-#
-LTP_PATCHES:=ltp-testsuite-generate-needs-bash.patch \
- ltp-testsuite-sh-is-not-C-code.patch \
- ltp-testsuite-sched-getaffinity.patch \
- ltp-testsuite-uclibc-syscalls.patch
-
-ifeq ($(BR2_PTHREADS_NATIVE),y)
-LTP_PATCHES+=ltp-testsuite-enable-openposix-for-nptl.patch
-endif
-ifeq ($(BR2_EXT_PTHREADS_NATIVE),y)
-LTP_PATCHES+=ltp-testsuite-enable-openposix-for-nptl.patch
-endif
-ifneq ($(BR2_INET_IPV6),y)
-LTP_PATCHES+=ltp-testsuite-disable-ipv6-tests.patch
-endif
-
-$(DL_DIR)/$(LTP_TESTSUITE_SOURCE):
- $(call DOWNLOAD,$(LTP_TESTSUITE_SITE),$(LTP_TESTSUITE_SOURCE))
-
-ltp-testsuite-source: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE)
-
-$(LTP_TESTSUITE_DIR)/Makefile: $(DL_DIR)/$(LTP_TESTSUITE_SOURCE)
- mkdir -p $(LTP_TESTSUITE_ROOT)
- $(LTP_TESTSUITE_CAT) $(DL_DIR)/$(LTP_TESTSUITE_SOURCE) | tar -C $(LTP_TESTSUITE_ROOT) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(LTP_TESTSUITE_DIR) package/ltp-testsuite/ $(LTP_PATCHES)
- touch -c $@
-
-$(LTP_TESTSUITE_DIR)/.compiled: $(LTP_TESTSUITE_DIR)/Makefile
- $(MAKE1) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) \
- -C $(LTP_TESTSUITE_DIR) all
- touch $@
-
-$(LTP_TESTSUITE_DIR)/.installed: $(LTP_TESTSUITE_DIR)/.compiled
- # Use fakeroot to pretend to do 'make install' as root
- echo '$(MAKE1) $(TARGET_CONFIGURE_OPTS) CROSS_COMPILER=$(TARGET_CROSS) ' \
- '-C $(LTP_TESTSUITE_DIR) install' \
- > $(BUILD_DIR)/.fakeroot.ltp
- touch $@
-
-ltp-testsuite: host-fakeroot $(LTP_TESTSUITE_DIR)/.installed
-
-ltp-testsuite-clean:
- -$(MAKE) -C $(LTP_TESTSUITE_DIR) clean
-
-ltp-testsuite-dirclean:
- rm -rf $(LTP_TESTSUITE_DIR)
-
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_LTP-TESTSUITE),y)
-TARGETS+=ltp-testsuite
-endif
+$(eval $(call AUTOTARGETS,package,ltp-testsuite))
\ No newline at end of file
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 08/15] toolchain: rework thread options
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (6 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:45 ` Peter Korsgaard
2010-12-05 9:25 ` [Buildroot] [PATCH 09/15] toolchain: check that the thread option selection is correct Thomas Petazzoni
` (7 subsequent siblings)
15 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
The selection of linuxthreads, linuxthreads old or NPTL doesn't make a
lot of sense for external toolchains. So, instead, we :
* Introduce an hidden BR2_TOOLCHAIN_HAS_THREADS option, which must be
selected by toolchain specific options when thread support is
available. Package needing to test thread support should use this
option.
* Move the none/linuxthreads/linuxthreads old/NPTL selection to
Buildroot internal toolchain configuration.
* Add an option in external toolchain to tell if thread support is
available or not in the external toolchain.
ffmpeg, dmalloc and openvpn are fixed to use the new
BR2_TOOLCHAIN_HAS_THREADS option. For openvpn, --enable-threads=posix
is no longer used, as the configure script doesn't even understand
this option.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/dmalloc/dmalloc.mk | 6 +++---
package/ltp-testsuite/Config.in | 4 ++--
package/multimedia/ffmpeg/ffmpeg.mk | 6 +++---
package/openvpn/openvpn.mk | 6 +++---
toolchain/Makefile.in | 6 ------
toolchain/gcc/gcc-uclibc-4.x.mk | 6 ++++++
toolchain/toolchain-buildroot/Config.in.2 | 26 ++++++++++++++++++++++++++
toolchain/toolchain-common.in | 29 +++--------------------------
toolchain/toolchain-external/Config.in | 9 +++++++++
toolchain/toolchain-external/ext-tool.mk | 2 +-
10 files changed, 56 insertions(+), 44 deletions(-)
diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk
index 60ad763..dca0488 100644
--- a/package/dmalloc/dmalloc.mk
+++ b/package/dmalloc/dmalloc.mk
@@ -16,10 +16,10 @@ else
DMALLOC_CONF_OPT+=--disable-cxx
endif
-ifeq ($(BR2_PTHREADS_NONE),y)
-DMALLOC_CONF_OPT+=--disable-threads
-else
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
DMALLOC_CONF_OPT+=--enable-threads
+else
+DMALLOC_CONF_OPT+=--disable-threads
endif
define DMALLOC_POST_PATCH
diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in
index e059af3..5024cc3 100644
--- a/package/ltp-testsuite/Config.in
+++ b/package/ltp-testsuite/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_LTP_TESTSUITE
bool "ltp-testsuite"
- depends on !BR2_PTHREADS_NONE
+ depends on BR2_TOOLCHAIN_HAS_THREADS
# Several tests of LTP use legacy functions that are usually
# not available in uClibc.
depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
@@ -15,4 +15,4 @@ comment "ltp-testsuite requires a glibc toolchain with thread support"
depends on (!BR2_TOOLCHAIN_EXTERNAL_GLIBC && \
!BR2_TOOLCHAIN_CTNG_glibc && \
!BR2_TOOLCHAIN_CTNG_eglibc) || \
- BR2_PTHREADS_NONE
+ !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index 959efa3..f0ec930 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -111,10 +111,10 @@ else
FFMPEG_CONF_OPT += --disable-outdevs
endif
-ifeq ($(BR2_PTHREADS_NONE),y)
-FFMPEG_CONF_OPT += --disable-pthreads
-else
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
FFMPEG_CONF_OPT += --enable-pthreads
+else
+FFMPEG_CONF_OPT += --disable-pthreads
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk
index 7d8fb0c..ba91690 100644
--- a/package/openvpn/openvpn.mk
+++ b/package/openvpn/openvpn.mk
@@ -8,10 +8,10 @@ OPENVPN_VERSION = 2.1.3
OPENVPN_SITE = http://openvpn.net/release
OPENVPN_CONF_OPT = --enable-small
-ifeq ($(BR2_PTHREADS_NATIVE),y)
- OPENVPN_CONF_OPT += --enable-threads=posix
-else
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
OPENVPN_CONF_OPT += --enable-pthread
+else
+ OPENVPN_CONF_OPT += --disable-pthread
endif
ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)
diff --git a/toolchain/Makefile.in b/toolchain/Makefile.in
index 371509f..2cb6e95 100644
--- a/toolchain/Makefile.in
+++ b/toolchain/Makefile.in
@@ -1,9 +1,3 @@
-ifeq ($(BR2_PTHREADS_NONE),y)
-THREADS:=--disable-threads
-else
-THREADS:=--enable-threads
-endif
-
BR2_CONFIGURE_DEVEL_SYSROOT=--with-sysroot=$(TOOLCHAIN_DIR)/uClibc_dev/
BR2_CONFIGURE_STAGING_SYSROOT=--with-sysroot=$(STAGING_DIR)
BR2_CONFIGURE_BUILD_TOOLS=--with-build-time-tools=$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index eec6523..5f69906 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -138,6 +138,12 @@ else
GCC_TLS:=--disable-tls
endif
+ifeq ($(BR2_PTHREADS_NONE),y)
+THREADS:=--disable-threads
+else
+THREADS:=--enable-threads
+endif
+
ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
GCC_DECIMAL_FLOAT:=--disable-decimal-float
endif
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index 9cf54d4..39f9b4d 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -76,6 +76,32 @@ config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
for details.
+choice
+ prompt "Thread library implementation"
+ default BR2_PTHREADS_OLD
+ help
+ If you are building your own toolchain then select the type
+ of libpthreads you want to use. Not all thread variants work
+ with all versions of uClibc, the "linuxthreads (stable/old)"
+ may be a working fallback if you need threading at all.
+
+ config BR2_PTHREADS_NONE
+ bool "none"
+
+ config BR2_PTHREADS
+ bool "linuxthreads"
+ select BR2_TOOLCHAIN_HAS_THREADS
+
+ config BR2_PTHREADS_OLD
+ bool "linuxthreads (stable/old)"
+ select BR2_TOOLCHAIN_HAS_THREADS
+
+ config BR2_PTHREADS_NATIVE
+ bool "Native POSIX Threading (NPTL)"
+ select BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_UCLIBC_VERSION_SNAPSHOT
+endchoice
+
source "toolchain/elf2flt/Config.in"
source "toolchain/mklibs/Config.in"
source "toolchain/sstrip/Config.in"
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 5502ab4..34d70a0 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -26,6 +26,9 @@ config BR2_PROGRAM_INVOCATION
config BR2_INSTALL_LIBSTDCPP
bool
+config BR2_TOOLCHAIN_HAS_THREADS
+ bool
+
config BR2_ENABLE_LOCALE_PURGE
bool "Purge unwanted locales"
help
@@ -76,32 +79,6 @@ config BR2_SOFT_FLOAT
functions, then everything will need to be compiled with soft
floating point support (-msoft-float).
-choice
- prompt "Thread library implementation"
- default BR2_PTHREADS_OLD
- help
- If you are building your own toolchain then select the type of
- libpthreads you want to use.
- Not all thread variants work with all versions of uClibc,
- the "linuxthreads (stable/old)" may be a working fallback
- if you need threading at all.
- If you have an external binary toolchain then select the type
- of libpthreads it was built with.
-
- config BR2_PTHREADS_NONE
- bool "none"
-
- config BR2_PTHREADS
- bool "linuxthreads"
-
- config BR2_PTHREADS_OLD
- bool "linuxthreads (stable/old)"
-
- config BR2_PTHREADS_NATIVE
- bool "Native POSIX Threading (NPTL)"
- depends on BR2_UCLIBC_VERSION_SNAPSHOT
-endchoice
-
config BR2_TARGET_OPTIMIZATION
string "Target Optimizations"
default "-pipe"
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 1366f07..ebfd3a0 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -144,6 +144,7 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_ENABLE_LOCALE
select BR2_PROGRAM_INVOCATION
select BR2_INSTALL_LIBSTDCPP
+ select BR2_TOOLCHAIN_HAS_THREADS
config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
bool
@@ -223,6 +224,14 @@ config BR2_TOOLCHAIN_EXTERNAL_C_PLUS_PLUS
support for C++. If you don't know, leave the default value,
Buildroot will tell you if it's correct or not.
+config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
+ bool "Toolchain has threads support ?"
+ select BR2_TOOLCHAIN_HAS_THREADS
+ help
+ Enable this option if you want your external toolchain has
+ support for C++. If you don't know, leave the default value,
+ Buildroot will tell you if it's correct or not.
+
endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 6f6ec29..e17b0da 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -53,7 +53,7 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
USR_LIB_EXTERNAL_LIBS+=libstdc++.so
endif
-ifneq ($(BR2_PTHREADS_NONE),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
LIB_EXTERNAL_LIBS+=libpthread.so
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
LIB_EXTERNAL_LIBS+=libthread_db.so
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 09/15] toolchain: check that the thread option selection is correct
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (7 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 08/15] toolchain: rework thread options Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 10/15] gcc: disable libgomp when thread support is disabled Thomas Petazzoni
` (6 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
When an external toolchain is used, the user is responsible for
telling Buildroot what the configuration of the toolchain is. In order
to make sure that the selection is correct, we already perform checks
against the configuration of the uClibc in the selected external
toolchain. This commit adds the check for thread support.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/helpers.mk | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 24f379d..ee902fa 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -192,7 +192,8 @@ check_uclibc = \
$(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_INET_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
- $(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support)
+ $(call check_uclibc_feature,__UCLIBC_HAS_PROGRAM_INVOCATION_NAME__,BR2_PROGRAM_INVOCATION,$${UCLIBC_CONFIG_FILE},Program invocation support) ;\
+ $(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support)
#
# Check that the Buildroot configuration of the ABI matches the
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 10/15] gcc: disable libgomp when thread support is disabled
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (8 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 09/15] toolchain: check that the thread option selection is correct Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 11/15] uclibc: add patch for uClibc snapshot to fix build issue Thomas Petazzoni
` (5 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
libgomp needs thread support on the target to build properly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/gcc/gcc-uclibc-4.x.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 5f69906..cd63992 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -139,7 +139,7 @@ GCC_TLS:=--disable-tls
endif
ifeq ($(BR2_PTHREADS_NONE),y)
-THREADS:=--disable-threads
+THREADS:=--disable-threads --disable-libgomp
else
THREADS:=--enable-threads
endif
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 11/15] uclibc: add patch for uClibc snapshot to fix build issue
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (9 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 10/15] gcc: disable libgomp when thread support is disabled Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 12/15] toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used Thomas Petazzoni
` (4 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
On older glibc (like 2.7), the _SC_V7_* symbols are not defined,
making the build of current uClibc fail on Debian Lenny systems and
other systems using a fairly old glibc. So we make sure to only use
the specs names that are defined by the host C library.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
...tconf-only-use-specs-names-when-available.patch | 131 ++++++++++++++++++++
1 files changed, 131 insertions(+), 0 deletions(-)
create mode 100644 toolchain/uClibc/uClibc.snapshot.getconf-only-use-specs-names-when-available.patch
diff --git a/toolchain/uClibc/uClibc.snapshot.getconf-only-use-specs-names-when-available.patch b/toolchain/uClibc/uClibc.snapshot.getconf-only-use-specs-names-when-available.patch
new file mode 100644
index 0000000..1086ca7
--- /dev/null
+++ b/toolchain/uClibc/uClibc.snapshot.getconf-only-use-specs-names-when-available.patch
@@ -0,0 +1,131 @@
+From 1b36ac390724a83455e349fdf6487dd513aeac05 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 4 Dec 2010 09:58:38 +0100
+Subject: [PATCH] getconf: only use specs names when available
+
+On older glibc (like 2.7), the _SC_V7_* symbols are not defined,
+making the build of current uClibc fail on Debian Lenny systems and
+other systems using a fairly old glibc. So we make sure to only use
+the specs names that are defined by the host C library.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ utils/getconf.c | 72 ++++++++++++++++++++++++++++++++++++------------------
+ 1 files changed, 48 insertions(+), 24 deletions(-)
+
+diff --git a/utils/getconf.c b/utils/getconf.c
+index 81566df..812783e 100644
+--- a/utils/getconf.c
++++ b/utils/getconf.c
+@@ -1014,18 +1014,42 @@ static const struct conf vars[] =
+
+ static const struct { const char *name; int num; } specs[] =
+ {
++#ifdef _SC_XBS5_ILP32_OFF32
+ { "XBS5_ILP32_OFF32", _SC_XBS5_ILP32_OFF32 },
++#endif
++#ifdef _SC_XBS5_ILP32_OFFBIG
+ { "XBS5_ILP32_OFFBIG", _SC_XBS5_ILP32_OFFBIG },
++#endif
++#ifdef _SC_XBS5_LP64_OFF64
+ { "XBS5_LP64_OFF64", _SC_XBS5_LP64_OFF64 },
++#endif
++#ifdef _SC_XBS5_LPBIG_OFFBIG
+ { "XBS5_LPBIG_OFFBIG", _SC_XBS5_LPBIG_OFFBIG },
++#endif
++#ifdef _SC_V6_ILP32_OFF32
+ { "POSIX_V6_ILP32_OFF32", _SC_V6_ILP32_OFF32 },
++#endif
++#ifdef _SC_V6_ILP32_OFFBIG
+ { "POSIX_V6_ILP32_OFFBIG", _SC_V6_ILP32_OFFBIG },
++#endif
++#ifdef _SC_V6_LP64_OFF64
+ { "POSIX_V6_LP64_OFF64", _SC_V6_LP64_OFF64 },
++#endif
++#ifdef _SC_V6_LPBIG_OFFBIG
+ { "POSIX_V6_LPBIG_OFFBIG", _SC_V6_LPBIG_OFFBIG },
++#endif
++#ifdef _SC_V7_ILP32_OFF32
+ { "POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32 },
++#endif
++#ifdef _SC_V7_ILP32_OFFBIG
+ { "POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG },
++#endif
++#ifdef _SC_V7_LP64_OFF64
+ { "POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64 },
++#endif
++#ifdef _SC_V7_LPBIG_OFFBIG
+ { "POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG },
++#endif
+ };
+ static const int nspecs = sizeof (specs) / sizeof (specs[0]);
+
+@@ -1177,41 +1201,41 @@ environment SPEC.\n\n");
+
+ switch (specs[i].num)
+ {
+-#ifndef _XBS5_ILP32_OFF32
+- case _SC_XBS5_ILP32_OFF32:
++#if !defined(_XBS5_ILP32_OFF32) && defined(_SC_XBS5_ILP32_OFF32)
++ case _SC_XBS5_ILP32_OFF32:
+ #endif
+-#ifndef _XBS5_ILP32_OFFBIG
+- case _SC_XBS5_ILP32_OFFBIG:
++#if !defined(_XBS5_ILP32_OFFBIG) && defined(_SC_XBS5_ILP32_OFFBIG)
++ case _SC_XBS5_ILP32_OFFBIG:
+ #endif
+-#ifndef _XBS5_LP64_OFF64
+- case _SC_XBS5_LP64_OFF64:
++#if !defined(_XBS5_LP64_OFF64) && defined(_SC_XBS5_LP64_OFF64)
++ case _SC_XBS5_LP64_OFF64:
+ #endif
+-#ifndef _XBS5_LPBIG_OFFBIG
+- case _SC_XBS5_LPBIG_OFFBIG:
++#if !defined(_XBS5_LPBIG_OFFBIG) && defined(_SC_XBS5_LPBIG_OFFBIG)
++ case _SC_XBS5_LPBIG_OFFBIG:
+ #endif
+-#ifndef _POSIX_V6_ILP32_OFF32
+- case _SC_V6_ILP32_OFF32:
++#if !defined(_POSIX_V6_ILP32_OFF32) && defined(_SC_V6_ILP32_OFF32)
++ case _SC_V6_ILP32_OFF32:
+ #endif
+-#ifndef _POSIX_V6_ILP32_OFFBIG
+- case _SC_V6_ILP32_OFFBIG:
++#if !defined(_POSIX_V6_ILP32_OFFBIG) && defined(_SC_V6_ILP32_OFFBIG)
++ case _SC_V6_ILP32_OFFBIG:
+ #endif
+-#ifndef _POSIX_V6_LP64_OFF64
+- case _SC_V6_LP64_OFF64:
++#if !defined(_POSIX_V6_LP64_OFF64) && defined(_SC_V6_LP64_OFF64)
++ case _SC_V6_LP64_OFF64:
+ #endif
+-#ifndef _POSIX_V6_LPBIG_OFFBIG
+- case _SC_V6_LPBIG_OFFBIG:
++#if !defined(_POSIX_V6_LPBIG_OFFBIG) && defined(_SC_V6_LPBIG_OFFBIG)
++ case _SC_V6_LPBIG_OFFBIG:
+ #endif
+-#ifndef _POSIX_V7_ILP32_OFF32
+- case _SC_V7_ILP32_OFF32:
++#if !defined(_POSIX_V7_ILP32_OFF32) && defined(_SC_V7_ILP32_OFF32)
++ case _SC_V7_ILP32_OFF32:
+ #endif
+-#ifndef _POSIX_V7_ILP32_OFFBIG
+- case _SC_V7_ILP32_OFFBIG:
++#if !defined(_POSIX_V7_ILP32_OFFBIG) && defined(_SC_V7_ILP32_OFFBIG)
++ case _SC_V7_ILP32_OFFBIG:
+ #endif
+-#ifndef _POSIX_V7_LP64_OFF64
+- case _SC_V7_LP64_OFF64:
++#if !defined(_POSIX_V7_LP64_OFF64) && defined(_SC_V7_LP64_OFF64)
++ case _SC_V7_LP64_OFF64:
+ #endif
+-#ifndef _POSIX_V7_LPBIG_OFFBIG
+- case _SC_V7_LPBIG_OFFBIG:
++#if !defined(_POSIX_V7_LPBIG_OFFBIG) && defined(_SC_V7_LPBIG_OFFBIG)
++ case _SC_V7_LPBIG_OFFBIG:
+ #endif
+ {
+ const char *args[argc + 3];
+--
+1.7.0.4
+
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 12/15] toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (10 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 11/15] uclibc: add patch for uClibc snapshot to fix build issue Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend Thomas Petazzoni
` (3 subsequent siblings)
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
BR2_NEEDS_GETTEXT was already set to y for Buildroot internal
toolchain and external toolchains based on uClibc, but wasn't set for
toolchains based on uClibC built by the Crosstool-NG backend.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/toolchain-common.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 34d70a0..bdc6e76 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -60,6 +60,7 @@ config BR2_NEEDS_GETTEXT
bool
default y if BR2_TOOLCHAIN_BUILDROOT
default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+ default y if BR2_TOOLCHAIN_CTNG_uClibc
config BR2_NEEDS_GETTEXT_IF_LOCALE
bool
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (11 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 12/15] toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:50 ` Peter Korsgaard
2010-12-12 10:37 ` Yann E. MORIN
2010-12-05 9:25 ` [Buildroot] [PATCH 14/15] toolchain: more verbose in crosstool-ng backend Thomas Petazzoni
` (2 subsequent siblings)
15 siblings, 2 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
toolchain/toolchain-crosstool-ng/Config.in | 32 ++++++++++++++++++++++
toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 21 ++++++++++++++
2 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
index b345297..9d8cb24 100644
--- a/toolchain/toolchain-crosstool-ng/Config.in
+++ b/toolchain/toolchain-crosstool-ng/Config.in
@@ -106,4 +106,36 @@ config BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS
C++ language and you want C++ libraries to be installed on
your target system.
+choice
+ prompt "Thread library implementation"
+ default BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD \
+ if BR2_TOOLCHAIN_CTNG_uClibc
+ default BR2_TOOLCHAIN_CTNG_THREADS_NPTL \
+ if BR2_TOOLCHAIN_CTNG_eglibc || \
+ BR2_TOOLCHAIN_CTNG_glibc
+ help
+ Enable thread support and select thread implementation. Not
+ all thread variants work with all versions of uClibc, the
+ "linuxthreads (stable/old)" may be a working fallback if you
+ need threading at all.
+
+ config BR2_TOOLCHAIN_CTNG_THREADS_NONE
+ bool "none"
+
+ config BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS
+ bool "linuxthreads"
+ select BR2_TOOLCHAIN_HAS_THREADS
+
+ config BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD
+ bool "linuxthreads (stable/old)"
+ select BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_TOOLCHAIN_CTNG_uClibc
+
+ config BR2_TOOLCHAIN_CTNG_THREADS_NPTL
+ bool "Native POSIX Threading (NPTL)"
+ select BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_TOOLCHAIN_CTNG_eglibc || \
+ BR2_TOOLCHAIN_CTNG_glibc
+endchoice
+
endif # BR2_TOOLCHAIN_CTNG
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index 1c5e864..b7f88ee 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -213,6 +213,27 @@ else
CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:;
endif
+# Thread implementation selection
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\# \2 is not set:;
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_LINUXTHREADS).*:\# \2 is not set:;
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\# \2 is not set:;
+ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS))$(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_LINUXTHREADS).*:\2=y:;
+ ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc)),)
+ ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\# \2 is not set:;
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\2=y:;
+ else
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\# \2 is not settted:;
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\2=y:;
+ endif
+ endif
+else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NPTL)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\2=y:;
+else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NONE)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\2=y:;
+endif
+
#--------------
# And the specials for paths
CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_PREFIX_DIR)=.*:\1="$(TOOLCHAIN_DIR)":;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 14/15] toolchain: more verbose in crosstool-ng backend
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (12 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 15/15] package: pass TARGET_MAKE_ENV at install/clean/uninstall steps Thomas Petazzoni
2010-12-11 22:55 ` [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Peter Korsgaard
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
By default, Crosstool-NG hides all the details of the toolchain build
process. However, this is inconsistent with the typical Buildroot
build, and the rotating progress thing makes log file resulting from
redirecting the Buildroot output a bit unusable. Therefore, switch the
Crosstool-NG configuration to a more verbose default.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
.../toolchain-crosstool-ng/crosstool-ng.config | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.config b/toolchain/toolchain-crosstool-ng/crosstool-ng.config
index d5ee244..506f78a 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.config
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.config
@@ -72,12 +72,12 @@ CT_CONFIG_SHELL_CUSTOM_PATH="/bin/sh"
# CT_LOG_ERROR is not set
# CT_LOG_WARN is not set
# CT_LOG_INFO is not set
-CT_LOG_EXTRA=y
-# CT_LOG_ALL is not set
+# CT_LOG_EXTRA is not set
+CT_LOG_ALL=y
# CT_LOG_DEBUG is not set
-CT_LOG_LEVEL_MAX="EXTRA"
+CT_LOG_LEVEL_MAX="ALL"
# CT_LOG_SEE_TOOLS_WARN is not set
-CT_LOG_PROGRESS_BAR=y
+# CT_LOG_PROGRESS_BAR is not set
CT_LOG_TO_FILE=y
CT_LOG_FILE_COMPRESS=y
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 15/15] package: pass TARGET_MAKE_ENV at install/clean/uninstall steps
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (13 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 14/15] toolchain: more verbose in crosstool-ng backend Thomas Petazzoni
@ 2010-12-05 9:25 ` Thomas Petazzoni
2010-12-11 22:55 ` [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Peter Korsgaard
15 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-05 9:25 UTC (permalink / raw)
To: buildroot
TARGET_MAKE_ENV contains the PATH to the host tools built in
$(HOST_DIR), and not having this directory in the PATH while
installing packages may cause troubles.
The specific example that trigerred the problem is the following
one. libglib2 ./configure tries to find a awk version, either gawk or
mawk. On my limited testing system, only mawk is available, so
normally, libglib2 detects mawk and uses it, and it works perfectly.
However, when host-gawk has been compiled before libglib2 (which
happens for example if you have used the Crosstool-NG backend), gawk
is well detected in $(HOST_DIR)/usr/bin at ./configure time
($(HOST_DIR)/usr/bin is in the PATH at ./configure time, thanks to
TARGET_MAKE_ENV). But at install time, when libglib2 uses gawk, it
doesn't find it anymore because it is not in the PATH.
This also makes things coherent with host installation, in which
$(HOST_MAKE_ENV) was already used.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.autotools.in | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in
index 7d04e44..de0a355 100644
--- a/package/Makefile.autotools.in
+++ b/package/Makefile.autotools.in
@@ -210,7 +210,7 @@ endif
#
ifndef $(2)_INSTALL_STAGING_CMDS
define $(2)_INSTALL_STAGING_CMDS
- $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
+ $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
for i in $$$$(find $(STAGING_DIR)/usr/lib* -name "*.la"); do \
cp -f $$$$i $$$$i~; \
$$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \
@@ -224,7 +224,7 @@ endif
#
ifndef $(2)_INSTALL_TARGET_CMDS
define $(2)_INSTALL_TARGET_CMDS
- $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR)
+ $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR)
endef
endif
@@ -234,7 +234,7 @@ endif
#
ifndef $(2)_CLEAN_CMDS
define $(2)_CLEAN_CMDS
- -$$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_SRCDIR)
+ -$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_SRCDIR)
endef
endif
@@ -244,7 +244,7 @@ endif
#
ifndef $(2)_UNINSTALL_STAGING_CMDS
define $(2)_UNINSTALL_STAGING_CMDS
- $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
+ $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
endef
endif
@@ -254,7 +254,7 @@ endif
#
ifndef $(2)_UNINSTALL_TARGET_CMDS
define $(2)_UNINSTALL_TARGET_CMDS
- $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR)
+ $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_UNINSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR)
endef
endif
--
1.7.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection
2010-12-05 9:25 ` [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection Thomas Petazzoni
@ 2010-12-11 22:14 ` Peter Korsgaard
2010-12-12 10:51 ` Thomas Petazzoni
0 siblings, 1 reply; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:14 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Turn BR2_LARGEFILE, BR2_INET_IPV6, BR2_INET_RPC, BR2_USE_WCHAR,
Thomas> BR2_ENABLE_LOCALE and BR2_PROGRAM_INVOCATION into hidden options.
Thomas> Then, for Buildroot toolchains, external toolchains and Crosstool-NG
Thomas> toolchains, provide visible options that selects the hidden options.
Thomas> This allows :
Thomas> * To show a different label and help text in the case of Buildroot
Thomas> toolchain (do you want to enable feature X ?) and in the case of
Thomas> external toolchain (is feature X available in your toolchain ?)
Thomas> * To not show any option when a glibc external toolchain is selected
Thomas> (since glibc is assumed to support all of largefile, IPv6, RPC,
Thomas> WCHAR, locale and program invocation) and have them all selected in
Thomas> that case.
Thomas> There is some amount of duplication between Buildroot toolchain config
Thomas> options and Crosstool-NG toolchain config options, because kconfig
Thomas> doesn't allow to source the same Config.in file twice (even if under
Thomas> mutually exclusive conditions). This duplication is more readable that
Thomas> the hack that consists in splitting files in multiple pieces.
This breaks the toolchain setup of people's existing .config's, but OK -
Perhaps add a note about it in the commit message though.
Thomas> +++ b/toolchain/toolchain-buildroot/Config.in.2
Thomas> +config BR2_TOOLCHAIN_BUILDROOT_LOCALE
Thomas> + bool "Enable toolchain locale/i18n support"
Thomas> + select BR2_TOOLCHAIN_BUILDROOT_WCHAR
Thomas> + select BR2_ENABLE_LOCALE
Thomas> + help
Thomas> + Enable this option if you want your toolchain to support
Thomas> + localization and internationalization.
Thomas> +
Thomas> +config BR2_TOOLCHAIN_BUILDROOT_PROGRAM_INVOCATION
Thomas> + bool "Enable 'program invocation name'"
The other places we have 'Enable ... SUPPORT'
Thomas> +++ b/toolchain/toolchain-external/Config.in
Thomas> @@ -10,9 +10,68 @@ config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
Thomas> config BR2_TOOLCHAIN_EXTERNAL_GLIBC
Thomas> bool "glibc"
Thomas> + select BR2_LARGEFILE
Thomas> + select BR2_INET_IPV6
Thomas> + select BR2_INET_RPC
Thomas> + select BR2_USE_WCHAR
Thomas> + select BR2_ENABLE_LOCALE
Thomas> + select BR2_PROGRAM_INVOCATION
Thomas> endchoice
Thomas> +if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
Thomas> +
Thomas> +config BR2_TOOLCHAIN_EXTERNAL_LARGEFILE
Thomas> + bool "Toolchain has large file support ?"
We normally don't do spaces before question mark (several places in this
file).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download
2010-12-05 9:25 ` [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download Thomas Petazzoni
@ 2010-12-11 22:26 ` Peter Korsgaard
2010-12-12 11:04 ` Thomas Petazzoni
0 siblings, 1 reply; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:26 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> Instead of letting the user define all the details of his external
Thomas> toolchain, we define a set of profiles for well-known external
Thomas> toolchains (CodeSourcery ones only at the moment, can easily be
Thomas> extended with other toolchains).
Thomas> Once a profile has been choosen, the user is offered the choice of
Thomas> either letting Buildroot download and install the external toolchain,
Thomas> or (as before) to tell Buildroot where the toolchain is installed on
Thomas> the system.
Thomas> We of course provide a "custom profile", through which the user can
Thomas> configure Buildroot to use a custom external toolchain for which no
Thomas> profile is available.
Thomas> +++ b/toolchain/toolchain-external/Config.in
Thomas> config BR2_TOOLCHAIN_EXTERNAL_STRIP
Thomas> bool
Thomas> default y
Thomas> + depends on BR2_TOOLCHAIN_EXTERNAL
This is all in an if BR2_TOOLCHAIN_EXTERNAL conditional. Did you mean
BR2_TOOLCHAIN_EXTERNAL_CUSTOM instead?
Thomas> prompt "Strip shared libraries"
Thomas> help
Thomas> Strip shared libraries copied from the external toolchain.
Thomas> -endif
Thomas> +
Thomas> +endif # BR2_TOOLCHAIN_EXTERNAL
Thomas> +
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 05/15] toolchain: rework C++ options
2010-12-05 9:25 ` [Buildroot] [PATCH 05/15] toolchain: rework C++ options Thomas Petazzoni
@ 2010-12-11 22:38 ` Peter Korsgaard
2010-12-12 11:24 ` Thomas Petazzoni
2010-12-12 10:25 ` Yann E. MORIN
1 sibling, 1 reply; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:38 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> Instead of having BR2_GCC_CROSS_CXX and BR2_INSTALL_LIBSTDCPP, with
Thomas> BR2_GCC_CROSS_CXX not being visible (and therefore being useless),
Thomas> let's just keep BR2_INSTALL_LIBSTDCPP to enable C++ in the toolchain
Thomas> and install C++ libraries on the target.
Thomas> We also take that opportunity to make BR2_INSTALL_LIBSTDCPP an hidden
Thomas> option, which is selected by an option in Buildroot toolchain support
Thomas> or an option in External toolchain support, just as we did for other
Thomas> toolchain features.
Thomas> Some work definitely remains to be done :
Thomas> - The name BR2_INSTALL_LIBSTDCPP is ugly, but we keep it for the
Thomas> moment in order to avoid changing all packages.
Thomas> - We could have two independent options: one to tell whether the
Thomas> toolchain has C++ support (on which packages would depend on) and
Thomas> another to tell whether the C++ library should be installed (that
Thomas> packages would select). This would allow to have a C++-free target
Thomas> filesystem even if the toolchain used actually supports C++.
Is that really important? I would expect people who really care about
such stuff to build a custom toolchain for their project.
If there's interest, perhaps it would make more sense to generalize this
library-cleanup step for all libs and do something like the mklibs
stuff.
Thomas> +++ b/toolchain/toolchain-crosstool-ng/Config.in
Thomas> @@ -98,4 +98,12 @@ config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION
Thomas> endif # BR2_TOOLCHAIN_CTNG_uClibc
Thomas> +config BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS
Thomas> + bool "Enable C++ support"
Thomas> + select BR2_INSTALL_LIBSTDCPP
Thomas> + help
Thomas> + Enable this option if you want your toolchain to support the
Thomas> + C++ language and you want C++ libraries to be installed on
Thomas> + your target system.
Thomas> +
Here we add an option to build a ctng toolchain (glibc/uclibc)
with/without C++ support.
Thomas> +++ b/toolchain/toolchain-external/Config.in
Thomas> @@ -143,6 +143,7 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
Thomas> select BR2_USE_WCHAR
Thomas> select BR2_ENABLE_LOCALE
Thomas> select BR2_PROGRAM_INVOCATION
Thomas> + select BR2_INSTALL_LIBSTDCPP
.. But here we say that all external glibc toolchains have C++
support. That doesn't seem to be always true.
Thomas> config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
Thomas> bool
Thomas> @@ -214,6 +215,14 @@ config BR2_TOOLCHAIN_EXTERNAL_PROGRAM_INVOCATION
Thomas> invocation support. If you don't know, leave the default
Thomas> value, Buildroot will tell you if it's correct or not.
Thomas> +config BR2_TOOLCHAIN_EXTERNAL_C_PLUS_PLUS
Thomas> + bool "Toolchain has C++ support ?"
No space before '?'
Thomas> + select BR2_INSTALL_LIBSTDCPP
Thomas> + help
Thomas> + Enable this option if you want your external toolchain has
'Enable this option if your external toolchain has'
Thomas> + support for C++. If you don't know, leave the default value,
Thomas> + Buildroot will tell you if it's correct or not.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets
2010-12-05 9:25 ` [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets Thomas Petazzoni
@ 2010-12-11 22:42 ` Peter Korsgaard
2010-12-12 11:31 ` Thomas Petazzoni
0 siblings, 1 reply; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:42 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Reworking ltp-testsuite is needed in order to get rid of some
Thomas> thread-specific options that will be cleaned-up in the next commit.
Thomas> +++ b/package/ltp-testsuite/Config.in
Thomas> @@ -1,7 +1,18 @@
Thomas> -config BR2_PACKAGE_LTP-TESTSUITE
Thomas> +config BR2_PACKAGE_LTP_TESTSUITE
Thomas> bool "ltp-testsuite"
Thomas> - depends on BROKEN
Thomas> + depends on !BR2_PTHREADS_NONE
Thomas> + # Several tests of LTP use legacy functions that are usually
Thomas> + # not available in uClibc.
Thomas> + depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
Thomas> + BR2_TOOLCHAIN_CTNG_glibc || \
Thomas> + BR2_TOOLCHAIN_CTNG_eglibc
Thomas> help
Thomas> The Linux Test Project provides a huge testsuite for Linux.
Thomas> http://ltp.sourceforge.net/
Thomas> +
Thomas> +comment "ltp-testsuite requires a glibc toolchain with thread support"
Thomas> + depends on (!BR2_TOOLCHAIN_EXTERNAL_GLIBC && \
Thomas> + !BR2_TOOLCHAIN_CTNG_glibc && \
Thomas> + !BR2_TOOLCHAIN_CTNG_eglibc) || \
Thomas> + BR2_PTHREADS_NONE
Does it really not work on uClibc? This is afaik the first package we
have that is glibc only.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 08/15] toolchain: rework thread options
2010-12-05 9:25 ` [Buildroot] [PATCH 08/15] toolchain: rework thread options Thomas Petazzoni
@ 2010-12-11 22:45 ` Peter Korsgaard
2010-12-12 11:34 ` Thomas Petazzoni
0 siblings, 1 reply; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:45 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> The selection of linuxthreads, linuxthreads old or NPTL doesn't make a
Thomas> lot of sense for external toolchains. So, instead, we :
Thomas> * Introduce an hidden BR2_TOOLCHAIN_HAS_THREADS option, which must be
Thomas> selected by toolchain specific options when thread support is
Thomas> available. Package needing to test thread support should use this
Thomas> option.
Thomas> * Move the none/linuxthreads/linuxthreads old/NPTL selection to
Thomas> Buildroot internal toolchain configuration.
Thomas> * Add an option in external toolchain to tell if thread support is
Thomas> available or not in the external toolchain.
Thomas> ffmpeg, dmalloc and openvpn are fixed to use the new
Thomas> BR2_TOOLCHAIN_HAS_THREADS option. For openvpn, --enable-threads=posix
Thomas> is no longer used, as the configure script doesn't even understand
Thomas> this option.
Thomas> +++ b/toolchain/toolchain-buildroot/Config.in.2
Thomas> @@ -76,6 +76,32 @@ config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
Thomas> See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
Thomas> for details.
Thomas> +choice
Thomas> + prompt "Thread library implementation"
Thomas> + default BR2_PTHREADS_OLD
Thomas> + help
Thomas> + If you are building your own toolchain then select the type
This is now only shown if we're building a toolchain, so this part of
the help text could go.
Thomas> + of libpthreads you want to use. Not all thread variants work
Thomas> + with all versions of uClibc, the "linuxthreads (stable/old)"
Thomas> + may be a working fallback if you need threading at all.
Thomas> +++ b/toolchain/toolchain-external/Config.in
Thomas> @@ -144,6 +144,7 @@ config BR2_TOOLCHAIN_EXTERNAL_GLIBC
Thomas> select BR2_ENABLE_LOCALE
Thomas> select BR2_PROGRAM_INVOCATION
Thomas> select BR2_INSTALL_LIBSTDCPP
Thomas> + select BR2_TOOLCHAIN_HAS_THREADS
Thomas> config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
Thomas> bool
Thomas> @@ -223,6 +224,14 @@ config BR2_TOOLCHAIN_EXTERNAL_C_PLUS_PLUS
Thomas> support for C++. If you don't know, leave the default value,
Thomas> Buildroot will tell you if it's correct or not.
Thomas> +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
Thomas> + bool "Toolchain has threads support ?"
No space before '?'
Thomas> + select BR2_TOOLCHAIN_HAS_THREADS
Thomas> + help
Thomas> + Enable this option if you want your external toolchain has
Thomas> + support for C++. If you don't know, leave the default value,
Thomas> + Buildroot will tell you if it's correct or not.
Cut'n'paste? ;) It shouldn't be about C++ and reworded.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend
2010-12-05 9:25 ` [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend Thomas Petazzoni
@ 2010-12-11 22:50 ` Peter Korsgaard
2010-12-12 10:37 ` Yann E. MORIN
1 sibling, 0 replies; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:50 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas> ---
Thomas> toolchain/toolchain-crosstool-ng/Config.in | 32 ++++++++++++++++++++++
Thomas> toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 21 ++++++++++++++
Thomas> 2 files changed, 53 insertions(+), 0 deletions(-)
Thomas> diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
Thomas> index b345297..9d8cb24 100644
Thomas> --- a/toolchain/toolchain-crosstool-ng/Config.in
Thomas> +++ b/toolchain/toolchain-crosstool-ng/Config.in
Thomas> @@ -106,4 +106,36 @@ config BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS
Thomas> C++ language and you want C++ libraries to be installed on
Thomas> your target system.
Thomas> +choice
Thomas> + prompt "Thread library implementation"
Thomas> + default BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD \
Thomas> + if BR2_TOOLCHAIN_CTNG_uClibc
Thomas> + default BR2_TOOLCHAIN_CTNG_THREADS_NPTL \
Thomas> + if BR2_TOOLCHAIN_CTNG_eglibc || \
Thomas> + BR2_TOOLCHAIN_CTNG_glibc
Thomas> + help
Thomas> + Enable thread support and select thread implementation. Not
Thomas> + all thread variants work with all versions of uClibc, the
Thomas> + "linuxthreads (stable/old)" may be a working fallback if you
Thomas> + need threading at all.
Thomas> +
Thomas> + config BR2_TOOLCHAIN_CTNG_THREADS_NONE
Thomas> + bool "none"
So you can build a glibc/eglibc ctng toolchain without threading
support? Then we shouldn't unconditionally enable thread support for
external glibc toolchains (in patch 8).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
` (14 preceding siblings ...)
2010-12-05 9:25 ` [Buildroot] [PATCH 15/15] package: pass TARGET_MAKE_ENV at install/clean/uninstall steps Thomas Petazzoni
@ 2010-12-11 22:55 ` Peter Korsgaard
15 siblings, 0 replies; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-11 22:55 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> Hello,
Thomas> Here is a set of patches that mainly improves the toolchain
Thomas> configuration and support, with two majors directions :
Thomas> * Turn BR2_LARGEFILE, BR2_INET_RPC, BR2_INET_RPC and similar options
Thomas> into hidden options, and let the toolchain backends present them as
Thomas> they wish. For example for RPC, xthe Buildroot backend says "Do you
Thomas> want RPC ?" while the external toolchain backend doesn't show the
Thomas> option when glibc is used, or present an option "Does your
Thomas> toolchain has RPC ?" when uclibc is used.
Thomas> So really those options should now be called
Thomas> BR2_TOOLCHAIN_HAS_LARGEFILE, BR2_TOOLCHAIN_HAS_INET_RPC, etc, but
Thomas> we kept the old names in this patch series because changing them
Thomas> impacts all packages. This will be done later.
Thomas> A first commit handles largefile, rpc, ipv6, locale and program
Thomas> invocation options, and some later commits handle the C++ option
Thomas> and thread options.
Thomas> * Extend external toolchain with "profiles", i.e well-known external
Thomas> toolchains. For those toolchains, Buildroot can automatically
Thomas> download and install them and will automatically select the
Thomas> appropriate configuration options (C library used, RPC, IPv6,
Thomas> locale, etc.). So an user can know tell Buildroot to use a
Thomas> CodeSourcery toolchain, and Buildroot will do all the job. Such
Thomas> toolchains are extracted in $(O)/external-toolchain, but my intent
Thomas> is to move it to $(O)/toolchain once Gustavoz's toolchain cleanup
Thomas> work is done.
Thomas> This work keeps the ability of doing some more manual things with
Thomas> external toolchains:
Thomas> - For an external toolchain profile, you can tell Buildroot *not*
Thomas> to download it, and in that case, you must provide Buildroot
Thomas> with the location of the external toolchain.
Thomas> - You keep the ability to specify a custom profile, where you
Thomas> will have to tell Buildroot everything: location of the
Thomas> toolchain, toolchain prefix, C library used, etc.
Thomas> In my opinion, those two directions really make the external
Thomas> toolchains easier and simpler to use. One topic left is the gdb
Thomas> options, but I decided not to change it, in order to not conflict too
Thomas> much with Gustavoz's work.
Thanks, looks good. Care to fix the few issues I pointed out and send a
new pull request? Then I'll pull it.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 05/15] toolchain: rework C++ options
2010-12-05 9:25 ` [Buildroot] [PATCH 05/15] toolchain: rework C++ options Thomas Petazzoni
2010-12-11 22:38 ` Peter Korsgaard
@ 2010-12-12 10:25 ` Yann E. MORIN
2010-12-12 13:33 ` Thomas Petazzoni
1 sibling, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2010-12-12 10:25 UTC (permalink / raw)
To: buildroot
Thomas, All,
On Sunday 05 December 2010 10:25:32 Thomas Petazzoni wrote:
> 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.
[--SNIP--]
> diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
> index 5ba1071..b345297 100644
> --- a/toolchain/toolchain-crosstool-ng/Config.in
> +++ b/toolchain/toolchain-crosstool-ng/Config.in
> @@ -98,4 +98,12 @@ config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION
>
> endif # BR2_TOOLCHAIN_CTNG_uClibc
>
> +config BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS
C_PLUS_PLUS --> CXX
'CXX' is a common, and well understood, variable name for 'C++'.
Besides, it is much shorter to write. :-)
> + bool "Enable C++ support"
> + select BR2_INSTALL_LIBSTDCPP
> + help
> + Enable this option if you want your toolchain to support the
> + C++ language and you want C++ libraries to be installed on
> + your target system.
I think this option should be used in the .mk (yes, I know, I should have
run a real git send-email). Could you add this hunk:
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -207,7 +207,7 @@ CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_PKGVERSION)="(.*)":\1="crosstool-NG $(CTNG_
ifneq ($(call qstrip,$(BR2_PACKAGE_GDB_SERVER))$(call qstrip,$(BR2_PACKAGE_GDB_HOST)),)
CTNG_FIX_DOT_CONFIG_SED += s:^(CT_DEBUG_gdb)=.*:\# \1 is not set:;
endif
-ifneq ($(call qstrip,$(BR2_INSTALL_LIBSTDCPP)),)
+ifeq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS)),y)
CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_CC_LANG_CXX) is not set:\1=y:;
else
CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:;
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend
2010-12-05 9:25 ` [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend Thomas Petazzoni
2010-12-11 22:50 ` Peter Korsgaard
@ 2010-12-12 10:37 ` Yann E. MORIN
2010-12-12 13:35 ` Thomas Petazzoni
1 sibling, 1 reply; 35+ messages in thread
From: Yann E. MORIN @ 2010-12-12 10:37 UTC (permalink / raw)
To: buildroot
Thomas, All,
On Sunday 05 December 2010 10:25:40 Thomas Petazzoni wrote:
[--SNIP--]
> diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
> index 1c5e864..b7f88ee 100644
> --- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
> +++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
> @@ -213,6 +213,27 @@ else
> CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:;
> endif
>
> +# Thread implementation selection
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\# \2 is not set:;
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_LINUXTHREADS).*:\# \2 is not set:;
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\# \2 is not set:;
> +ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS))$(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD)),)
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_LINUXTHREADS).*:\2=y:;
> + ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_uClibc)),)
> + ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_PTHREADS_OLD)),)
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\# \2 is not set:;
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\2=y:;
> + else
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\# \2 is not settted:;
'settted' ?
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\2=y:;
> + endif
> + endif
> +else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NPTL)),)
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\2=y:;
> +else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NONE)),)
> +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\2=y:;
> +endif
> +
> #--------------
> # And the specials for paths
> CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_PREFIX_DIR)=.*:\1="$(TOOLCHAIN_DIR)":;
I am not so sure what to say about this one...
There is already a place where we check the C library, on line 223 (upstream)
and I would say that should go there.
I'll look at it tonight...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection
2010-12-11 22:14 ` Peter Korsgaard
@ 2010-12-12 10:51 ` Thomas Petazzoni
0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 10:51 UTC (permalink / raw)
To: buildroot
On Sat, 11 Dec 2010 23:14:36 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:
> This breaks the toolchain setup of people's existing .config's, but
> OK - Perhaps add a note about it in the commit message though.
Done.
> The other places we have 'Enable ... SUPPORT'
Ok, done. For many other places as well.
> We normally don't do spaces before question mark (several places in
> this file).
Ok, done.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download
2010-12-11 22:26 ` Peter Korsgaard
@ 2010-12-12 11:04 ` Thomas Petazzoni
0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 11:04 UTC (permalink / raw)
To: buildroot
On Sat, 11 Dec 2010 23:26:38 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:
> Thomas> config BR2_TOOLCHAIN_EXTERNAL_STRIP
> Thomas> bool
> Thomas> default y
> Thomas> + depends on BR2_TOOLCHAIN_EXTERNAL
>
> This is all in an if BR2_TOOLCHAIN_EXTERNAL conditional. Did you mean
> BR2_TOOLCHAIN_EXTERNAL_CUSTOM instead?
This option is removed by the next patch anyway, but I fixed this
patch (just removed this added line).
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 05/15] toolchain: rework C++ options
2010-12-11 22:38 ` Peter Korsgaard
@ 2010-12-12 11:24 ` Thomas Petazzoni
0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 11:24 UTC (permalink / raw)
To: buildroot
On Sat, 11 Dec 2010 23:38:38 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:
> Thomas> - We could have two independent options: one to tell
> Thomas> whether the toolchain has C++ support (on which packages
> Thomas> would depend on) and another to tell whether the C++ library
> Thomas> should be installed (that packages would select). This would
> Thomas> allow to have a C++-free target filesystem even if the
> Thomas> toolchain used actually supports C++.
>
> Is that really important? I would expect people who really care about
> such stuff to build a custom toolchain for their project.
No strong opinion on this, so I just deleted this part from the commit
log.
> If there's interest, perhaps it would make more sense to generalize
> this library-cleanup step for all libs and do something like the
> mklibs stuff.
Yeah, would probably be a better idea.
> Here we add an option to build a ctng toolchain (glibc/uclibc)
> with/without C++ support.
>
> .. But here we say that all external glibc toolchains have C++
> support. That doesn't seem to be always true.
Indeed. Generally, most glibc toolchains will probably have C++
support, but that's not necessarly the case. So I move the option
outside the CUSTOM_UCLIBC thing, so that it is visible for any CUSTOM
external toolchain.
> Thomas> +config BR2_TOOLCHAIN_EXTERNAL_C_PLUS_PLUS
> Thomas> + bool "Toolchain has C++ support ?"
>
> No space before '?'
Fixed.
> 'Enable this option if your external toolchain has'
Fixed.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets
2010-12-11 22:42 ` Peter Korsgaard
@ 2010-12-12 11:31 ` Thomas Petazzoni
2010-12-12 22:21 ` Peter Korsgaard
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 11:31 UTC (permalink / raw)
To: buildroot
On Sat, 11 Dec 2010 23:42:03 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:
> Does it really not work on uClibc? This is afaik the first package we
> have that is glibc only.
ltp-testsuite uses sigset(), which is obsolete. uClibc can implement
it, but not with our default configuration. I thought ltp-testsuite was
not of sufficiently general usage to decide to make the change of our
default uClibc configuration. The option is
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL.
BTW, I have the same problem with the mrouted package, which needs
UCLIBC_SUPPORT_AI_ADDRCONFIG enabled in uClibc to compile. For this
package, I just added a comment in the Config.in help text mentionning
this. Should I do the same with ltp-testsuite ?
I'm not sure how to handle those types of packages, that can work with
uClibc, but not with our default uClibc configuration, and who are
probably not of enough general use to require a change of our default
uClibc configuration.
Thoughts ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 08/15] toolchain: rework thread options
2010-12-11 22:45 ` Peter Korsgaard
@ 2010-12-12 11:34 ` Thomas Petazzoni
0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 11:34 UTC (permalink / raw)
To: buildroot
On Sat, 11 Dec 2010 23:45:26 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:
> Thomas> +choice
> Thomas> + prompt "Thread library implementation"
> Thomas> + default BR2_PTHREADS_OLD
> Thomas> + help
> Thomas> + If you are building your own toolchain then
> Thomas> select the type
>
> This is now only shown if we're building a toolchain, so this part of
> the help text could go.
Fixed.
> Thomas> +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> Thomas> + bool "Toolchain has threads support ?"
>
> No space before '?'
Ditto.
> Thomas> + select BR2_TOOLCHAIN_HAS_THREADS
> Thomas> + help
> Thomas> + Enable this option if you want your external
> Thomas> toolchain has
> Thomas> + support for C++. If you don't know, leave the
> Thomas> default value,
> Thomas> + Buildroot will tell you if it's correct or not.
>
> Cut'n'paste? ;) It shouldn't be about C++ and reworded.
Indeed, bad cut and paste. Fixed.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 05/15] toolchain: rework C++ options
2010-12-12 10:25 ` Yann E. MORIN
@ 2010-12-12 13:33 ` Thomas Petazzoni
0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 13:33 UTC (permalink / raw)
To: buildroot
On Sun, 12 Dec 2010 11:25:24 +0100
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> wrote:
> > +config BR2_TOOLCHAIN_CTNG_C_PLUS_PLUS
>
> C_PLUS_PLUS --> CXX
>
> 'CXX' is a common, and well understood, variable name for 'C++'.
> Besides, it is much shorter to write. :-)
Done.
> I think this option should be used in the .mk (yes, I know, I should
> have run a real git send-email). Could you add this hunk:
Done. As the change was small, I just squashed it into the existing
5/15 patch.
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend
2010-12-12 10:37 ` Yann E. MORIN
@ 2010-12-12 13:35 ` Thomas Petazzoni
0 siblings, 0 replies; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 13:35 UTC (permalink / raw)
To: buildroot
On Sun, 12 Dec 2010 11:37:22 +0100
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> wrote:
> > s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\# \2 is not settted:;
>
> 'settted' ?
Leftover from a crappy debugging session. Thanks for spotting this, I
fixed it.
> > +CTNG_FIX_DOT_CONFIG_SED +=
> > s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\2=y:;
> > + endif
> > + endif
> > +else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NPTL)),)
> > +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NPTL).*:\2=y:;
> > +else ifneq ($(call qstrip,$(BR2_TOOLCHAIN_CTNG_THREADS_NONE)),)
> > +CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_THREADS_NONE).*:\2=y:;
> > +endif
> > +
> > #--------------
> > # And the specials for paths
> > CTNG_FIX_DOT_CONFIG_PATHS_SED +=
> > s:^(CT_PREFIX_DIR)=.*:\1="$(TOOLCHAIN_DIR)":;
>
> I am not so sure what to say about this one...
>
> There is already a place where we check the C library, on line 223
> (upstream) and I would say that should go there.
I am not sure how it would fit in the existing checks. Can we fix this
as a separate patchset ?
Thanks!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets
2010-12-12 11:31 ` Thomas Petazzoni
@ 2010-12-12 22:21 ` Peter Korsgaard
2010-12-12 22:46 ` Thomas Petazzoni
0 siblings, 1 reply; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-12 22:21 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> On Sat, 11 Dec 2010 23:42:03 +0100
Thomas> Peter Korsgaard <jacmet@uclibc.org> wrote:
>> Does it really not work on uClibc? This is afaik the first package we
>> have that is glibc only.
Thomas> ltp-testsuite uses sigset(), which is obsolete. uClibc can
Thomas> implement it, but not with our default configuration. I thought
Thomas> ltp-testsuite was not of sufficiently general usage to decide
Thomas> to make the change of our default uClibc configuration. The
Thomas> option is UCLIBC_HAS_OBSOLETE_BSD_SIGNAL.
Ok.
Thomas> BTW, I have the same problem with the mrouted package, which
Thomas> needs UCLIBC_SUPPORT_AI_ADDRCONFIG enabled in uClibc to
Thomas> compile. For this package, I just added a comment in the
Thomas> Config.in help text mentionning this. Should I do the same with
Thomas> ltp-testsuite ?
Yeah, I would say this is good enough.
Thomas> I'm not sure how to handle those types of packages, that can
Thomas> work with uClibc, but not with our default uClibc
Thomas> configuration, and who are probably not of enough general use
Thomas> to require a change of our default uClibc configuration.
We could ofcourse add toolchain knobs for all of these, but as you say
they are probably not worth the effort / extra complexity. I think just
leaving them like this is good enough.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets
2010-12-12 22:21 ` Peter Korsgaard
@ 2010-12-12 22:46 ` Thomas Petazzoni
2010-12-12 22:53 ` Peter Korsgaard
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Petazzoni @ 2010-12-12 22:46 UTC (permalink / raw)
To: buildroot
On Sun, 12 Dec 2010 23:21:24 +0100
Peter Korsgaard <jacmet@uclibc.org> wrote:
> Thomas> ltp-testsuite uses sigset(), which is obsolete. uClibc can
> Thomas> implement it, but not with our default configuration. I
> Thomas> thought ltp-testsuite was not of sufficiently general usage
> Thomas> to decide to make the change of our default uClibc
> Thomas> configuration. The option is UCLIBC_HAS_OBSOLETE_BSD_SIGNAL.
>
> Ok.
>
> Thomas> BTW, I have the same problem with the mrouted package, which
> Thomas> needs UCLIBC_SUPPORT_AI_ADDRCONFIG enabled in uClibc to
> Thomas> compile. For this package, I just added a comment in the
> Thomas> Config.in help text mentionning this. Should I do the same
> Thomas> with ltp-testsuite ?
>
> Yeah, I would say this is good enough.
So you mean that just like for mrouted, I should allow the selection of
ltp-testsuite with uClibc, even though it would not build with our
default uClibc configuration ?
> We could ofcourse add toolchain knobs for all of these, but as you say
> they are probably not worth the effort / extra complexity. I think
> just leaving them like this is good enough.
Obviously, I don't think it's reasonable to add dozens of toolchain
configuration knobs.
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets
2010-12-12 22:46 ` Thomas Petazzoni
@ 2010-12-12 22:53 ` Peter Korsgaard
0 siblings, 0 replies; 35+ messages in thread
From: Peter Korsgaard @ 2010-12-12 22:53 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Hi,
Thomas> So you mean that just like for mrouted, I should allow the
Thomas> selection of ltp-testsuite with uClibc, even though it would
Thomas> not build with our default uClibc configuration ?
Yes.
>> We could ofcourse add toolchain knobs for all of these, but as you say
>> they are probably not worth the effort / extra complexity. I think
>> just leaving them like this is good enough.
Thomas> Obviously, I don't think it's reasonable to add dozens of toolchain
Thomas> configuration knobs.
Me neither.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2010-12-12 22:53 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05 9:25 [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 01/15] toolchain: Improve C library option selection Thomas Petazzoni
2010-12-11 22:14 ` Peter Korsgaard
2010-12-12 10:51 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 02/15] toolchain: remove ending semi-colon in helpers Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 03/15] toolchain: add support for external toolchain profiles and download Thomas Petazzoni
2010-12-11 22:26 ` Peter Korsgaard
2010-12-12 11:04 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 04/15] toolchain: remove toolchain-specific stripping Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 05/15] toolchain: rework C++ options Thomas Petazzoni
2010-12-11 22:38 ` Peter Korsgaard
2010-12-12 11:24 ` Thomas Petazzoni
2010-12-12 10:25 ` Yann E. MORIN
2010-12-12 13:33 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 06/15] toolchain: move Stack Protection Support option Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 07/15] ltp-testsuite: bump version and use autotargets Thomas Petazzoni
2010-12-11 22:42 ` Peter Korsgaard
2010-12-12 11:31 ` Thomas Petazzoni
2010-12-12 22:21 ` Peter Korsgaard
2010-12-12 22:46 ` Thomas Petazzoni
2010-12-12 22:53 ` Peter Korsgaard
2010-12-05 9:25 ` [Buildroot] [PATCH 08/15] toolchain: rework thread options Thomas Petazzoni
2010-12-11 22:45 ` Peter Korsgaard
2010-12-12 11:34 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 09/15] toolchain: check that the thread option selection is correct Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 10/15] gcc: disable libgomp when thread support is disabled Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 11/15] uclibc: add patch for uClibc snapshot to fix build issue Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 12/15] toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 13/15] toolchain: expose thread options in the Crosstool-NG backend Thomas Petazzoni
2010-12-11 22:50 ` Peter Korsgaard
2010-12-12 10:37 ` Yann E. MORIN
2010-12-12 13:35 ` Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 14/15] toolchain: more verbose in crosstool-ng backend Thomas Petazzoni
2010-12-05 9:25 ` [Buildroot] [PATCH 15/15] package: pass TARGET_MAKE_ENV at install/clean/uninstall steps Thomas Petazzoni
2010-12-11 22:55 ` [Buildroot] [pull request] Pull request for branch for-2011.02/toolchain-improvements Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox