Compare commits

...

25 Commits
master ... 1.3

Author SHA1 Message Date
Yann E. MORIN" 73c3dcecf4 1.3: close branch 13 years ago
Yann E. MORIN" 01aa8dcea5 Restore the 1.3 maintenance branch. 14 years ago
Yann E. MORIN" a6cfe7938e Bump version to 1.3.3+svn. 14 years ago
Yann E. MORIN" 2a51259d4f Bump version to 1.3.3. 14 years ago
Yann E. MORIN" dd729b831a Backport 1382 from /trunk: 14 years ago
Yann E. MORIN" 1f9323c387 Backport 1380 from trunk: 14 years ago
Yann E. MORIN" d1128beb40 Fix 'extracting' sstrip. Thanks to Michael ABBOTT for spotting this. 14 years ago
Yann E. MORIN" bf2df62e94 Bump version to 1.3.2+svn. 14 years ago
Yann E. MORIN" 1d8ad1a2dc Bump version to 1.3.2. 14 years ago
Yann E. MORIN" 144e915543 Backport 1315 from .trunk: 14 years ago
Yann E. MORIN" 3a3a6b04aa Backport 1305 from /trunk: 14 years ago
Yann E. MORIN" 97bf5edf22 Backport #1303 from /trunk: 14 years ago
Yann E. MORIN" 9c6d8132b1 Backport #1301 from /trunk, in a different manner due to underlying infrastructure changes: 14 years ago
Yann E. MORIN" c7d780e6c5 Backport #1288 from /trunk: 14 years ago
Yann E. MORIN" 2641a44481 Backpot @1279 from /trunk: 14 years ago
Yann E. MORIN" bfe4dbd83e Backpot #1271 from /trunk: 14 years ago
Yann E. MORIN" 89e1613508 Backport (partialy) #1268 from trunk: 14 years ago
Yann E. MORIN" 8fd68d37ce Bump version to 1.3.1+svn. 14 years ago
Yann E. MORIN" ac105bcbb8 Bump version to 1.3.0. 14 years ago
Yann E. MORIN" b464c7c21c Backport #1256 from trunk/: 14 years ago
Yann E. MORIN" a75d7dd759 Backport #1249 from trunk: 14 years ago
Yann E. MORIN" a8fe160e98 Backport #1248 from trunk: 14 years ago
Yann E. MORIN" 0c656b46ba Bump version to 1.3.0+svn. 14 years ago
Yann E. MORIN" d8ab01523e Bump version to 1.3.0. 14 years ago
Yann E. MORIN" 3870e6037d Create the 1.3 maintenance branch. 14 years ago
  1. 2
      .version
  2. 2
      config/libc/glibc-eglibc.in-common
  3. 7
      configure
  4. 2
      patches/gcc/4.3.2/220-noteGNUstack-01.patch
  5. 1
      scripts/build/cc/gcc.sh
  6. 5
      scripts/build/debug/400-ltrace.sh
  7. 6
      scripts/build/tools/200-sstrip.sh
  8. 129
      scripts/crosstool.sh
  9. 7
      scripts/functions

2
.version

@ -1 +1 @@
svn
1.3.3+svn

2
config/libc/glibc-eglibc.in-common

@ -155,6 +155,6 @@ config LIBC_GLIBC_MIN_KERNEL
string
default "" if LIBC_GLIBC_KERNEL_VERSION_NONE
default KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS
default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_USE_HEADERS_MIN_KERNEL
default LIBC_GLIBC_MIN_KERNEL_VERSION if LIBC_GLIBC_KERNEL_VERSION_CHOSEN
endif # KERNEL_linux

7
configure vendored

