Compare commits

...

27 Commits
master ... 1.1

Author SHA1 Message Date
Yann E. MORIN" 4090bf0539 1.1: close branch 13 years ago
Yann E. MORIN" be5e3715d0 Restore the 1.1 maintenance branch. 14 years ago
Yann E. MORIN" 16826bc406 1.1 maintenance: bump version to +svn 15 years ago
Yann E. MORIN" a4a330a3b4 1.1 maintenance: bump version to 1.1.3a 15 years ago
Yann E. MORIN" 2bbe6b8feb Backport #725 from trunk: 15 years ago
Yann E. MORIN" 34afde3709 Bump version to +svn. 15 years ago
Yann E. MORIN" ac8d09d322 1.1 maintenance: bump version to 1.1.3 15 years ago
Yann E. MORIN" b4460f9280 Backport #718 from trunk: 15 years ago
Yann E. MORIN" 832f9227e1 Backport #698 from trunk: 15 years ago
Yann E. MORIN" 6b593896b0 Backport #697 from trunk: 15 years ago
Yann E. MORIN" 9f024cff73 Backport #676 from trunk: 15 years ago
Yann E. MORIN" 0220ee175b Backport #654 from trunk: 15 years ago
Yann E. MORIN" bb9a5616c4 Bump maintenance branch version to +svn. 15 years ago
Yann E. MORIN" d220320208 Bump maintenance branch version. 15 years ago
Yann E. MORIN" 558046ba26 Backport #661 from trunk: 15 years ago
Yann E. MORIN" 68aa4a1846 Bump maintenance version to +svn... 15 years ago
Yann E. MORIN" 88b9d34615 Backport #657 from trunk: 15 years ago
Yann E. MORIN" 46dd3f036f 1.1 mainteance: bump version to 1.1.1. 15 years ago
Yann E. MORIN" d2dae08b03 Backport #639 from trunk: 15 years ago
Yann E. MORIN" 7eb9c29a52 Backport #635 from trunk: 15 years ago
Yann E. MORIN" b1fb41d2bd Backport #634 from trunk: 15 years ago
Yann E. MORIN" 1096033691 Backport #633 from trunk: 15 years ago
Yann E. MORIN" 899e3a9302 Backport #631 from trunk: 15 years ago
Yann E. MORIN" ba03986016 Backport #629 from trunk: 15 years ago
Yann E. MORIN" 109690e1e2 Backport #627 from trunk: 15 years ago
Yann E. MORIN" 409ef5b84c Create a maintenance branch for 1.1. 15 years ago
Yann E. MORIN" a0ae92ef4b Tag 1.1.0 version. 15 years ago
  1. 2
      .version
  2. 3
      arch/arm/config.in
  3. 17
      arch/arm/functions
  4. 6
      arch/mips/functions
  5. 6
      configure
  6. 4
      docs/CREDITS
  7. 39
      patches/glibc/2.3.6/250-csu-Makefile.patch
  8. 209
      patches/mpfr/2.3.1/100-thread-safe-configure.patch
  9. 23
      scripts/build/binutils.sh
  10. 27
      scripts/build/cc_gcc.sh
  11. 4
      scripts/build/libc_uClibc.sh
  12. 14
      scripts/build/mpfr.sh
  13. 19
      scripts/crosstool.sh
  14. 5
      scripts/functions

2
.version

@ -1 +1 @@
1.1.0
1.1.3a+svn

3
arch/arm/config.in

@ -7,3 +7,6 @@ config ARCH_ARM_EABI
default n
help
Set up the toolchain so that it generates EABI-compliant binaries.
config ARCH_ABI
default "aapcs" if ARCH_ARM_EABI

17
arch/arm/functions

