summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-11-17 10:51:57 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-11-17 10:51:57 (GMT)
commit7ea82181db30cd437967e7bca1177f8cbd2f6fc5 (patch)
tree889200e88bc94a06a7a826575897528e90863ea1
parent28b38f922241bd273f4f71823c037d4af43d96ba (diff)
arch/x86: commonalise the 32- and 64-bit x86 arch
-rw-r--r--config/arch/x86.in6
-rw-r--r--config/arch/x86_64.in11
-rw-r--r--samples/i586-geode-linux-uclibc/crosstool.config24
-rw-r--r--samples/i686-nptl-linux-gnu/crosstool.config25
-rw-r--r--samples/x86_64-unknown-linux-gnu/crosstool.config29
-rw-r--r--samples/x86_64-unknown-linux-uclibc/crosstool.config36
-rw-r--r--scripts/build/arch/x86.sh32
-rw-r--r--scripts/build/arch/x86_64.sh6
8 files changed, 98 insertions, 71 deletions
diff --git a/config/arch/x86.in b/config/arch/x86.in
index 825f6c0..7657aaf 100644
--- a/config/arch/x86.in
+++ b/config/arch/x86.in
@@ -1,10 +1,14 @@
# x86 specific options
config ARCH_x86
+ select ARCH_SUPPORTS_32
+ select ARCH_SUPPORTS_64
+ select ARCH_DEFAULT_32
select ARCH_USE_MMU
select ARCH_SUPPORT_ARCH
select ARCH_SUPPORT_CPU
select ARCH_SUPPORT_TUNE
help
The x86 architecture, as defined by:
- http://www.intel.com/
+ 32-bit (ia32) : http://www.intel.com/
+ 64-bit (amd64): http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html
diff --git a/config/arch/x86_64.in b/config/arch/x86_64.in
deleted file mode 100644
index 90c831f..0000000
--- a/config/arch/x86_64.in
+++ /dev/null
@@ -1,11 +0,0 @@
-# x86_64 specific options
-
-config ARCH_x86_64
- select ARCH_64
- select ARCH_USE_MMU
- select ARCH_SUPPORT_ARCH
- select ARCH_SUPPORT_CPU
- select ARCH_SUPPORT_TUNE
- help
- The x86_64 architecture, as defined by:
- http://www.amd.com/us-en/Processors/DevelopWithAMD/0,,30_2252_875_7044,00.html
diff --git a/samples/i586-geode-linux-uclibc/crosstool.config b/samples/i586-geode-linux-uclibc/crosstool.config
index dbbf3e5..0880455 100644
--- a/samples/i586-geode-linux-uclibc/crosstool.config
+++ b/samples/i586-geode-linux-uclibc/crosstool.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# crosstool-NG version: hg_default@1596_241387704817
-# Wed Oct 28 19:23:31 2009
+# crosstool-NG version: hg_default@1635_19977a0c46c5
+# Tue Nov 17 11:47:12 2009
#
#
@@ -49,6 +49,7 @@ CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
+# CT_PATCH_NONE is not set
CT_PATCH_ORDER="bundled"
# CT_PATCH_SINGLE is not set
# CT_PATCH_USE_LOCAL is not set
@@ -88,6 +89,8 @@ CT_ARCH="x86"
# CT_ARCH_64 is not set
# CT_ARCH_SUPPORTS_BOTH_MMU is not set
# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
+# CT_ARCH_SUPPORTS_32 is not set
+# CT_ARCH_SUPPORTS_64 is not set
CT_ARCH_SUPPORT_ARCH=y
# CT_ARCH_SUPPORT_ABI is not set
CT_ARCH_SUPPORT_CPU=y
@@ -96,9 +99,13 @@ CT_ARCH_SUPPORT_TUNE=y
# CT_ARCH_DEFAULT_HAS_MMU is not set
# CT_ARCH_DEFAULT_BE is not set
# CT_ARCH_DEFAULT_LE is not set
+CT_ARCH_DEFAULT_32=y
+# CT_ARCH_DEFAULT_64 is not set
CT_ARCH_ARCH="pentium-mmx"
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
+# CT_ARCH_32b is not set
+# CT_ARCH_64b is not set
CT_ARCH_FLOAT_HW=y
# CT_ARCH_FLOAT_SW is not set
CT_TARGET_CFLAGS=""
@@ -113,10 +120,10 @@ CT_TARGET_LDFLAGS=""
# CT_ARCH_ia64 is not set
# CT_ARCH_mips is not set
# CT_ARCH_powerpc is not set
-# CT_ARCH_powerpc64 is not set
+# CT_ARCH_s390 is not set
+# CT_ARCH_s390x is not set
# CT_ARCH_sh is not set
CT_ARCH_x86=y
-# CT_ARCH_x86_64 is not set
CT_ARCH_USE_MMU=y
#
@@ -265,15 +272,16 @@ CT_CC_SUPPORT_OBJCXX=y
CT_CC_LANG_CXX=y
CT_CC_LANG_FORTRAN=y
CT_CC_LANG_JAVA=y
-CT_LIBC="uClibc"
#
# C-library
#
+CT_LIBC="uClibc"
CT_LIBC_VERSION="0.9.30.1"
# CT_LIBC_eglibc is not set
# CT_LIBC_glibc is not set
# CT_LIBC_newlib is not set
+# CT_LIBC_none is not set
CT_LIBC_uClibc=y
CT_LIBC_V_0_9_30_1=y
# CT_LIBC_V_0_9_30 is not set
@@ -293,13 +301,13 @@ CT_LIBC_UCLIBC_DEBUG_LEVEL=0
CT_LIBC_UCLIBC_BUILD_CROSS_LDD=y
CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
# CT_LIBC_UCLIBC_LOCALES is not set
+# CT_LIBC_SUPPORT_NPTL is not set
+CT_LIBC_SUPPORT_LINUXTHREADS=y
+CT_THREADS="linuxthreads"
#
# Common C library options
#
-# CT_LIBC_SUPPORT_NPTL is not set
-CT_LIBC_SUPPORT_LINUXTHREADS=y
-CT_THREADS="linuxthreads"
# CT_THREADS_NPTL is not set
CT_THREADS_LINUXTHREADS=y
# CT_THREADS_NONE is not set
diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config
index 0b972ee..94e5e92 100644
--- a/samples/i686-nptl-linux-gnu/crosstool.config
+++ b/samples/i686-nptl-linux-gnu/crosstool.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# crosstool-NG version: hg_default@1596_241387704817
-# Wed Oct 28 19:23:53 2009
+# crosstool-NG version: hg_default@1635_19977a0c46c5
+# Tue Nov 17 11:47:39 2009
#
#
@@ -49,6 +49,7 @@ CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
+# CT_PATCH_NONE is not set
CT_PATCH_ORDER="bundled"
# CT_PATCH_SINGLE is not set
# CT_PATCH_USE_LOCAL is not set
@@ -88,6 +89,8 @@ CT_ARCH="x86"
# CT_ARCH_64 is not set
# CT_ARCH_SUPPORTS_BOTH_MMU is not set
# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
+# CT_ARCH_SUPPORTS_32 is not set
+# CT_ARCH_SUPPORTS_64 is not set
CT_ARCH_SUPPORT_ARCH=y
# CT_ARCH_SUPPORT_ABI is not set
CT_ARCH_SUPPORT_CPU=y
@@ -96,9 +99,13 @@ CT_ARCH_SUPPORT_TUNE=y
# CT_ARCH_DEFAULT_HAS_MMU is not set
# CT_ARCH_DEFAULT_BE is not set
# CT_ARCH_DEFAULT_LE is not set
+CT_ARCH_DEFAULT_32=y
+# CT_ARCH_DEFAULT_64 is not set
CT_ARCH_ARCH="i686"
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
+# CT_ARCH_32b is not set
+# CT_ARCH_64b is not set
CT_ARCH_FLOAT_HW=y
# CT_ARCH_FLOAT_SW is not set
CT_TARGET_CFLAGS=""
@@ -113,10 +120,10 @@ CT_TARGET_LDFLAGS=""
# CT_ARCH_ia64 is not set
# CT_ARCH_mips is not set
# CT_ARCH_powerpc is not set
-# CT_ARCH_powerpc64 is not set
+# CT_ARCH_s390 is not set
+# CT_ARCH_s390x is not set
# CT_ARCH_sh is not set
CT_ARCH_x86=y
-# CT_ARCH_x86_64 is not set
CT_ARCH_USE_MMU=y
#
@@ -265,16 +272,18 @@ CT_CC_SUPPORT_OBJCXX=y
CT_CC_LANG_CXX=y
CT_CC_LANG_FORTRAN=y
CT_CC_LANG_JAVA=y
-CT_LIBC="glibc"
#
# C-library
#
+CT_LIBC="glibc"
CT_LIBC_VERSION="2.9"
# CT_LIBC_eglibc is not set
CT_LIBC_glibc=y
# CT_LIBC_newlib is not set
+# CT_LIBC_none is not set
# CT_LIBC_uClibc is not set
+# CT_LIBC_V_2_10_1 is not set
CT_LIBC_V_2_9=y
# CT_LIBC_V_2_8 is not set
# CT_LIBC_V_2_7 is not set
@@ -300,13 +309,13 @@ CT_LIBC_ADDONS_LIST=""
CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
CT_LIBC_GLIBC_MIN_KERNEL="2.6.31.1"
+CT_LIBC_SUPPORT_NPTL=y
+CT_LIBC_SUPPORT_LINUXTHREADS=y
+CT_THREADS="nptl"
#
# Common C library options
#
-CT_LIBC_SUPPORT_NPTL=y
-CT_LIBC_SUPPORT_LINUXTHREADS=y
-CT_THREADS="nptl"
CT_THREADS_NPTL=y
# CT_THREADS_LINUXTHREADS is not set
# CT_THREADS_NONE is not set
diff --git a/samples/x86_64-unknown-linux-gnu/crosstool.config b/samples/x86_64-unknown-linux-gnu/crosstool.config
index 1d7cfdc..4c41e83 100644
--- a/samples/x86_64-unknown-linux-gnu/crosstool.config
+++ b/samples/x86_64-unknown-linux-gnu/crosstool.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# crosstool-NG version: hg_default@1596_241387704817
-# Wed Oct 28 23:20:03 2009
+# crosstool-NG version: hg_default@1635_19977a0c46c5
+# Tue Nov 17 11:48:39 2009
#
#
@@ -49,6 +49,7 @@ CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
+# CT_PATCH_NONE is not set
CT_PATCH_ORDER="bundled"
# CT_PATCH_SINGLE is not set
# CT_PATCH_USE_LOCAL is not set
@@ -84,10 +85,12 @@ CT_LOG_FILE_COMPRESS=y
#
# Target options
#
-CT_ARCH="x86_64"
+CT_ARCH="x86"
CT_ARCH_64=y
# CT_ARCH_SUPPORTS_BOTH_MMU is not set
# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
+CT_ARCH_SUPPORTS_32=y
+CT_ARCH_SUPPORTS_64=y
CT_ARCH_SUPPORT_ARCH=y
# CT_ARCH_SUPPORT_ABI is not set
CT_ARCH_SUPPORT_CPU=y
@@ -96,9 +99,13 @@ CT_ARCH_SUPPORT_TUNE=y
# CT_ARCH_DEFAULT_HAS_MMU is not set
# CT_ARCH_DEFAULT_BE is not set
# CT_ARCH_DEFAULT_LE is not set
+CT_ARCH_DEFAULT_32=y
+# CT_ARCH_DEFAULT_64 is not set
CT_ARCH_ARCH=""
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
+# CT_ARCH_32b is not set
+CT_ARCH_64b=y
CT_ARCH_FLOAT_HW=y
# CT_ARCH_FLOAT_SW is not set
CT_TARGET_CFLAGS=""
@@ -113,10 +120,10 @@ CT_TARGET_LDFLAGS=""
# CT_ARCH_ia64 is not set
# CT_ARCH_mips is not set
# CT_ARCH_powerpc is not set
-# CT_ARCH_powerpc64 is not set
+# CT_ARCH_s390 is not set
+# CT_ARCH_s390x is not set
# CT_ARCH_sh is not set
-# CT_ARCH_x86 is not set
-CT_ARCH_x86_64=y
+CT_ARCH_x86=y
CT_ARCH_USE_MMU=y
#
@@ -265,16 +272,18 @@ CT_CC_SUPPORT_OBJCXX=y
CT_CC_LANG_CXX=y
CT_CC_LANG_FORTRAN=y
CT_CC_LANG_JAVA=y
-CT_LIBC="glibc"
#
# C-library
#
+CT_LIBC="glibc"
CT_LIBC_VERSION="2.9"
# CT_LIBC_eglibc is not set
CT_LIBC_glibc=y
# CT_LIBC_newlib is not set
+# CT_LIBC_none is not set
# CT_LIBC_uClibc is not set
+# CT_LIBC_V_2_10_1 is not set
CT_LIBC_V_2_9=y
# CT_LIBC_V_2_8 is not set
# CT_LIBC_V_2_7 is not set
@@ -300,13 +309,13 @@ CT_LIBC_ADDONS_LIST=""
CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
CT_LIBC_GLIBC_MIN_KERNEL="2.6.31.1"
+CT_LIBC_SUPPORT_NPTL=y
+CT_LIBC_SUPPORT_LINUXTHREADS=y
+CT_THREADS="nptl"
#
# Common C library options
#
-CT_LIBC_SUPPORT_NPTL=y
-CT_LIBC_SUPPORT_LINUXTHREADS=y
-CT_THREADS="nptl"
CT_THREADS_NPTL=y
# CT_THREADS_LINUXTHREADS is not set
# CT_THREADS_NONE is not set
diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config
index d666749..deae2c9 100644
--- a/samples/x86_64-unknown-linux-uclibc/crosstool.config
+++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# crosstool-NG version: hg_default@1596_241387704817
-# Wed Oct 28 23:20:18 2009
+# crosstool-NG version: hg_default@1635_19977a0c46c5
+# Tue Nov 17 11:51:38 2009
#
#
@@ -49,6 +49,7 @@ CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
+# CT_PATCH_NONE is not set
CT_PATCH_ORDER="bundled"
# CT_PATCH_SINGLE is not set
# CT_PATCH_USE_LOCAL is not set
@@ -84,10 +85,12 @@ CT_LOG_FILE_COMPRESS=y
#
# Target options
#
-CT_ARCH="x86_64"
+CT_ARCH="x86"
CT_ARCH_64=y
# CT_ARCH_SUPPORTS_BOTH_MMU is not set
# CT_ARCH_SUPPORTS_BOTH_ENDIAN is not set
+CT_ARCH_SUPPORTS_32=y
+CT_ARCH_SUPPORTS_64=y
CT_ARCH_SUPPORT_ARCH=y
# CT_ARCH_SUPPORT_ABI is not set
CT_ARCH_SUPPORT_CPU=y
@@ -96,9 +99,13 @@ CT_ARCH_SUPPORT_TUNE=y
# CT_ARCH_DEFAULT_HAS_MMU is not set
# CT_ARCH_DEFAULT_BE is not set
# CT_ARCH_DEFAULT_LE is not set
-CT_ARCH_ARCH="k8"
+CT_ARCH_DEFAULT_32=y
+# CT_ARCH_DEFAULT_64 is not set
+CT_ARCH_ARCH=""
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
+# CT_ARCH_32b is not set
+CT_ARCH_64b=y
CT_ARCH_FLOAT_HW=y
# CT_ARCH_FLOAT_SW is not set
CT_TARGET_CFLAGS=""
@@ -113,10 +120,16 @@ CT_TARGET_LDFLAGS=""
# CT_ARCH_ia64 is not set
# CT_ARCH_mips is not set
# CT_ARCH_powerpc is not set
-# CT_ARCH_powerpc64 is not set
+# CT_ARCH_s390 is not set
+# CT_ARCH_s390x is not set
# CT_ARCH_sh is not set
-# CT_ARCH_x86 is not set
-CT_ARCH_x86_64=y
+CT_ARCH_x86=y
+# CT_ARCH_ALPHA_EV4 is not set
+# CT_ARCH_ALPHA_EV45 is not set
+# CT_ARCH_ALPHA_EV5 is not set
+# CT_ARCH_ALPHA_EV56 is not set
+# CT_ARCH_ALPHA_EV6 is not set
+# CT_ARCH_ALPHA_EV67 is not set
CT_ARCH_USE_MMU=y
#
@@ -265,15 +278,16 @@ CT_CC_SUPPORT_OBJCXX=y
CT_CC_LANG_CXX=y
CT_CC_LANG_FORTRAN=y
CT_CC_LANG_JAVA=y
-CT_LIBC="uClibc"
#
# C-library
#
+CT_LIBC="uClibc"
CT_LIBC_VERSION="0.9.30.1"
# CT_LIBC_eglibc is not set
# CT_LIBC_glibc is not set
# CT_LIBC_newlib is not set
+# CT_LIBC_none is not set
CT_LIBC_uClibc=y
CT_LIBC_V_0_9_30_1=y
# CT_LIBC_V_0_9_30 is not set
@@ -293,13 +307,13 @@ CT_LIBC_UCLIBC_DEBUG_LEVEL=0
CT_LIBC_UCLIBC_BUILD_CROSS_LDD=y
CT_LIBC_UCLIBC_CONFIG_FILE="${CT_LIB_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
# CT_LIBC_UCLIBC_LOCALES is not set
+# CT_LIBC_SUPPORT_NPTL is not set
+CT_LIBC_SUPPORT_LINUXTHREADS=y
+CT_THREADS="linuxthreads"
#
# Common C library options
#
-# CT_LIBC_SUPPORT_NPTL is not set
-CT_LIBC_SUPPORT_LINUXTHREADS=y
-CT_THREADS="linuxthreads"
# CT_THREADS_NPTL is not set
CT_THREADS_LINUXTHREADS=y
# CT_THREADS_NONE is not set
diff --git a/scripts/build/arch/x86.sh b/scripts/build/arch/x86.sh
index 42a253a..dfdf96d 100644
--- a/scripts/build/arch/x86.sh
+++ b/scripts/build/arch/x86.sh
@@ -1,22 +1,22 @@
# Compute x86-specific values
-# This one really need a little love! :-(
+# This one really needs a little love! :-(
CT_DoArchTupleValues() {
- # The architecture part of the tuple:
- arch="${CT_ARCH_ARCH}"
- [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
- case "${arch}" in
- nocona|athlon*64|k8|athlon-fx|opteron)
- CT_DoError "Architecture is x86 (32-bit) but selected processor is \"${arch}\" (64-bit)";;
- "") CT_TARGET_ARCH=i386;;
- i386|i486|i586|i686) CT_TARGET_ARCH="${arch}";;
- winchip*) CT_TARGET_ARCH=i486;;
- pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;;
- pentiumpro|pentium*|athlon*) CT_TARGET_ARCH=i686;;
- *) CT_TARGET_ARCH=i586;;
- esac
- # The kernel ARCH:
- CT_KERNEL_ARCH=i386
+ # Override the architecture part of the tuple:
+ if [ "${CT_ARCH_64}" = "y" ]; then
+ CT_TARGET_ARCH=x86_64
+ else
+ arch="${CT_ARCH_ARCH}"
+ [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}"
+ case "${arch}" in
+ "") CT_TARGET_ARCH=i386;;
+ i386|i486|i586|i686) CT_TARGET_ARCH="${arch}";;
+ winchip*) CT_TARGET_ARCH=i486;;
+ pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;;
+ pentiumpro|pentium*|athlon*) CT_TARGET_ARCH=i686;;
+ *) CT_TARGET_ARCH=i586;;
+ esac
+ fi
}
diff --git a/scripts/build/arch/x86_64.sh b/scripts/build/arch/x86_64.sh
deleted file mode 100644
index 1db0791..0000000
--- a/scripts/build/arch/x86_64.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Compute x86_64-specific values
-
-CT_DoArchTupleValues() {
- # The architecture part of the tuple:
- CT_TARGET_ARCH="${CT_ARCH}"
-}