From 26b3a17f58e9af55a36d1455c2a61ca4f22225b3 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sat, 12 Sep 2009 00:11:12 +0200 Subject: libc/eglibc: fix download Fix the test to check if download is forced. --- scripts/build/libc/eglibc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/build/libc') diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index 245cda86..340a02f2 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -54,7 +54,7 @@ do_libc_get() { -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_linuxthreads}" \ -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_localedef}" \ -a -f "${CT_LOCAL_TARBALLS_DIR}/${eglibc_ports}" \ - "${CT_FORCE_DOWNLOAD}" != "y" \ + -a "${CT_FORCE_DOWNLOAD}" != "y" \ ]; then CT_DoLog DEBUG "Got 'eglibc-${CT_LIBC_VERSION}' from local storage" for file in ${eglibc} ${eglibc_linuxthreads} ${eglibc_localedef} ${eglibc_ports}; do -- cgit v1.2.3 From b586e9ce7214b85e875ca608ea4bd7db1c4fe4e2 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 2 Oct 2009 00:04:24 +0200 Subject: libc/glibc: remove dead code The option to retrieve snapshots is already handled by the generic 'specific date' and 'use latest' entries. No need for a special case, as there's no code for it. --- config/libc/glibc.in | 10 ---------- scripts/build/libc/glibc.sh | 2 -- 2 files changed, 12 deletions(-) (limited to 'scripts/build/libc') diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 97d21c3e..3da40753 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -128,14 +128,4 @@ config LIBC_GLIBC_CVS_date endif # LIBC_GLIBC_CVS -#config LIBC_GLIBC_SNAPSHOT -# bool -# prompt "Use latest nightly snapshot" -# help -# See the help for the entry "Released tarball", above. -# -# If you can live with a moving code-base, say 'Y' here. -# If you want your toolchain to really be reproducible, look at the -# choice entry "Released tarball from FTP", above. - endchoice diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index a83fb253..2573da68 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -47,8 +47,6 @@ do_libc_get() { "glibc-${version}-branch${date:+:}${date}" \ "glibc-${addon}-cvs-${CT_LIBC_VERSION}" done -# elif [ "${CT_LIBC_GLIBC_SNAPSHOT}" = "y" ]; then -# : # Not yet handled... fi return 0 -- cgit v1.2.3 From 443f51a2dcaec99457e5797758c65e5c6c1d3664 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 2 Oct 2009 22:10:38 +0200 Subject: libc/glibc: fix building for seemingly native toolchains Build glibc with -O2 as a fix/workaround to building seemingly-native toolchains. See: - docs/overview.txt - docs/known-issues.txt - http://sourceware.org/ml/crossgcc/2009-09/msg00055.html --- docs/known-issues.txt | 6 ++++-- docs/overview.txt | 16 ++++++++++++++++ scripts/build/libc/glibc.sh | 8 ++++---- 3 files changed, 24 insertions(+), 6 deletions(-) (limited to 'scripts/build/libc') diff --git a/docs/known-issues.txt b/docs/known-issues.txt index 3c7eaab5..757939f2 100644 --- a/docs/known-issues.txt +++ b/docs/known-issues.txt @@ -51,8 +51,10 @@ Fix: None known. Workaround: - If this happens for you, stick with glibc-2.6.1 for now. - Or investigate! :-) + It seems that using -O2 in the CFLAGS fixes the problem. It has been + confirmed in the following threads: + http://sourceware.org/ml/crossgcc/2009-09/msg00055.html (for glibc) + http://sourceware.org/ml/crossgcc/2009-10/msg00001.html (for eglibc) -------------------------------- Symptoms: diff --git a/docs/overview.txt b/docs/overview.txt index 3b100a18..8d9a6f04 100644 --- a/docs/overview.txt +++ b/docs/overview.txt @@ -28,6 +28,7 @@ Running crosstool-NG Tools wrapper Using the toolchain Toolchain types + Seemingly-native toolchains Internals Makefile front-end Kconfig parser @@ -590,6 +591,21 @@ anyway!) were all being hashed out, Canada had three national political parties. http://en.wikipedia.org/wiki/Cross_compiler +Seemingly-native toolchains | +----------------------------+ + +Seemingly-native toolchains are toolchains that target the same architecture +as the one it is built on, and on which it will run, but the machine tuple +may be different (eg i686 vs. i386, or x86_64-unknown-linux-gnu vs. +x86_64-pc-linux-gnu). This also applies if the target architecture is of the +same kind (eg. x86 vs. x86_64, or ppc vs. ppc64). + +Such toolchain is tricky to build, as the configure scripts may incorrectly +assume that files (headers and libs) from the build (or host) machine can be +used by the cross-compiler it is going to build. The problem seems to arise +only with glibc (and eglibc?) starting with version 2.7. + + _____________ / Internals / diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index a83fb253..0f60bd13 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -180,7 +180,7 @@ do_libc_headers() { libc_cv_ppc_machine=yes \ CT_DoExecLog ALL \ - make CFLAGS="-O -DBOOTSTRAP_GCC" \ + make CFLAGS="-O2 -DBOOTSTRAP_GCC" \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ PARALLELMFLAGS="${PARALLELMFLAGS}" \ sysdeps/gnu/errlist.c @@ -197,7 +197,7 @@ do_libc_headers() { CT_DoExecLog ALL \ make cross-compiling=yes \ install_root=${CT_SYSROOT_DIR} \ - CFLAGS="-O -DBOOTSTRAP_GCC" \ + CFLAGS="-O2 -DBOOTSTRAP_GCC" \ ${LIBC_SYSROOT_ARG} \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ PARALLELMFLAGS="${PARALLELMFLAGS}" \ @@ -325,7 +325,7 @@ do_libc_start_files() { # Please see the comment for the configure step in do_libc(). BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O " \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${cross_cc} ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ @@ -457,7 +457,7 @@ do_libc() { # silly messages. GNU folks again, he? BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ -- cgit v1.2.3 From 399a88364fc3ae6555d90a8ccb47feb6d2efaf53 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 2 Oct 2009 22:10:17 +0200 Subject: libc/eglibc: fix building for seemingly native toolchains Build eglibc with -O2 as a fix/workaround to building seemingly-native toolchains (see docs/overview.txt). See: - docs/overview.txt - docs/known-issues.txt - http://sourceware.org/ml/crossgcc/2009-10/msg00001.html --- scripts/build/libc/eglibc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/build/libc') diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index 340a02f2..e2bd37b5 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -252,7 +252,7 @@ do_libc() { CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'" BUILD_CC="${CT_BUILD}-gcc" \ - CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O" \ + CFLAGS="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} -O2" \ CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ -- cgit v1.2.3 From d0c5d174bf933509d09656f050941bc465e25357 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sat, 3 Oct 2009 18:19:39 +0200 Subject: libc/glibc: don't use legacy snapshots glibc snapshots have not been updated for about the past 5 months. Consider them to be deprecated, now. --- config/libc/glibc.in | 12 ------------ scripts/build/libc/glibc.sh | 12 ------------ 2 files changed, 24 deletions(-) (limited to 'scripts/build/libc') diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 3da40753..777657c2 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -49,21 +49,10 @@ config LIBC_V_2_3_6 prompt "2.3.6 (OBSOLETE)" depends on OBSOLETE -config LIBC_V_LATEST - bool - prompt "'latest' snapshot (EXPERIMENTAL)" - depends on EXPERIMENTAL - -config LIBC_V_date - bool - prompt " (EXPERIMENTAL)" - depends on EXPERIMENTAL - endchoice config LIBC_VERSION string - prompt "Enter date (YYYYMMDD)" if LIBC_V_date # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW default "2.9" if LIBC_V_2_9 @@ -74,7 +63,6 @@ config LIBC_VERSION default "2.5.1" if LIBC_V_2_5_1 default "2.5" if LIBC_V_2_5 default "2.3.6" if LIBC_V_2_3_6 - default "latest" if LIBC_V_LATEST config LIBC_GLIBC_2_8_or_later bool diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 2573da68..8476bf8c 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -292,12 +292,6 @@ do_libc_start_files() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/') - # In case we're using a snapshot, fake a >=2.6 version. - if [ "${CT_LIBC_V_LATEST}" = "y" \ - -o "${CT_LIBC_V_date}" = "y" ]; then - glibc_version_major=3 - glibc_version_minor=0 - fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. @@ -407,12 +401,6 @@ do_libc() { # Add some default CC args glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/') glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/') - # In case we're using a snapshot, fake a >=2.6 version. - if [ "${CT_LIBC_V_LATEST}" = "y" \ - -o "${CT_LIBC_V_date}" = "y" ]; then - glibc_version_major=3 - glibc_version_minor=0 - fi if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \ -o ${glibc_version_major} -gt 2 ]; then # Don't use -pipe: configure chokes on it for glibc >= 2.6. -- cgit v1.2.3