@ -11,4 +11,21 @@ CT_DoArchValues() {
uClibc,) CT_TARGET_SYS=uclibc;;
uClibc,y) CT_TARGET_SYS=uclibcgnueabi;;
esac
case "${CT_ARCH_ABI},${CT_ARCH_ARM_EABI}" in
*,) ;;
aapcs,y)
CT_DoLog DEBUG "'--with-abi=aapcs' is in fact '-mabi=aapcs-linux' when used in CFLAGS."
CT_ARCH_ABI_CFLAGS="-mabi=aapcs-linux"
;;
,y)
CT_DoLog WARN "Forcing ABI to 'aapcs-linux' for use with EABI."
CT_ARCH_WITH_ABI="--with-abi=aapcs"
CT_ARCH_ABI_CFLAGS="-mabi=aapcs-linux"
;;
*,y)
CT_DoLog ERROR "ABI='${CT_ARCH_ABI}' not supported for EABI."
CT_Abort "If you know you are right, please edit 'arch/arm/functions' in crosstool-NG sources."
;;
esac
}

6
arch/mips/functions

@ -3,4 +3,10 @@
CT_DoArchValues() {
# The architecture part of the tuple:
CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
# Override CFLAGS for endianness:
case "${CT_ARCH_BE},${CT_ARCH_LE}" in
y,) CT_ARCH_ENDIAN_CFLAG="-EB";;
,y) CT_ARCH_ENDIAN_CFLAG="-EL";;
esac
}

6
configure vendored

@ -125,13 +125,13 @@ fi
# If we can't get the revision number, use date
case "${VERSION}" in
*+svn)
REVISION=$(svnversion)
REVISION=$(LC_ALL=C svnversion)
case "${REVISION}" in
exported)
VERSION="${VERSION}:unknown@$(date +%Y%m%d.%H%M%S)";;
*)
URL=$(LANG=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-)
ROOT=$(LANG=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-)
URL=$(LC_ALL=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-)
ROOT=$(LC_ALL=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-)
VERSION="${VERSION}:${URL#${ROOT}}@${REVISION}"
;;
esac

4
docs/CREDITS

@ -39,6 +39,10 @@ And in order of appearance on the crossgcc ML:
Michael Abbott:
- make it build with ancient findutils
Willy Tarreau:
- a patch to glibc to build on 'ancient' shells
- reported mis-use of $CT_CC_NATIVE
Many others have contributed, either in form of patches, suggestions,
comments, or testing... Thank you to all of you!

39
patches/glibc/2.3.6/250-csu-Makefile.patch

@ -0,0 +1,39 @@
Use printf instead of echo for some shells.
http://www.cygwin.com/ml/libc-alpha/2005-02/msg00123.html
This patch does not generate invalid csu/version-info.h which has
unterminating " line because some /bin/sh cannot parse correctly. The
previous discussion was:
http://sources.redhat.com/ml/libc-alpha/2004-08/msg00129.html
http://sources.redhat.com/ml/libc-alpha/2004-08/msg00145.html
This patch gets rid of all this issue because the conclusion of the
discussion was to use printf instead of echo. Roland, could you look
at it again?
Regards,
-- gotom
2005-02-26 GOTO Masanori <gotom@debian.or.jp>
* csu/Makefile: Use printf instead of echo for some shells.
Index: csu/Makefile
===================================================================
RCS file: /cvs/glibc/libc/csu/Makefile,v
retrieving revision 1.75
diff -u -p -r1.75 Makefile
--- glibc/csu/Makefile 3 Jan 2005 17:57:14 -0000 1.75
+++ glibc.new/csu/Makefile 27 Feb 2005 01:17:49 -0000
@@ -241,7 +241,7 @@ $(objpfx)version-info.h: $(common-objpfx
esac; \
files="$(all-Banner-files)"; \
if test -n "$$files"; then \
- echo "\"Available extensions:\\n\""; \
+ printf '"Available extensions:\\n"\n'; \
sed -e '/^#/d' -e 's/^[[:space:]]*/ /' \
-e 's/^\(.*\)$$/\"\1\\n\"/' $$files; \
fi) > $@T

