Skip to contentSkip to conversation

Update crosstool-NG backend

PATCH New Yann E. MORIN 2 participants 6 messages Feb 9, 2011 – Feb 10, 2011

lore
Share & tools
lore
#0 lore raw

cover Update crosstool-NG backend

Hello!

This patch series updates the crosstool-NG backend:
- update to crosstool-NG 1.10.0, remove upstreamed patches
- use more options from the BR config into CT-NG config

[PATCH 1/4] toolchain/ct-ng: update to crosstool-NG 1.10.0 [PATCH 2/4] toolchain/ct-ng: use MMU option from the BR config [PATCH 3/4] toolchain/ct-ng: use processor variant from BR config [PATCH 4/4] toolchain/ct-ng: use soft-float option from BR config

 toolchain/toolchain-crosstool-ng/001-no-cvs.patch  |    2 +-
 .../002-dont-nuke-ct-prefix.patch                  |   37 ------
 .../toolchain-crosstool-ng/003-use-sysroot.patch   |   35 -----
 .../toolchain-crosstool-ng/crosstool-ng.config     |  133 +++++++++++---------
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk   |   27 ++++-
 5 files changed, 100 insertions(+), 134 deletions(-)

Regards,
Yann E. MORIN.

#1 lore raw

PATCH 1/4 toolchain/ct-ng: update to crosstool-NG 1.10.0

Update the default .config file.
Remove now unnecessary patches.

---
 toolchain/toolchain-crosstool-ng/001-no-cvs.patch  |    2 +-
 .../002-dont-nuke-ct-prefix.patch                  |   37 ------
 .../toolchain-crosstool-ng/003-use-sysroot.patch   |   35 -----
 .../toolchain-crosstool-ng/crosstool-ng.config     |  133 +++++++++++---------
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk   |    2 +-
 5 files changed, 77 insertions(+), 132 deletions(-)
 delete mode 100644 toolchain/toolchain-crosstool-ng/002-dont-nuke-ct-prefix.patch
 delete mode 100644 toolchain/toolchain-crosstool-ng/003-use-sysroot.patch
toolchain/toolchain-crosstool-ng/001-no-cvs.patch +1 -1
index fd805d3..c82d359 100644
@@ -8,7 +8,7 @@ under Buildroot, so cvs is not required.
 @@ -359,7 +359,6 @@
               err="'libtool' 1.5.26 or above was not found"
  has_or_abort prog=stat
- has_or_abort prog="aria2c curl wget"
+ has_or_abort prog="curl wget"
 -has_or_abort prog=cvs
  has_or_abort prog=patch
  has_or_abort prog=tar
toolchain/toolchain-crosstool-ng/002-dont-nuke-ct-prefix.patch deleted +0 -37
deleted file mode 100644
index a5405fa..0000000
@@ -1,37 +0,0 @@
-ct-ng: don't remove CT_PREFIX_DIR
-
-You might want to install the ct-ng toolchain into an existing directory
-with other files (which is what we're doing in BR for HOST_DIR/usr),
-so don't remove it.
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- scripts/crosstool-NG.sh.in |    8 --------
- 1 file changed, 8 deletions(-)
-
-Index: crosstool-ng-1.8.0/scripts/crosstool-NG.sh.in
-===================================================================
---- crosstool-ng-1.8.0.orig/scripts/crosstool-NG.sh.in
-+++ crosstool-ng-1.8.0/scripts/crosstool-NG.sh.in
-@@ -210,11 +210,6 @@ CT_TOOLCHAIN_ID="crosstool-${CT_VERSION}
- 
- CT_DoLog EXTRA "Preparing working directories"
- 
--# Ah! The build directory shall be eradicated, even if we restart!
--if [ -d "${CT_BUILD_DIR}" ]; then
--    CT_DoForceRmdir "${CT_BUILD_DIR}"
--fi
--
- # Don't eradicate directories if we need to restart
- if [ -z "${CT_RESTART}" ]; then
-     # Get rid of pre-existing installed toolchain and previous build directories.
-@@ -226,9 +221,6 @@ if [ -z "${CT_RESTART}" ]; then
-     if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_SRC_DIR}" ]; then
-         CT_DoForceRmdir "${CT_SRC_DIR}"
-     fi
--    if [ -d "${CT_INSTALL_DIR}" ]; then
--        CT_DoForceRmdir "${CT_INSTALL_DIR}"
--    fi
-     # In case we start anew, get rid of the previously saved state directory
-     if [ -d "${CT_STATE_DIR}" ]; then
-         CT_DoForceRmdir "${CT_STATE_DIR}"
toolchain/toolchain-crosstool-ng/003-use-sysroot.patch deleted +0 -35
deleted file mode 100644
index f9b0baf..0000000
@@ -1,35 +0,0 @@
-ct-ng: use 'sysroot' rather than 'sys-root' for sysroot directory
-
-The sysroot directory name is arbitrary, but 'sysroot' matches the GCC
-documentation.
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- scripts/crosstool-NG.sh.in |    6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: crosstool-ng-1.8.0/scripts/crosstool-NG.sh.in
-===================================================================
---- crosstool-ng-1.8.0.orig/scripts/crosstool-NG.sh.in
-+++ crosstool-ng-1.8.0/scripts/crosstool-NG.sh.in
-@@ -274,7 +274,7 @@ esac
- if [ -z "${CT_RESTART}" ]; then
-     # Arrange paths depending on wether we use sys-root or not.
-     if [ "${CT_USE_SYSROOT}" = "y" ]; then
--        CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/sys-root"
-+        CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/sysroot"
-         CT_DEBUGROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/debug-root"
-         CT_HEADERS_DIR="${CT_SYSROOT_DIR}/usr/include"
-         BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
-@@ -315,9 +315,9 @@ if [ -z "${CT_RESTART}" ]; then
- 
-     if [ "${CT_USE_SYSROOT}" = "y" ]; then
-         # Prevent gcc from installing its libraries outside of the sys-root
--        CT_DoExecLog ALL ln -sf "./${CT_SYSROOT_DIR_PREFIX}/sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
-+        CT_DoExecLog ALL ln -sf "./${CT_SYSROOT_DIR_PREFIX}/sysroot/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
-         # Prevent libc from installing its headers outside of the sysroot
--        CT_DoExecLog ALL ln -sf "./${CT_SYSROOT_DIR_PREFIX}/sys-root/usr/include" "${CT_PREFIX_DIR}/${CT_TARGET}/include"
-+        CT_DoExecLog ALL ln -sf "./${CT_SYSROOT_DIR_PREFIX}/sysroot/usr/include" "${CT_PREFIX_DIR}/${CT_TARGET}/include"
-     fi
- 
-     # Now, in case we're 64 bits, just have lib64/ be a symlink to lib/
toolchain/toolchain-crosstool-ng/crosstool-ng.config +75 -58

