2007-02-24 11:00:05 +00:00
|
|
|
# This file adds functions to build binutils
|
|
|
|
# Copyright 2007 Yann E. MORIN
|
|
|
|
# Licensed under the GPL v2. See COPYING in the root of this package
|
|
|
|
|
2007-05-07 09:04:02 +00:00
|
|
|
# Download binutils
|
|
|
|
do_binutils_get() {
|
|
|
|
CT_GetFile "${CT_BINUTILS_FILE}" \
|
|
|
|
ftp://ftp.gnu.org/gnu/binutils \
|
|
|
|
ftp://ftp.kernel.org/pub/linux/devel/binutils
|
|
|
|
}
|
|
|
|
|
|
|
|
# Extract binutils
|
|
|
|
do_binutils_extract() {
|
|
|
|
CT_ExtractAndPatch "${CT_BINUTILS_FILE}"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Build binutils
|
2007-02-24 11:00:05 +00:00
|
|
|
do_binutils() {
|
|
|
|
mkdir -p "${CT_BUILD_DIR}/build-binutils"
|
|
|
|
cd "${CT_BUILD_DIR}/build-binutils"
|
|
|
|
|
|
|
|
CT_DoStep INFO "Installing binutils"
|
|
|
|
|
|
|
|
CT_DoLog EXTRA "Configuring binutils"
|
|
|
|
CFLAGS="${CT_CFLAGS_FOR_HOST}" \
|
|
|
|
"${CT_SRC_DIR}/${CT_BINUTILS_FILE}/configure" \
|
|
|
|
${CT_CANADIAN_OPT} \
|
2007-05-22 20:36:05 +00:00
|
|
|
--build=${CT_BUILD} \
|
2007-02-24 11:00:05 +00:00
|
|
|
--host=${CT_HOST} \
|
2007-05-22 20:36:05 +00:00
|
|
|
--target=${CT_TARGET} \
|
2007-02-24 11:00:05 +00:00
|
|
|
--prefix=${CT_PREFIX_DIR} \
|
|
|
|
--disable-nls \
|
|
|
|
${CT_BINUTILS_EXTRA_CONFIG} \
|
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);
Shut uClibc finish step: there really is nothing to do;
Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);
Did not catch the make errors: fixed the pattern matching in scripts/functions;
Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;
Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
2007-05-08 17:48:32 +00:00
|
|
|
${BINUTILS_SYSROOT_ARG} 2>&1 |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building binutils"
|
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);
Shut uClibc finish step: there really is nothing to do;
Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);
Did not catch the make errors: fixed the pattern matching in scripts/functions;
Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;
Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
2007-05-08 17:48:32 +00:00
|
|
|
make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing binutils"
|
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);
Shut uClibc finish step: there really is nothing to do;
Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);
Did not catch the make errors: fixed the pattern matching in scripts/functions;
Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;
Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
2007-05-08 17:48:32 +00:00
|
|
|
make install 2>&1 |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
2007-05-27 20:22:06 +00:00
|
|
|
# Make those new tools available to the core C compilers to come:
|
2007-02-24 11:00:05 +00:00
|
|
|
# Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
|
|
|
|
# well. Create that (libfloat is one such sucker).
|
2007-05-27 20:22:06 +00:00
|
|
|
mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin"
|
|
|
|
mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin"
|
|
|
|
mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin"
|
|
|
|
mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin"
|
2007-02-24 11:00:05 +00:00
|
|
|
for t in ar as ld strip; do
|
2007-05-27 20:22:06 +00:00
|
|
|
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
|
|
|
|
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
|
|
|
|
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
|
|
|
|
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
|
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);
Shut uClibc finish step: there really is nothing to do;
Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);
Did not catch the make errors: fixed the pattern matching in scripts/functions;
Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;
Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
2007-05-08 17:48:32 +00:00
|
|
|
done |CT_DoLog ALL
|
2007-02-24 11:00:05 +00:00
|
|
|
|
|
|
|
CT_EndStep
|
|
|
|
}
|