209
patches/mpfr/2.3.1/100-thread-safe-configure.patch

@ -0,0 +1,209 @@
diff -Naurd mpfr-2.3.1-a/acinclude.m4 mpfr-2.3.1-b/acinclude.m4
--- mpfr-2.3.1-a/acinclude.m4 2008-01-23 13:36:46.000000000 +0000
+++ mpfr-2.3.1-b/acinclude.m4 2008-01-23 13:36:46.000000000 +0000
@@ -286,6 +286,9 @@
dnl important to run the test below.
if test "$enable_thread_safe" = yes; then
AC_CACHE_CHECK([for TLS support], mpfr_cv_working_tls, [
+saved_CPPFLAGS="$CPPFLAGS"
+# The -I$srcdir is necessary when objdir is different from srcdir.
+CPPFLAGS="$CPPFLAGS -I$srcdir"
AC_RUN_IFELSE([
#define MPFR_USE_THREAD_SAFE 1
#include "mpfr-thread.h"
@@ -297,6 +300,7 @@
[AC_MSG_RESULT(no)
AC_MSG_ERROR([please configure with --disable-thread-safe])],
[mpfr_cv_working_tls="cannot test, assume yes"])
+CPPFLAGS="$saved_CPPFLAGS"
])
fi
])
diff -Naurd mpfr-2.3.1-a/configure mpfr-2.3.1-b/configure
--- mpfr-2.3.1-a/configure 2008-01-29 08:51:07.000000000 +0000
+++ mpfr-2.3.1-b/configure 2008-05-10 23:49:37.000000000 +0000
@@ -7528,6 +7528,9 @@
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+saved_CPPFLAGS="$CPPFLAGS"
+# The -I$srcdir is necessary when objdir is different from srcdir.
+CPPFLAGS="$CPPFLAGS -I$srcdir"
if test "$cross_compiling" = yes; then
mpfr_cv_working_tls="cannot test, assume yes"
else
@@ -7578,6 +7581,7 @@
fi
+CPPFLAGS="$saved_CPPFLAGS"
fi
{ echo "$as_me:$LINENO: result: $mpfr_cv_working_tls" >&5
@@ -9278,7 +9282,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 9281 "configure"' > conftest.$ac_ext
+ echo '#line 9285 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -11103,11 +11107,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11106: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11110: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11110: \$? = $ac_status" >&5
+ echo "$as_me:11114: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11393,11 +11397,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11396: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11400: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11400: \$? = $ac_status" >&5
+ echo "$as_me:11404: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11497,11 +11501,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11500: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11504: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11504: \$? = $ac_status" >&5
+ echo "$as_me:11508: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13859,7 +13863,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13862 "configure"
+#line 13866 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13959,7 +13963,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 13962 "configure"
+#line 13966 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16379,11 +16383,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16382: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16386: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16386: \$? = $ac_status" >&5
+ echo "$as_me:16390: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16483,11 +16487,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16486: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16490: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16490: \$? = $ac_status" >&5
+ echo "$as_me:16494: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18060,11 +18064,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18063: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18067: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18067: \$? = $ac_status" >&5
+ echo "$as_me:18071: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18164,11 +18168,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18167: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18171: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18171: \$? = $ac_status" >&5
+ echo "$as_me:18175: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -20364,11 +20368,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20367: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20371: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:20371: \$? = $ac_status" >&5
+ echo "$as_me:20375: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -20654,11 +20658,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20657: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20661: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:20661: \$? = $ac_status" >&5
+ echo "$as_me:20665: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -20758,11 +20762,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:20761: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:20765: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:20765: \$? = $ac_status" >&5
+ echo "$as_me:20769: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized

23
scripts/build/binutils.sh

@ -40,7 +40,10 @@ do_binutils() {
--target=${CT_TARGET} \
--prefix=${CT_PREFIX_DIR} \
--disable-nls \
--disable-multilib \
--disable-werror \
${binutils_opts} \
${CT_ARCH_WITH_FLOAT} \
${CT_BINUTILS_EXTRA_CONFIG} \
${BINUTILS_SYSROOT_ARG} 2>&1 |CT_DoLog ALL
@ -80,14 +83,18 @@ do_binutils_target() {
CT_Pushd "${CT_BUILD_DIR}/build-binutils-for-target"
CT_DoLog EXTRA "Configuring binutils for target"
"${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--target=${CT_TARGET} \
--prefix=/usr \
--enable-shared --enable-static \
${CT_BINUTILS_EXTRA_CONFIG} \
--disable-nls 2>&1 |CT_DoLog ALL
"${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure" \
--build=${CT_BUILD} \
--host=${CT_TARGET} \
--target=${CT_TARGET} \
--prefix=/usr \
--disable-werror \
--enable-shared \
--enable-static \
--disable-nls \
--disable-multilib \
${CT_ARCH_WITH_FLOAT} \
${CT_BINUTILS_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
build_targets=$(echo "${targets}" |sed -r -e 's/(^| +)/\1all-/g;')
install_targets=$(echo "${targets}" |sed -r -e 's/(^| +)/\1install-/g;')

27
scripts/build/cc_gcc.sh

@ -59,12 +59,17 @@ do_cc_core_static() {
CT_DoLog EXTRA "Configuring static core C compiler"
extra_config="${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
[ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
[ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
extra_config="${extra_config} --enable-__cxa_atexit"
else
extra_config="${extra_config} --disable-__cxa_atexit"
fi
CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
# Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
CC_FOR_BUILD="${CT_CC_NATIVE}" \
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
${CT_CANADIAN_OPT} \
@ -81,6 +86,7 @@ do_cc_core_static() {
--enable-symvers=gnu \
--enable-languages=c \
--disable-shared \
--enable-target-optspace \
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
if [ "${CT_CANADIAN}" = "y" ]; then
@ -112,11 +118,16 @@ do_cc_core_shared() {
CT_DoLog EXTRA "Configuring shared core C compiler"
extra_config="${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
[ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
[ "${CT_CC_GCC_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
extra_config="${extra_config} --enable-__cxa_atexit"
else
extra_config="${extra_config} --disable-__cxa_atexit"
fi
CT_DoLog DEBUG "Extra config passed: \"${extra_config}\""
CC_FOR_BUILD="${CT_CC_NATIVE}" \
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
${CT_CANADIAN_OPT} \
@ -131,6 +142,7 @@ do_cc_core_shared() {
--enable-symvers=gnu \
--enable-languages=c \
--enable-shared \
--enable-target-optspace \
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
# HACK: we need to override SHLIB_LC from gcc/config/t-slibgcc-elf-ver or
@ -211,7 +223,11 @@ do_cc() {
extra_config="--enable-languages=${lang_opt}"
extra_config="${extra_config} ${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}"
[ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared"
[ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit"
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
extra_config="${extra_config} --enable-__cxa_atexit"
else
extra_config="${extra_config} --disable-__cxa_atexit"
fi
if [ "${CT_TARGET_MULTILIB}" = "y" ]; then
extra_config="${extra_config} --enable-multilib"
else
@ -225,6 +241,7 @@ do_cc() {
# detection problem only matters for gcc-3.2.x and later, I think.
# --disable-nls to work around crash bug on ppc405, but also because
# embedded systems don't really need message catalogs...
CC_FOR_BUILD="${CT_CC_NATIVE}" \
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
TARGET_CFLAGS="${CT_TARGET_CFLAGS}" \
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
@ -239,6 +256,7 @@ do_cc() {
--enable-symvers=gnu \
--enable-c99 \
--enable-long-long \
--enable-target-optspace \
${CT_CC_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
if [ "${CT_CANADIAN}" = "y" ]; then
@ -279,7 +297,8 @@ do_cc() {
# gcc installs stuff in prefix/target/lib, when it would make better sense
# to install that into sysroot/usr/lib
CT_DoLog EXTRA "Moving improperly installed gcc libs to sysroot"
( cd "${CT_PREFIX_DIR}/${CT_TARGET}/lib"; tar cf - . ) | ( cd "${CT_SYSROOT_DIR}/usr/lib"; tar xfv - )
( cd "${CT_PREFIX_DIR}/${CT_TARGET}/lib"; tar cf - . ) | ( cd "${CT_SYSROOT_DIR}/usr/lib"; tar xfv - ) |CT_DoLog ALL
rm -rf "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
CT_EndStep
}

4
scripts/build/libc_uClibc.sh

@ -201,12 +201,12 @@ ENDSED
# way to select between hard/soft float has changed
case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
y,) cat >>"${munge_file}" <<-ENDSED
s/[^_]*(HAS_FPU).*/\\1=y/
s/^[^_]*(HAS_FPU).*/\\1=y/
s/.*(UCLIBC_HAS_FPU).*/\\1=y/
ENDSED
;;
,y) cat >>"${munge_file}" <<-ENDSED
s/[^_]*(HAS_FPU).*/\\# \\1 is not set/
s/^[^_]*(HAS_FPU).*/\\# \\1 is not set/
s/.*(UCLIBC_HAS_FPU).*/# \\1 is not set/
ENDSED
;;

14
scripts/build/mpfr.sh

@ -25,12 +25,26 @@ do_mpfr() {
CT_DoStep INFO "Installing MPFR"
# OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
# same version number. Unfortunately, some tarballs of MPFR are not
# built sanely, and thus ./configure fails on Gentoo.
# See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
# and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
# This hack is not bad per se, but the MPFR guys would be better to not
# do that in the future...
CT_DoLog EXTRA "Re-building configuration files"
CT_Pushd "${CT_SRC_DIR}/${CT_MPFR_FILE}"
autoreconf -fi 2>&1 |CT_DoLog ALL
libtoolize 2>&1 |CT_DoLog ALL
CT_Popd
CT_DoLog EXTRA "Configuring MPFR"
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
"${CT_SRC_DIR}/${CT_MPFR_FILE}/configure" \
--build=${CT_BUILD} \
--host=${CT_HOST} \
--prefix="${CT_PREFIX_DIR}" \
--enable-thread-safe \
--disable-shared --enable-static \
--with-gmp="${CT_PREFIX_DIR}" 2>&1 |CT_DoLog ALL

19
scripts/crosstool.sh

@ -13,6 +13,11 @@
# and builds the tools.
# Parse the common functions
# Note: some initialisation and sanitizing is done while parsing this file,
# most notably:
# - set trap handler on errors,
# - don't hash commands lookups,
# - initialise logging.
. "${CT_LIB_DIR}/scripts/functions"
CT_STAR_DATE=`CT_DoDate +%s%N`
@ -386,7 +391,7 @@ if [ -z "${CT_RESTART}" ]; then
# Do that:
CT_DoLog DEBUG "Making build system tools available"
mkdir -p "${CT_PREFIX_DIR}/bin"
for tool in ar as dlltool gcc g++ gnatbind gnatmake ld nm ranlib strip windres objcopy objdump; do
for tool in ar as dlltool ${CT_CC_NATIVE:=gcc} gnatbind gnatmake ld nm ranlib strip windres objcopy objdump; do
tmp=`CT_Which ${tool}`
if [ -n "${tmp}" ]; then
ln -sfv "${tmp}" "${CT_PREFIX_DIR}/bin/${CT_BUILD}-${tool}"
@ -395,6 +400,12 @@ if [ -z "${CT_RESTART}" ]; then
fi |CT_DoLog DEBUG
done
# Some makeinfo versions are a pain in [put your most sensible body part here].
# Go ahead with those, by creating a wrapper that keeps partial files, and that
# never fails:
echo -e "#!/bin/sh\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue" >"${CT_PREFIX_DIR}/bin/makeinfo"
chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
# Help gcc
CT_CFLAGS_FOR_HOST=
[ "${CT_USE_PIPES}" = "y" ] && CT_CFLAGS_FOR_HOST="${CT_CFLAGS_FOR_HOST} -pipe"
@ -441,8 +452,9 @@ if [ -z "${CT_RESTART}" ]; then
if [ "${CT_ONLY_DOWNLOAD}" != "y" ]; then
if [ "${CT_FORCE_EXTRACT}" = "y" ]; then
mv "${CT_SRC_DIR}" "${CT_SRC_DIR}.$$"
setsid nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1
mv "${CT_SRC_DIR}" "${CT_SRC_DIR}.force.$$"
setsid nohup rm -rf "${CT_SRC_DIR}.force.$$" >/dev/null 2>&1
mkdir -p "${CT_SRC_DIR}"
fi
CT_DoStep INFO "Extracting and patching toolchain components"
do_kernel_extract
@ -494,6 +506,7 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
find "${CT_PREFIX_DIR}/bin" -name "${CT_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
find "${CT_PREFIX_DIR}/bin" -name "${CT_UNIQ_BUILD}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
find "${CT_PREFIX_DIR}/bin" -name "${CT_HOST}-"'*' -exec rm -fv {} \; |CT_DoLog DEBUG
rm -fv "${CT_PREFIX_DIR}/bin/makeinfo" |CT_DoLog DEBUG
# Install the /populator/
CT_DoLog EXTRA "Installing the populate helper"

5
scripts/functions

@ -517,8 +517,8 @@ CT_DoBuildTargetTuple() {
CT_KERNEL_ARCH="${CT_ARCH}"
# Set the default values for ARCH, ABI, CPU, TUNE, FPU and FLOAT
unset CT_ARCH_ARCH_CFLAG CT_ARCH_ABI_CFLAG CT_ARCH_CPU_CFLAG CT_ARCH_TUNE_CFLAG CT_ARCH_FPU_CFLAG
unset CT_ARCH_WITH_ARCH CT_ARCH_WITH_ABI CT_ARCH_WITH_CPU CT_ARCH_WITH_TUNE CT_ARCH_WITH_FPU
unset CT_ARCH_ARCH_CFLAG CT_ARCH_ABI_CFLAG CT_ARCH_CPU_CFLAG CT_ARCH_TUNE_CFLAG CT_ARCH_FPU_CFLAG CT_ARCH_FLOAT_CFLAG
unset CT_ARCH_WITH_ARCH CT_ARCH_WITH_ABI CT_ARCH_WITH_CPU CT_ARCH_WITH_TUNE CT_ARCH_WITH_FPU CT_ARCH_WITH_FLOAT
[ "${CT_ARCH_ARCH}" ] && { CT_ARCH_ARCH_CFLAG="-march=${CT_ARCH_ARCH}"; CT_ARCH_WITH_ARCH="--with-arch=${CT_ARCH_ARCH}"; }
[ "${CT_ARCH_ABI}" ] && { CT_ARCH_ABI_CFLAG="-mabi=${CT_ARCH_ABI}"; CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_ABI}"; }
[ "${CT_ARCH_CPU}" ] && { CT_ARCH_CPU_CFLAG="-mcpu=${CT_ARCH_CPU}"; CT_ARCH_WITH_CPU="--with-cpu=${CT_ARCH_CPU}"; }
@ -542,6 +542,7 @@ CT_DoBuildTargetTuple() {
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_TUNE_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FPU_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FLOAT_CFLAG}"
CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ENDIAN_CFLAG}"
}
# This function does pause the build until the user strikes "Return"

Loading…
Cancel
Save