@ -33,7 +33,7 @@ DATE=$(date +%Y%m%d)
# - 'autoconf2.50' is to be found in the PATH
#
TOOLS_TO_CHECK='
/bin/bash/^GNU bash, version 3\.
/bin/bash/^GNU bash, version [34]\.
make/^GNU Make
gcc/
gawk/^GNU Awk
@ -41,8 +41,9 @@ sed/
bison/
flex/
makeinfo/
automake/
automake/\(GNU automake\) [[:digit:]]+\.[[:digit:]]{2,}|automake/\(GNU automake\) [2-9][[:digit:]]*\.
libtool/
curl/|wget/
patch/
tar/
gzip/
@ -86,7 +87,7 @@ has_or_abort() {
tool_version=$(${tool} --version 2>&1)
str=$(echo "${tool_version}" |grep -E "${regexp}" |head -n 1)
if [ -z "${str}" ]; then
echo "wrong version string: expecting regexp '${regexp}'"
echo "${where}: wrong version string: expecting regexp '${regexp}'"
where=""
continue
fi

2
patches/gcc/4.3.2/220-noteGNUstack-01.patch

@ -40,7 +40,7 @@ diff -durN gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.S gcc-4.3.1/boehm-gc/
+#endif
diff -durN gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.s gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.s
--- gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.s 2001-10-15 06:57:59.000000000 +0200
+++ gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.s 2008-06-10 14:58:21.000000000 +0200
+++ gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.s 1970-01-01 02:00:00.000000000 +0200
@@ -1,12 +0,0 @@
- .text
- .align 16

1
scripts/build/cc/gcc.sh

@ -1,5 +1,4 @@
# This file adds the function to build the gcc C compiler
${extra_config} \
# Copyright 2007 Yann E. MORIN
# Licensed under the GPL v2. See COPYING in the root of this package

5
scripts/build/debug/400-ltrace.sh

@ -14,6 +14,11 @@ do_debug_ltrace_get() {
do_debug_ltrace_extract() {
CT_ExtractAndPatch "ltrace-${CT_LTRACE_VERSION}"
# ltrace uses ppc instead of powerpc for the arch name
# create a symlink to get it to build for powerpc
CT_Pushd "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/sysdeps/linux-gnu"
CT_DoExecLog ALL ln -sf ppc powerpc
CT_Popd
}
do_debug_ltrace_build() {

6
scripts/build/tools/200-sstrip.sh

@ -34,13 +34,13 @@ case "${CT_SSTRIP_FROM}" in
}
do_tools_sstrip_get() {
# Note: the space between sstrip and .c is on purpose.
CT_GetFile sstrip .c \
"http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/buildroot/toolchain/sstrip/"
CT_GetFile sstrip '.c?view=co' \
"http://sources.busybox.net/index.py/trunk/buildroot/toolchain/sstrip/"
}
do_tools_sstrip_extract() {
# We'll let buildroot guys take care of sstrip maintenance and patching.
mkdir -p "${CT_SRC_DIR}/sstrip"
CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/sstrip.c?view=co" "${CT_SRC_DIR}/sstrip/sstrip.c"
}
do_tools_sstrip_build() {
CT_DoStep INFO "Installing sstrip"

129
scripts/crosstool.sh

@ -154,9 +154,7 @@ CT_DoLog EXTRA "Preparing working directories"
# Ah! The build directory shall be eradicated, even if we restart!
if [ -d "${CT_BUILD_DIR}" ]; then
mv "${CT_BUILD_DIR}" "${CT_BUILD_DIR}.$$"
chmod -R u+w "${CT_BUILD_DIR}.$$"
setsid nohup rm -rf "${CT_BUILD_DIR}.$$" >/dev/null 2>&1 &
CT_DoExecLog ALL rm -rf "${CT_BUILD_DIR}"
fi
# Don't eradicate directories if we need to restart
@ -165,50 +163,40 @@ if [ -z "${CT_RESTART}" ]; then
# We need to do that _before_ we can safely log, because the log file will
# most probably be in the toolchain directory.
if [ "${CT_FORCE_DOWNLOAD}" = "y" -a -d "${CT_TARBALLS_DIR}" ]; then
mv "${CT_TARBALLS_DIR}" "${CT_TARBALLS_DIR}.$$"
chmod -R u+w "${CT_TARBALLS_DIR}.$$"
setsid nohup rm -rf "${CT_TARBALLS_DIR}.$$" >/dev/null 2>&1 &
CT_DoExecLog ALL rm -rf "${CT_TARBALLS_DIR}"
fi
if [ "${CT_FORCE_EXTRACT}" = "y" -a -d "${CT_SRC_DIR}" ]; then
mv "${CT_SRC_DIR}" "${CT_SRC_DIR}.$$"
chmod -R u+w "${CT_SRC_DIR}.$$"
setsid nohup rm -rf "${CT_SRC_DIR}.$$" >/dev/null 2>&1 &
CT_DoExecLog ALL rm -rf "${CT_SRC_DIR}"
fi
if [ -d "${CT_INSTALL_DIR}" ]; then
mv "${CT_INSTALL_DIR}" "${CT_INSTALL_DIR}.$$"
chmod -R u+w "${CT_INSTALL_DIR}.$$"
setsid nohup rm -rf "${CT_INSTALL_DIR}.$$" >/dev/null 2>&1 &
CT_DoExecLog ALL rm -rf "${CT_INSTALL_DIR}"
fi
if [ -d "${CT_DEBUG_INSTALL_DIR}" ]; then
mv "${CT_DEBUG_INSTALL_DIR}" "${CT_DEBUG_INSTALL_DIR}.$$"
chmod -R u+w "${CT_DEBUG_INSTALL_DIR}.$$"
setsid nohup rm -rf "${CT_DEBUG_INSTALL_DIR}.$$" >/dev/null 2>&1 &
CT_DoExecLog ALL rm -rf "${CT_DEBUG_INSTALL_DIR}"
fi
# In case we start anew, get rid of the previously saved state directory
if [ -d "${CT_STATE_DIR}" ]; then
mv "${CT_STATE_DIR}" "${CT_STATE_DIR}.$$"
chmod -R u+w "${CT_STATE_DIR}.$$"
setsid nohup rm -rf "${CT_STATE_DIR}.$$" >/dev/null 2>&1 &
CT_DoExecLog ALL rm -rf "${CT_STATE_DIR}"
fi
fi
# Create the directories we'll use, even if restarting: it does no harm to
# create already existent directories, and CT_BUILD_DIR needs to be created
# anyway
mkdir -p "${CT_TARBALLS_DIR}"
mkdir -p "${CT_SRC_DIR}"
mkdir -p "${CT_BUILD_DIR}"
mkdir -p "${CT_INSTALL_DIR}"
mkdir -p "${CT_PREFIX_DIR}"
mkdir -p "${CT_DEBUG_INSTALL_DIR}"
mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
mkdir -p "${CT_STATE_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_TARBALLS_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_SRC_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_BUILD_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_INSTALL_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_DEBUG_INSTALL_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}"
# Kludge: CT_INSTALL_DIR and CT_PREFIX_DIR might have grown read-only if
# the previous build was successful. To be able to move the logfile there,
# switch them back to read/write
chmod -R u+w "${CT_INSTALL_DIR}" "${CT_PREFIX_DIR}"
CT_DoExecLog ALL chmod -R u+w "${CT_INSTALL_DIR}" "${CT_PREFIX_DIR}"
# Redirect log to the actual log file now we can
# It's quite understandable that the log file will be installed in the install
@ -263,26 +251,25 @@ if [ -z "${CT_RESTART}" ]; then
# Prepare the 'lib' directories in sysroot, else the ../lib64 hack used by
# 32 -> 64 bit crosscompilers won't work, and build of final gcc will fail with
# "ld: cannot open crti.o: No such file or directory"
mkdir -p "${CT_SYSROOT_DIR}/lib"
mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}/lib"
CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}/usr/lib"
# Prevent gcc from installing its libraries outside of the sys-root
ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
CT_DoExecLog ALL ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
# Now, in case we're 64 bits, just have lib64/ be a symlink to lib/
# so as to have all libraries in the same directory (we can do that
# because we are *not* multilib).
if [ "${CT_ARCH_64}" = "y" ]; then
ln -sf "lib" "${CT_SYSROOT_DIR}/lib64"
ln -sf "lib" "${CT_SYSROOT_DIR}/usr/lib64"
ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib64"
CT_DoExecLog ALL ln -sf "lib" "${CT_SYSROOT_DIR}/lib64"
CT_DoExecLog ALL ln -sf "lib" "${CT_SYSROOT_DIR}/usr/lib64"
CT_DoExecLog ALL ln -sf "sys-root/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib64"
fi
# Determine build system if not set by the user
CT_Test "You did not specify the build system. That's OK, I can guess..." -z "${CT_BUILD}"
case "${CT_BUILD}" in
"") CT_BUILD=$(gcc -dumpmachine);;
*) CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}");;
"") CT_BUILD=$("${CT_BUILD_PREFIX}gcc${CT_BUILD_SUFFIX}" -dumpmachine);;
esac
# Prepare mangling patterns to later modifyu BUILD and HOST (see below)
@ -300,26 +287,12 @@ if [ -z "${CT_RESTART}" ]; then
CT_REAL_BUILD="${CT_BUILD}"
CT_REAL_HOST="${CT_HOST}"
# Make BUILD and HOST full-fledge four-part tuples (gcc -dumpmachine
# might be only three-part tuple, and I don't know wether config.guess
# can return 3-part tuples...)
# Although Cygwin is not (yet) a supported build- or host-system, take
# its /peculiarity/ into acount right now, this will alleviate the
# burden of fighting bugs later, if Cygwin ever becomes supported.
case "${CT_BUILD}" in
*-*-*-*-*) CT_Abort "Unexpected 5-part (or more) build tuple: '${CT_BUILD}'";;
*-*-*-*) ;;
*-*-cygwin) ;; # Don't mangle cygwin build tuples
*-*-*) CT_BUILD="${CT_BUILD/-/-unknown-}";;
*) CT_Abort "Unepxected 1- or 2-part build tuple: '${CT_BUILD}'";;
esac
case "${CT_HOST}" in
*-*-*-*-*) CT_Abort "Unexpected 5-part (or more) host tuple: '${CT_HOST}'";;
*-*-*-*) ;;
*-*-cygwin) ;; # Don't mangle cygwin host tuples
*-*-*) CT_HOST="${CT_HOST/-/-unknown-}";;
*) CT_Abort "Unepxected 1- or 2-part host tuple: '${CT_HOST}'";;
esac
# Canonicalise CT_BUILD and CT_HOST
# Not only will it give us full-qualified tuples, but it will also ensure
# that they are valid tuples (in case of typo with user-provided tuples)
# That's way better than trying to rewrite config.sub ourselves...
CT_BUILD=$(CT_DoConfigSub "${CT_BUILD}")
CT_HOST=$(CT_DoConfigSub "${CT_HOST}")
# Modify BUILD and HOST so that gcc always generate a cross-compiler
# even if any of the build, host or target machines are the same.
@ -332,7 +305,7 @@ if [ -z "${CT_RESTART}" ]; then
# cross-tools for those mangled tuples.
BANG='!'
CT_DoLog DEBUG "Making build system tools available"
mkdir -p "${CT_PREFIX_DIR}/bin"
CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin"
for m in BUILD HOST; do
r="CT_REAL_${m}"
v="CT_${m}"
@ -370,7 +343,7 @@ if [ -z "${CT_RESTART}" ]; then
if [ -n "${where}" ]; then
CT_DoLog DEBUG " '${!v}-${tool}' -> '${where}'"
printf "#${BANG}${CT_SHELL}\nexec '${where}' \"\${@}\"\n" >"${CT_PREFIX_DIR}/bin/${!v}-${tool}"
chmod 700 "${CT_PREFIX_DIR}/bin/${!v}-${tool}"
CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/${!v}-${tool}"
else
# We'll at least need some of them...
case "${tool}" in
@ -401,8 +374,9 @@ if [ -z "${CT_RESTART}" ]; then
# 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:
CT_DoLog DEBUG " 'makeinfo' -> '$(CT_Which makeinfo)'"
echo -e "#!/bin/sh\n$(CT_Which makeinfo) --force \"\${@}\"\ntrue" >"${CT_PREFIX_DIR}/bin/makeinfo"
chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
CT_DoExecLog ALL chmod 700 "${CT_PREFIX_DIR}/bin/makeinfo"
# Help gcc
CT_CFLAGS_FOR_HOST=
@ -449,8 +423,8 @@ if [ -z "${CT_RESTART}" ]; then
if [ "${CT_ONLY_DOWNLOAD}" != "y" ]; then
if [ "${CT_FORCE_EXTRACT}" = "y" ]; then
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}"
CT_DoExecLog ALL rm -rf "${CT_SRC_DIR}.force.$$"
CT_DoExecLog ALL mkdir -p "${CT_SRC_DIR}"
fi
CT_DoStep INFO "Extracting and patching toolchain components"
do_kernel_extract
@ -503,14 +477,14 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
CT_DoLog DEBUG "Removing access to the build system tools"
find "${CT_PREFIX_DIR}/bin" -name "${CT_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
CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/makeinfo"
if [ "${CT_BARE_METAL}" != "y" ]; then
CT_DoLog EXTRA "Installing the populate helper"
sed -r -e 's|@@CT_TARGET@@|'"${CT_TARGET}"'|g;' \
"${CT_LIB_DIR}/tools/populate.in" \
>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
CT_DoExecLog ALL chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
fi
# Create the aliases to the target tools
@ -519,36 +493,33 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
for t in "${CT_TARGET}-"*; do
if [ -n "${CT_TARGET_ALIAS}" ]; then
_t=$(echo "$t" |sed -r -e 's/^'"${CT_TARGET}"'-/'"${CT_TARGET_ALIAS}"'-/;')
ln -sv "${t}" "${_t}" 2>&1
CT_DoExecLog ALL ln -sv "${t}" "${_t}"
fi
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
_t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
ln -sv "${t}" "${_t}" 2>&1
CT_DoExecLog ALL ln -sv "${t}" "${_t}"
fi
done |CT_DoLog ALL
done
CT_Popd
# Remove the generated documentation files
if [ "${CT_REMOVE_DOCS}" = "y" ]; then
CT_DoLog INFO "Removing installed documentation"
rm -rf "${CT_PREFIX_DIR}/"{,usr/}{man,info}
rm -rf "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
rm -rf "${CT_DEBUG_INSTALL_DIR}/"{,usr/}{man,info}
CT_DoExecLog ALL rm -rf "${CT_PREFIX_DIR}/"{,usr/}{man,info}
CT_DoExecLog ALL rm -rf "${CT_SYSROOT_DIR}/"{,usr/}{man,info}
CT_DoExecLog ALL rm -rf "${CT_DEBUG_INSTALL_DIR}/"{,usr/}{man,info}
fi
fi
CT_DoEnd INFO
if [ "${CT_LOG_FILE_COMPRESS}" = y ]; then
CT_DoLog EXTRA "Compressing log file"
exec >/dev/null
bzip2 -9 "${CT_LOG_FILE}"
fi
# From now-on, it can become impossible to log any time, because
# either we're compressing the log file, or it can become RO any
# moment... Consign all ouptut to oblivion...
CT_DoLog INFO "Finishing installation (may take a few seconds)..."
exec >/dev/null 2>&1
if [ "${CT_INSTALL_DIR_RO}" = "y" ]; then
# OK, now we're done, set the toolchain read-only
# Don't log, the log file may become read-only any moment...
chmod -R a-w "${CT_INSTALL_DIR}" >/dev/null 2>&1
fi
[ "${CT_LOG_FILE_COMPRESS}" = y ] && bzip2 -9 "${CT_LOG_FILE}"
[ "${CT_INSTALL_DIR_RO}" = "y" ] && chmod -R a-w "${CT_INSTALL_DIR}"
trap - EXIT

7
scripts/functions

@ -52,6 +52,9 @@ CT_LOG_LEVEL_EXTRA=3
CT_LOG_LEVEL_DEBUG=4
CT_LOG_LEVEL_ALL=5
# Make it easy to use \n
CR=$(printf "\n")
# A function to log what is happening
# Different log level are available:
# - ERROR: A serious, fatal error occurred
@ -76,7 +79,7 @@ CT_DoLog() {
cat -
else
echo "${@}"
fi |( IFS="\n" # We want the full lines, even leading spaces
fi |( IFS="${CR}" # We want the full lines, even leading spaces
_prog_bar_cpt=0
_prog_bar[0]='/'
_prog_bar[1]='-'
@ -423,7 +426,7 @@ _curl=$(CT_Which curl)
# Usage: CT_DoGetFile <URL>
CT_DoGetFile() {
case "${_wget},${_curl}" in
,) CT_DoError "Could find neither wget nor curl";;
,) CT_Abort "Could find neither wget nor curl";;
,*) CT_DoExecLog ALL CT_DoGetFileCurl "$1" 2>&1;;
*) CT_DoExecLog ALL CT_DoGetFileWget "$1" 2>&1;;
esac

Loading…
Cancel
Save