294 lines not on this page · raw message

toolchain/toolchain-crosstool-ng/crosstool-ng.mk +1 -1
index ee267df..c838f51 100644
@@ -14,7 +14,7 @@ uclibc: dependencies $(STAMP_DIR)/ct-ng-toolchain-installed
 # Internal variables
 
 # Crostool-NG hard-coded configuration options
-CTNG_VERSION:=1.8.0
+CTNG_VERSION:=1.10.0
 CTNG_SITE:=http://ymorin.is-a-geek.org/download/crosstool-ng/
 CTNG_SOURCE:=crosstool-ng-$(CTNG_VERSION).tar.bz2
 CTNG_DIR:=$(BUILD_DIR)/crosstool-ng-$(CTNG_VERSION)
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/4 toolchain/ct-ng: use MMU option from the BR config

In reply to Yann E. MORIN
---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +5 -1
index c838f51..b14c08e 100644
@@ -198,10 +198,14 @@ CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_[BL]E).*:\# \2 is not set:;
 CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_$(CTNG_ENDIAN)) is not set:\1=y:;
 CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_(32|64)).*:\# \2 is not set:;
 CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_$(CTNG_BIT)) is not set:\1=y:;
-CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_USE_MMU) is not set:\1=y:;
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_TARGET_VENDOR)=.*:\1="unknown":;
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_TARGET_ALIAS)=.*:\1="$(GNU_TARGET_NAME)":;
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_PKGVERSION)="(.*)":\1="crosstool-NG $(CTNG_VERSION) - buildroot $(BR2_VERSION_FULL)":;
+ifneq ($(call qstrip,$(BR2_USE_MMU)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_USE_MMU) is not set:\1=y:;
+else
+CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_USE_MMU)=y:\# \1 is not set:;
+endif
 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
Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/4 toolchain/ct-ng: use processor variant from BR config

In reply to Yann E. MORIN
---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +9 -1
index b14c08e..553d93b 100644
@@ -191,7 +191,7 @@ endif
 #
 # Lots of other awfull sed manipulations go here, to override CT-NG's .config
 # with BR2 config options.
-# Known missing: arch variant & options, floating point (HW/SW), uClibc/eglibc config...
+# Known missing: arch options, floating point (HW/SW), uClibc/eglibc config...
 #
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_INSTALL_DIR_RO)=y:\# \1 is not set:;
 CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_[BL]E).*:\# \2 is not set:;
@@ -215,6 +215,14 @@ else
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_CC_LANG_CXX)=.*:\# \1 is not set:;
 endif
 
+# Shoe-horn CPU variant now
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_ARCH)=.*:\1=$(BR2_GCC_TARGET_ARCH):;
+endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_TUNE)=.*:\1=$(BR2_GCC_TARGET_TUNE):;
+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:;
Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/4 toolchain/ct-ng: use soft-float option from BR config

In reply to Yann E. MORIN
---
 toolchain/toolchain-crosstool-ng/crosstool-ng.mk |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
toolchain/toolchain-crosstool-ng/crosstool-ng.mk +10 -1
index 553d93b..d066e98 100644
@@ -191,7 +191,7 @@ endif
 #
 # Lots of other awfull sed manipulations go here, to override CT-NG's .config
 # with BR2 config options.
-# Known missing: arch options, floating point (HW/SW), uClibc/eglibc config...
+# Known missing: arch options, uClibc/eglibc config...
 #
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_INSTALL_DIR_RO)=y:\# \1 is not set:;
 CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_[BL]E).*:\# \2 is not set:;
@@ -223,6 +223,15 @@ ifneq ($(call qstrip,$(BR2_GCC_TARGET_TUNE)),)
 CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_TUNE)=.*:\1=$(BR2_GCC_TARGET_TUNE):;
 endif
 
+# And floating point now
+ifeq ($(call qstrip,$(BR2_SOFT_FLOAT)),)
+CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_FLOAT_HW) is not set:\1=y:;
+CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_FLOAT_SW)=y:\# \1 is not set:;
+else
+CTNG_FIX_DOT_CONFIG_SED += s:^(CT_ARCH_FLOAT_HW)=y:\# \1 is not set:;
+CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_FLOAT_SW) is not set:\1=y:;
+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:;
Signature · 1 line
1.7.1
#5 lore raw

cover Update crosstool-NG backend

In reply to Yann E. MORIN
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Yann> Hello!
Yann> This patch series updates the crosstool-NG backend:
Yann> - update to crosstool-NG 1.10.0, remove upstreamed patches Yann> - use more options from the BR config into CT-NG config

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard