Pull request for branch for-2011.02/toolchain-improvements
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,
Signature · 1 line
Thomas Petazzoni
PATCH 1/15 toolchain: Improve C library option selection
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.
--- 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(-)
toolchain/toolchain-buildroot/Config.in.2 +50 -0
@@ -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"
toolchain/toolchain-common.in +10 -47
82 lines not on this page · raw message
toolchain/toolchain-crosstool-ng/Config.in +53 -0
59 lines not on this page · raw message
toolchain/toolchain-external/Config.in +59 -0
68 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 1/15 toolchain: Improve C library option selection
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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).
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/15 toolchain: Improve C library option selection
Quoted 2 lines · On Sat, 11 Dec 2010 23:14:36 +0100 Peter Korsgaard <[email protected]> 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.
Quoted 1 line
The other places we have 'Enable ... SUPPORT'
Ok, done. For many other places as well.
Quoted 2 lines
We normally don't do spaces before question mark (several places in this file).
Ok, done.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/15 toolchain: remove ending semi-colon in helpers
In reply to Thomas PetazzoniSome 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.
--- toolchain/helpers.mk | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
toolchain/helpers.mk +4 -4
@@ -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
Signature · 1 line
1.7.0.4
PATCH 3/15 toolchain: add support for external toolchain profiles and download
In reply to Thomas PetazzoniInstead 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.
--- 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
Makefile +2 -1
@@ -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)
package/Makefile.in +5 -5
@@ -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
toolchain/Config.in +4 -1
@@ -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
toolchain/toolchain-external/Config.in +159 -10
195 lines not on this page · raw message
toolchain/toolchain-external/Config.in.2 deleted +0 -17
@@ -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
toolchain/toolchain-external/ext-tool.mk +146 -64
232 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 3/15 toolchain: add support for external toolchain profiles and download
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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> +
Signature · 1 line
Bye, Peter Korsgaard
PATCH 3/15 toolchain: add support for external toolchain profiles and download
Quoted 7 lines · On Sat, 11 Dec 2010 23:26:38 +0100 Peter Korsgaard <[email protected]> wrote:
Thomas> config BR2_TOOLCHAIN_EXTERNAL_STRIP Thomas> bool Thomas> default yThomas> + depends on
BR2_TOOLCHAIN_EXTERNALThis is all in an if
BR2_TOOLCHAIN_EXTERNALconditional. Did you meanBR2_TOOLCHAIN_EXTERNAL_CUSTOMinstead?
This option is removed by the next patch anyway, but I fixed this patch (just removed this added line).
Regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 4/15 toolchain: remove toolchain-specific stripping
In reply to Thomas PetazzoniWe 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.
--- 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(-)
toolchain/helpers.mk +0 -9
@@ -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; \
toolchain/toolchain-crosstool-ng/Config.in +0 -6
@@ -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
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +2 -2
@@ -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},)
toolchain/toolchain-external/Config.in +0 -8
@@ -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
toolchain/toolchain-external/ext-tool.mk +2 -2
@@ -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}) ; \
Signature · 1 line
1.7.0.4
PATCH 5/15 toolchain: rework C++ options
In reply to Thomas PetazzoniInstead 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.).
--- 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(-)
package/Makefile.in +1 -1
@@ -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
package/lzma/Config.in +2 -2
@@ -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
package/rpm/Config.in +2 -2
@@ -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
toolchain/gcc/gcc-uclibc-4.x.mk +1 -1
@@ -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)
toolchain/toolchain-buildroot/Config.in.2 +16 -0
@@ -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"
toolchain/toolchain-common.in +3 -22
@@ -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"
toolchain/toolchain-crosstool-ng/Config.in +8 -0
@@ -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
toolchain/toolchain-external/Config.in +9 -0
@@ -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
Signature · 1 line
1.7.0.4
PATCH 5/15 toolchain: rework C++ options
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 5/15 toolchain: rework C++ options
Quoted 9 lines · On Sat, 11 Dec 2010 23:38:38 +0100 Peter Korsgaard <[email protected]> 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.
Quoted 3 lines
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.
Quoted 5 lines
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.
Quoted 4 lines
Thomas> +config
BR2_TOOLCHAIN_EXTERNAL_C_PLUS_PLUS
Thomas> + bool "Toolchain has C++ support ?"No space before '?'
Fixed.
Quoted 1 line
'Enable this option if your external toolchain has'
Fixed.
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 5/15 toolchain: rework C++ options
In reply to Thomas PetazzoniThomas, All,
Quoted 4 lines · On Sunday 05 December 2010 10:25:32 Thomas Petazzoni wrote:
Instead of having
BR2_GCC_CROSS_CXXandBR2_INSTALL_LIBSTDCPP, withBR2_GCC_CROSS_CXXnot being visible (and therefore being useless), let's just keepBR2_INSTALL_LIBSTDCPPto enable C++ in the toolchain and install C++ libraries on the target.
[--SNIP--]
toolchain/toolchain-crosstool-ng/Config.in config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION · line 101
Quoted 9 lines
toolchain/toolchain-crosstool-ng/Config.in +1
-0@@ -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. :-)
toolchain/toolchain-crosstool-ng/Config.in config BR2_TOOLCHAIN_CTNG_uClibc_PROGRAM_INVOCATION · line 107
Quoted 6 lines
toolchain/toolchain-crosstool-ng/Config.in +6
-0+ 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:
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +1 -1
@@ -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:;
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 5/15 toolchain: rework C++ options
Quoted 6 lines · On Sun, 12 Dec 2010 11:25:24 +0100 "Yann E. MORIN"…
Quoted 1 line
+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.
Quoted 2 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 6/15 toolchain: move Stack Protection Support option
In reply to Thomas PetazzoniThe 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.
--- toolchain/toolchain-buildroot/Config.in.2 | 9 +++++++++ toolchain/toolchain-common.in | 9 --------- toolchain/uClibc/uclibc.mk | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-)
toolchain/toolchain-buildroot/Config.in.2 +9 -0
@@ -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"
toolchain/toolchain-common.in +0 -9
@@ -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
toolchain/uClibc/uclibc.mk +1 -1
@@ -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
Signature · 1 line
1.7.0.4
PATCH 7/15 ltp-testsuite: bump version and use autotargets
In reply to Thomas PetazzoniReworking ltp-testsuite is needed in order to get rid of some thread-specific options that will be cleaned-up in the next commit.
--- 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
package/ltp-testsuite/Config.in +13 -2
@@ -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
package/ltp-testsuite/ltp-testsuite-20101031-disable-controllers.patch new file +25 -0
@@ -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 <[email protected]> +--- + 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
package/ltp-testsuite/ltp-testsuite-disable-ipv6-tests.patch deleted +0 -123
123 lines not on this page · raw message
package/ltp-testsuite/ltp-testsuite-enable-openposix-for-nptl.patch deleted +0 -33
@@ -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)
package/ltp-testsuite/ltp-testsuite-generate-needs-bash.patch deleted +0 -8
@@ -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 - #
package/ltp-testsuite/ltp-testsuite-sched-getaffinity.patch deleted +0 -11
@@ -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)
package/ltp-testsuite/ltp-testsuite-uclibc-syscalls.patch deleted +0 -11
@@ -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:
package/ltp-testsuite/ltp-testsuite.mk +4 -64
73 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 7/15 ltp-testsuite: bump version and use autotargets
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 7/15 ltp-testsuite: bump version and use autotargets
Quoted 2 lines · On Sat, 11 Dec 2010 23:42:03 +0100 Peter Korsgaard <[email protected]> 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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 7/15 ltp-testsuite: bump version and use autotargets
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> On Sat, 11 Dec 2010 23:42:03 +0100
Quoted 2 lines · Thomas> Peter Korsgaard <[email protected]> wrote:
Quoted 2 lines
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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 7/15 ltp-testsuite: bump version and use autotargets
Quoted 8 lines · On Sun, 12 Dec 2010 23:21:24 +0100 Peter Korsgaard <[email protected]> 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 isUCLIBC_HAS_OBSOLETE_BSD_SIGNAL.Ok.
Quoted 7 lines
Thomas> BTW, I have the same problem with the mrouted package, which Thomas> needs
UCLIBC_SUPPORT_AI_ADDRCONFIGenabled 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 ?
Quoted 3 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 7/15 ltp-testsuite: bump version and use autotargets
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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.
Quoted 3 lines
Quoted 3 lines
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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 8/15 toolchain: rework thread options
In reply to Thomas PetazzoniThe 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.
--- 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(-)
package/dmalloc/dmalloc.mk +3 -3
@@ -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
package/ltp-testsuite/Config.in +2 -2
@@ -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
package/multimedia/ffmpeg/ffmpeg.mk +3 -3
@@ -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)
package/openvpn/openvpn.mk +3 -3
@@ -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)
toolchain/Makefile.in +0 -6
@@ -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
toolchain/gcc/gcc-uclibc-4.x.mk +6 -0
@@ -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
toolchain/toolchain-buildroot/Config.in.2 +26 -0
@@ -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"
toolchain/toolchain-common.in +3 -26
@@ -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"
toolchain/toolchain-external/Config.in +9 -0
@@ -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
toolchain/toolchain-external/ext-tool.mk +1 -1
@@ -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
Signature · 1 line
1.7.0.4
PATCH 8/15 toolchain: rework thread options
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 8/15 toolchain: rework thread options
Quoted 9 lines · On Sat, 11 Dec 2010 23:45:26 +0100 Peter Korsgaard <[email protected]> wrote:
Thomas> +choice
Thomas> + prompt "Thread library implementation"
Thomas> + defaultBR2_PTHREADS_OLD
Thomas> + help
Thomas> + If you are building your own toolchain then
Thomas> select the typeThis is now only shown if we're building a toolchain, so this part of the help text could go.
Fixed.
Quoted 4 lines
Thomas> +config
BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
Thomas> + bool "Toolchain has threads support ?"No space before '?'
Ditto.
Quoted 9 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 9/15 toolchain: check that the thread option selection is correct
In reply to Thomas PetazzoniWhen 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.
--- toolchain/helpers.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
toolchain/helpers.mk +2 -1
@@ -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
Signature · 1 line
1.7.0.4
PATCH 10/15 gcc: disable libgomp when thread support is disabled
In reply to Thomas Petazzonilibgomp needs thread support on the target to build properly.
--- toolchain/gcc/gcc-uclibc-4.x.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
toolchain/gcc/gcc-uclibc-4.x.mk +1 -1
@@ -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
Signature · 1 line
1.7.0.4
PATCH 11/15 uclibc: add patch for uClibc snapshot to fix build issue
In reply to Thomas PetazzoniOn 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.
--- ...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
toolchain/uClibc/uClibc.snapshot.getconf-only-use-specs-names-when-available.patch new file +131 -0
@@ -0,0 +1,131 @@ +From 1b36ac390724a83455e349fdf6487dd513aeac05 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni <[email protected]> +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 <[email protected]> +--- + 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 +
Signature · 1 line
1.7.0.4
PATCH 12/15 toolchain: BR2_NEEDS_GETTEXT must be y when uClibc is used
In reply to Thomas PetazzoniBR2_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.
--- toolchain/toolchain-common.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
toolchain/toolchain-common.in +1 -0
@@ -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
Signature · 1 line
1.7.0.4
PATCH 13/15 toolchain: expose thread options in the Crosstool-NG backend
In reply to Thomas Petazzoni--- toolchain/toolchain-crosstool-ng/Config.in | 32 ++++++++++++++++++++++ toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 21 ++++++++++++++ 2 files changed, 53 insertions(+), 0 deletions(-)
toolchain/toolchain-crosstool-ng/Config.in +32 -0
@@ -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
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +21 -0
@@ -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)":;
Signature · 1 line
1.7.0.4
PATCH 13/15 toolchain: expose thread options in the Crosstool-NG backend
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Signed-off-by: Thomas Petazzoni <[email protected]> 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).
Signature · 1 line
Bye, Peter Korsgaard
PATCH 13/15 toolchain: expose thread options in the Crosstool-NG backend
In reply to Thomas PetazzoniThomas, All,
On Sunday 05 December 2010 10:25:40 Thomas Petazzoni wrote:
[--SNIP--]
Quoted 10 lines
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +2
-0@@ -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:;
toolchain/toolchain-crosstool-ng/crosstool-ng.mk else · line 227
Quoted 10 lines
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +10
-0+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' ?
toolchain/toolchain-crosstool-ng/crosstool-ng.mk else · line 239
Quoted 12 lines
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +9
-0+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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 13/15 toolchain: expose thread options in the Crosstool-NG backend
Quoted 3 lines · On Sun, 12 Dec 2010 11:37:22 +0100 "Yann E. MORIN"…
Quoted 1 line
s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_OLD).*:\# \2 is not settted:;
'settted' ?
Leftover from a crappy debugging session. Thanks for spotting this, I fixed it.
Quoted 17 lines
Quoted 13 lines
+CTNG_FIX_DOT_CONFIG_SED +=
s:^(|\# )(CT_LIBC_UCLIBC_LNXTHRD_NEW).*:\2=y:;toolchain/toolchain-crosstool-ng/crosstool-ng.mk +8
-0+ 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 +=Quoted 1 line
s:^(CT_PREFIX_DIR)=.*:\1="$(TOOLCHAIN_DIR)":;
I am not so sure what to say about this one...
Quoted 2 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 14/15 toolchain: more verbose in crosstool-ng backend
In reply to Thomas PetazzoniBy 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.
--- .../toolchain-crosstool-ng/crosstool-ng.config | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.config +4 -4
@@ -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
Signature · 1 line
1.7.0.4
PATCH 15/15 package: pass TARGET_MAKE_ENV at install/clean/uninstall steps
In reply to Thomas PetazzoniTARGET_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.
--- package/Makefile.autotools.in | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
package/Makefile.autotools.in +5 -5
@@ -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
Signature · 1 line
1.7.0.4
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> 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.
Signature · 1 line
Bye, Peter Korsgaard