Pull request for branch for-2011.02/toolchain-improvements
Hello,
Here is a new version of the toolchain improvement patch set. Compared to previous version v1, this version v2 includes the following changes:
* In external toolchain support, make the C++ support and thread support options visible even in the case of custom external toolchains using glibc. It is indeed possible to build glibc toolchains without either C++ or thread support. Therefore, the BR2_TOOLCHAIN_EXTERNAL_GLIBC symbol no longer selects C++ and thread support. The existing external toolchain profiles have been updated, since they all support C++ and threads.
* Improvements in the option labels and descriptions, following Peter's comments.
* The build fix for uClibc snapshot has been removed, since it has been merged upstream.
* Renamed the *_C_PLUS_PLUS options to *_CXX, after Yann's comment, and used this new option in crosstool-ng.mk instead of BR2_INSTALL_LIBSTDCPP.
* Fixed the "is not settted" string in crosstool-ng.mk, which was a leftover from a debugging session.
* Rebased on top of the master branch, which involved resolving a conflict against the ccache change.
You'll find below the initial announcement of v1, which included a general description of the patchset.
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 cc37a07f289f56a81195933810af705d77e95ee4:
Peter Korsgaard (1):
zlib: really fix install for static only builds
are available in the git repository at:
git://git.busybox.net/~tpetazzoni/git/buildroot for-2011.02/toolchain-improvements
Thomas Petazzoni (14):
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
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 | 18 +- toolchain/toolchain-buildroot/Config.in.2 | 102 ++++++++ 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 | 27 ++- toolchain/toolchain-external/Config.in | 250 +++++++++++++++++++- toolchain/toolchain-external/Config.in.2 | 17 -- toolchain/toolchain-external/ext-tool.mk | 212 ++++++++++++----- toolchain/uClibc/uclibc.mk | 2 +- 29 files changed, 709 insertions(+), 507 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
Thanks,
Signature · 1 line
Thomas Petazzoni
PATCH 1/14 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.
However, this commit changes the name of the options visible in the configuration interface, so existing .config files will have to be updated accordingly.
--- 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 support" + 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 support" + 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' support" + 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 2/14 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/14 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 | 168 ++++++++++++++++++++++-- toolchain/toolchain-external/Config.in.2 | 17 --- toolchain/toolchain-external/ext-tool.mk | 210 +++++++++++++++++++++--------- 6 files changed, 315 insertions(+), 98 deletions(-) delete mode 100644 toolchain/toolchain-external/Config.in.2
Makefile +2 -1
@@ -279,6 +279,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
@@ -600,7 +601,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 +158 -10
193 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 4/14 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 | 7 ------- toolchain/toolchain-external/ext-tool.mk | 4 ++-- 5 files changed, 4 insertions(+), 26 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 -7
@@ -218,12 +218,5 @@ endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM -config BR2_TOOLCHAIN_EXTERNAL_STRIP - bool - default y - 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/14 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 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/helpers.mk | 2 +- toolchain/toolchain-buildroot/Config.in.2 | 16 ++++++++++++++ toolchain/toolchain-common.in | 25 ++------------------- toolchain/toolchain-crosstool-ng/Config.in | 8 +++++++ toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 2 +- toolchain/toolchain-external/Config.in | 14 ++++++++++++ 10 files changed, 49 insertions(+), 30 deletions(-)
package/Makefile.in +1 -1
@@ -307,7 +307,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/helpers.mk +1 -1
@@ -220,7 +220,7 @@ check_arm_abi = \ check_cplusplus = \ $(TARGET_CXX) -v > /dev/null 2>&1 ; \ if test $$? -ne 0 ; then \ - echo "BR2_INSTALL_LIBSTDCPP is selected but C++ support not available in external toolchain" ; \ + echo "C++ support is selected but is not available in external toolchain" ; \ exit 1 ; \ fi
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_CXX + 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_CXX + 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-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_CXX)),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:;
toolchain/toolchain-external/Config.in +14 -0
@@ -7,6 +7,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009 bool "CodeSourcery ARM 2010.09" depends on BR2_arm select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP 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,
@@ -20,6 +21,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1 bool "CodeSourcery ARM 2010q1" depends on BR2_arm select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP 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
@@ -33,6 +35,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1 bool "CodeSourcery ARM 2009q1" depends on BR2_arm select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP 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
@@ -46,6 +49,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44 bool "CodeSourcery MIPS 4.4" depends on BR2_mips || BR2_mipsel select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP 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
@@ -68,6 +72,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 bool "CodeSoucery PowerPC 2010.09" depends on BR2_powerpc select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP help Toolchain for the PowerPC architecture, from CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
@@ -85,6 +90,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009 bool "CodeSoucery PowerPC 2010.09" depends on BR2_sh select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP help Toolchain for the SuperH architecture, from CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11, uClibc 0.9.30,
@@ -216,6 +222,14 @@ config BR2_TOOLCHAIN_EXTERNAL_PROGRAM_INVOCATION endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC +config BR2_TOOLCHAIN_EXTERNAL_CXX + bool "Toolchain has C++ support?" + select BR2_INSTALL_LIBSTDCPP + help + Select this option if your external toolchain has C++ + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM endif # BR2_TOOLCHAIN_EXTERNAL
Signature · 1 line
1.7.0.4
PATCH 6/14 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/14 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 8/14 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 | 27 +++++++++++++++++++++++++++ toolchain/toolchain-common.in | 29 +++-------------------------- toolchain/toolchain-external/Config.in | 14 ++++++++++++++ toolchain/toolchain-external/ext-tool.mk | 2 +- 10 files changed, 62 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 +27 -0
@@ -76,6 +76,33 @@ 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 + Use this option to select the thread library implementation + that should be used in your toolchain. 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 +14 -0
@@ -8,6 +8,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009 depends on BR2_arm select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_THREADS 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,
@@ -22,6 +23,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1 depends on BR2_arm select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_THREADS 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
@@ -36,6 +38,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1 depends on BR2_arm select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_THREADS 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
@@ -50,6 +53,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44 depends on BR2_mips || BR2_mipsel select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_THREADS 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
@@ -73,6 +77,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 depends on BR2_powerpc select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_THREADS help Toolchain for the PowerPC architecture, from CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
@@ -91,6 +96,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009 depends on BR2_sh select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_THREADS help Toolchain for the SuperH architecture, from CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11, uClibc 0.9.30,
@@ -230,6 +236,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CXX support. 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 + Select this option if your external toolchain has thread + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM endif # BR2_TOOLCHAIN_EXTERNAL
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 9/14 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/14 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/14 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 12/14 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_CXX 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 set:; +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/14 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 14/14 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