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.
This commit is contained in:
Yann E. MORIN" 2007-05-08 17:48:32 +00:00
parent 5856bb8c5e
commit 8a2b17ab5e
13 changed files with 207 additions and 1465 deletions

View File

@ -242,8 +242,13 @@ config LOG_DEBUG
bool
prompt "DEBUG"
help
The same as above, plus lots of debug information, of which each
component's build messages (very noisy!).
The same as above, plus lots of crosstool-NG debug information.
config LOG_ALL
bool
prompt "ALL"
help
The same as above, plus all components build messages (very noisy!).
endchoice
@ -254,6 +259,7 @@ config LOG_LEVEL_MAX
default "INFO" if LOG_INFO
default "EXTRA" if LOG_EXTRA
default "DEBUG" if LOG_DEBUG
default "ALL" if LOG_ALL
config LOG_SEE_TOOLS_WARN
bool
@ -271,7 +277,7 @@ config LOG_PROGRESS_BAR
bool
prompt "Progress bar"
default n
depends on ! LOG_DEBUG
depends on ! LOG_ALL
help
This option will print a "rotating bar" (/-\|) below the last log line
to show work is not stalled.

View File

@ -0,0 +1,45 @@
This one was taken from debian.
# DP: Description: Fix __bind redefinition problem
# DP: Related bugs:
# DP: Dpatch author: Phil Blundell
# DP: Patch author: Daniel Jacobowitz
# DP: Upstream status: In CVS
# DP: Status Details:
# DP: Date: 2005-12-25
Index: sysdeps/unix/sysv/linux/arm/socket.S
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12
+++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13
@@ -1,4 +1,6 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +34,11 @@
The .S files for the other calls just #define socket and #include this. */
#ifndef __socket
+#ifndef NO_WEAK_ALIAS
#define __socket P(__,socket)
+#else
+#define __socket socket
+#endif
#endif
#define PUSHARGS_1 str a1, [sp, $-4]!
@@ -120,4 +126,6 @@
PSEUDO_END (__socket)
+#ifndef NO_WEAK_ALIAS
weak_alias (__socket, socket)
+#endif

View File

@ -1,12 +1,14 @@
#
# Automatically generated make config: don't edit
# crosstool-NG version: 0.0.1
# Sun Feb 25 12:06:43 2007
# crosstool-NG version: 0.0.2-svn
# Tue May 8 18:48:51 2007
#
#
# Paths and misc options
#
# CT_EXPERIMENTAL is not set
# CT_OBSOLETE is not set
CT_PARALLEL_JOBS=1
CT_LOAD=0
CT_NICE=0
@ -16,21 +18,24 @@ CT_USE_PIPES=y
# Paths
#
CT_TARBALLS_DIR="${HOME}/dev/src"
CT_SRC_DIR="${HOME}/x-tools/src/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
CT_BUILD_DIR="${HOME}/x-tools/build/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}"
CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
CT_SRC_DIR="${CT_TOP_DIR}/build/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}/src"
CT_BUILD_DIR="${CT_TOP_DIR}/build/${CT_TARGET}/${CT_CC}-${CT_CC_VERSION}-${CT_LIBC}-${CT_LIBC_VERSION}/build"
CT_PREFIX_DIR="/opt/x-tools/${CT_TARGET}"
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
# CT_CUSTOM_PATCH is not set
# CT_CUSTOM_PATCH_ONLY is not set
CT_CUSTOM_PATCH_DIR=""
CT_REMOVE_DOCS=y
#
# Downloading and extracting
# Downloading
#
# CT_NO_DOWNLOAD is not set
# CT_ONLY_DOWNLOAD is not set
# CT_FORCE_DOWNLOAD is not set
# CT_ONLY_DOWNLOAD is not set
#
# Extracting
#
# CT_FORCE_EXTRACT is not set
# CT_ONLY_EXTRACT is not set
#
# Logging
@ -40,7 +45,9 @@ CT_CUSTOM_PATCH_DIR=""
# CT_LOG_INFO is not set
CT_LOG_EXTRA=y
# CT_LOG_DEBUG is not set
# CT_LOG_ALL is not set
CT_LOG_LEVEL_MAX="EXTRA"
# CT_LOG_SEE_TOOLS_WARN is not set
# CT_LOG_PROGRESS_BAR is not set
# CT_LOG_USE_COLORS is not set
CT_LOG_TO_FILE=y
@ -53,19 +60,23 @@ CT_LOG_FILE="${CT_PREFIX_DIR}/${CT_TARGET}.log"
#
# General target options
#
CT_ARCH="arm"
CT_ARCH_ARM=y
# CT_ARCH_MIPS is not set
# CT_ARCH_x86 is not set
# CT_ARCH_x86_64 is not set
CT_ARCH_SUPPORTS_BE=y
CT_ARCH_SUPPORTS_LE=y
CT_ARCH_BE=y
# CT_ARCH_LE is not set
#
# Target optimisations
#
CT_ARCH_ARCH="armv5te"
CT_ARCH_ABI=""
CT_ARCH_CPU="xscale"
CT_ARCH_TUNE="xscale"
CT_ARCH_ARCH="armv5te"
CT_ARCH_FPU=""
# CT_ARCH_FLOAT_HW is not set
CT_ARCH_FLOAT_SW=y
@ -75,27 +86,36 @@ CT_TARGET_CFLAGS=""
#
# Toolchain options
#
#
# General toolchain options
#
CT_USE_SYSROOT=y
CT_SHARED_LIBS=y
# CT_TARGET_MULTILIB is not set
CT_TARGET_VENDOR="unknown"
CT_TARGET_ALIAS=""
CT_ARCH="arm"
#
# Toolchain type
#
# CT_NATIVE is not set
CT_CROSS=y
# CT_CROSS_NATIVE is not set
# CT_CANADIAN is not set
CT_BUILD=""
CT_CC_NATIVE="gcc"
# CT_CANADIAN is not set
CT_HOST=""
CT_HOST_CC=""
#
# Kernel
#
CT_KERNEL_LINUX=y
# CT_KERNEL_CYGWIN is not set
CT_KERNEL_VERSION="2.6.19.1"
CT_KERNEL_VERSION="2.6.21.1"
CT_KERNEL_LINUX_HEADERS_INSTALL=y
# CT_KERNEL_LINUX_HEADERS_SANITISED is not set
# CT_KERNEL_LINUX_HEADERS_COPY is not set
# CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR is not set
CT_KERNEL="linux"
CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
# CT_KERNEL_INSTALL_V_2_6_18 is not set
@ -106,144 +126,28 @@ CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
# CT_KERNEL_INSTALL_V_2_6_18_5 is not set
# CT_KERNEL_INSTALL_V_2_6_18_6 is not set
# CT_KERNEL_INSTALL_V_2_6_19 is not set
CT_KERNEL_INSTALL_V_2_6_19_1=y
# CT_KERNEL_INSTALL_V_2_6_19_1 is not set
# CT_KERNEL_INSTALL_V_2_6_19_2 is not set
# CT_KERNEL_INSTALL_V_2_6_20 is not set
# CT_KERNEL_COPY_V_2_6_0 is not set
# CT_KERNEL_COPY_V_2_6_1 is not set
# CT_KERNEL_COPY_V_2_6_2 is not set
# CT_KERNEL_COPY_V_2_6_3 is not set
# CT_KERNEL_COPY_V_2_6_4 is not set
# CT_KERNEL_COPY_V_2_6_5 is not set
# CT_KERNEL_COPY_V_2_6_6 is not set
# CT_KERNEL_COPY_V_2_6_7 is not set
# CT_KERNEL_COPY_V_2_6_8 is not set
# CT_KERNEL_COPY_V_2_6_8_1 is not set
# CT_KERNEL_COPY_V_2_6_9 is not set
# CT_KERNEL_COPY_V_2_6_10 is not set
# CT_KERNEL_COPY_V_2_6_11 is not set
# CT_KERNEL_COPY_V_2_6_11_1 is not set
# CT_KERNEL_COPY_V_2_6_11_10 is not set
# CT_KERNEL_COPY_V_2_6_11_11 is not set
# CT_KERNEL_COPY_V_2_6_11_12 is not set
# CT_KERNEL_COPY_V_2_6_11_2 is not set
# CT_KERNEL_COPY_V_2_6_11_3 is not set
# CT_KERNEL_COPY_V_2_6_11_4 is not set
# CT_KERNEL_COPY_V_2_6_11_5 is not set
# CT_KERNEL_COPY_V_2_6_11_6 is not set
# CT_KERNEL_COPY_V_2_6_11_7 is not set
# CT_KERNEL_COPY_V_2_6_11_8 is not set
# CT_KERNEL_COPY_V_2_6_11_9 is not set
# CT_KERNEL_COPY_V_2_6_12 is not set
# CT_KERNEL_COPY_V_2_6_12_1 is not set
# CT_KERNEL_COPY_V_2_6_12_2 is not set
# CT_KERNEL_COPY_V_2_6_12_3 is not set
# CT_KERNEL_COPY_V_2_6_12_4 is not set
# CT_KERNEL_COPY_V_2_6_12_5 is not set
# CT_KERNEL_COPY_V_2_6_12_6 is not set
# CT_KERNEL_COPY_V_2_6_13 is not set
# CT_KERNEL_COPY_V_2_6_13_1 is not set
# CT_KERNEL_COPY_V_2_6_13_2 is not set
# CT_KERNEL_COPY_V_2_6_13_3 is not set
# CT_KERNEL_COPY_V_2_6_13_4 is not set
# CT_KERNEL_COPY_V_2_6_13_5 is not set
# CT_KERNEL_COPY_V_2_6_14 is not set
# CT_KERNEL_COPY_V_2_6_14_1 is not set
# CT_KERNEL_COPY_V_2_6_14_2 is not set
# CT_KERNEL_COPY_V_2_6_14_3 is not set
# CT_KERNEL_COPY_V_2_6_14_4 is not set
# CT_KERNEL_COPY_V_2_6_14_5 is not set
# CT_KERNEL_COPY_V_2_6_14_6 is not set
# CT_KERNEL_COPY_V_2_6_14_7 is not set
# CT_KERNEL_COPY_V_2_6_15 is not set
# CT_KERNEL_COPY_V_2_6_15_1 is not set
# CT_KERNEL_COPY_V_2_6_15_2 is not set
# CT_KERNEL_COPY_V_2_6_15_3 is not set
# CT_KERNEL_COPY_V_2_6_15_4 is not set
# CT_KERNEL_COPY_V_2_6_15_5 is not set
# CT_KERNEL_COPY_V_2_6_15_6 is not set
# CT_KERNEL_COPY_V_2_6_15_7 is not set
# CT_KERNEL_COPY_V_2_6_16 is not set
# CT_KERNEL_COPY_V_2_6_16_1 is not set
# CT_KERNEL_COPY_V_2_6_16_10 is not set
# CT_KERNEL_COPY_V_2_6_16_11 is not set
# CT_KERNEL_COPY_V_2_6_16_12 is not set
# CT_KERNEL_COPY_V_2_6_16_13 is not set
# CT_KERNEL_COPY_V_2_6_16_14 is not set
# CT_KERNEL_COPY_V_2_6_16_15 is not set
# CT_KERNEL_COPY_V_2_6_16_16 is not set
# CT_KERNEL_COPY_V_2_6_16_17 is not set
# CT_KERNEL_COPY_V_2_6_16_18 is not set
# CT_KERNEL_COPY_V_2_6_16_19 is not set
# CT_KERNEL_COPY_V_2_6_16_2 is not set
# CT_KERNEL_COPY_V_2_6_16_20 is not set
# CT_KERNEL_COPY_V_2_6_16_21 is not set
# CT_KERNEL_COPY_V_2_6_16_22 is not set
# CT_KERNEL_COPY_V_2_6_16_23 is not set
# CT_KERNEL_COPY_V_2_6_16_24 is not set
# CT_KERNEL_COPY_V_2_6_16_25 is not set
# CT_KERNEL_COPY_V_2_6_16_26 is not set
# CT_KERNEL_COPY_V_2_6_16_27 is not set
# CT_KERNEL_COPY_V_2_6_16_28 is not set
# CT_KERNEL_COPY_V_2_6_16_29 is not set
# CT_KERNEL_COPY_V_2_6_16_3 is not set
# CT_KERNEL_COPY_V_2_6_16_30 is not set
# CT_KERNEL_COPY_V_2_6_16_31 is not set
# CT_KERNEL_COPY_V_2_6_16_32 is not set
# CT_KERNEL_COPY_V_2_6_16_33 is not set
# CT_KERNEL_COPY_V_2_6_16_34 is not set
# CT_KERNEL_COPY_V_2_6_16_35 is not set
# CT_KERNEL_COPY_V_2_6_16_36 is not set
# CT_KERNEL_COPY_V_2_6_16_4 is not set
# CT_KERNEL_COPY_V_2_6_16_5 is not set
# CT_KERNEL_COPY_V_2_6_16_6 is not set
# CT_KERNEL_COPY_V_2_6_16_7 is not set
# CT_KERNEL_COPY_V_2_6_16_8 is not set
# CT_KERNEL_COPY_V_2_6_16_9 is not set
# CT_KERNEL_COPY_V_2_6_17 is not set
# CT_KERNEL_COPY_V_2_6_17_1 is not set
# CT_KERNEL_COPY_V_2_6_17_10 is not set
# CT_KERNEL_COPY_V_2_6_17_11 is not set
# CT_KERNEL_COPY_V_2_6_17_12 is not set
# CT_KERNEL_COPY_V_2_6_17_13 is not set
# CT_KERNEL_COPY_V_2_6_17_14 is not set
# CT_KERNEL_COPY_V_2_6_17_2 is not set
# CT_KERNEL_COPY_V_2_6_17_3 is not set
# CT_KERNEL_COPY_V_2_6_17_4 is not set
# CT_KERNEL_COPY_V_2_6_17_5 is not set
# CT_KERNEL_COPY_V_2_6_17_6 is not set
# CT_KERNEL_COPY_V_2_6_17_7 is not set
# CT_KERNEL_COPY_V_2_6_17_8 is not set
# CT_KERNEL_COPY_V_2_6_17_9 is not set
# CT_KERNEL_COPY_V_2_6_18 is not set
# CT_KERNEL_COPY_V_2_6_18_1 is not set
# CT_KERNEL_COPY_V_2_6_18_2 is not set
# CT_KERNEL_COPY_V_2_6_18_3 is not set
# CT_KERNEL_COPY_V_2_6_18_4 is not set
# CT_KERNEL_COPY_V_2_6_18_5 is not set
# CT_KERNEL_COPY_V_2_6_18_6 is not set
# CT_KERNEL_COPY_V_2_6_19 is not set
# CT_KERNEL_COPY_V_2_6_19_1 is not set
# CT_KERNEL_SANITISED_V_2_6_7_0 is not set
# CT_KERNEL_SANITISED_V_2_6_8_0 is not set
# CT_KERNEL_SANITISED_V_2_6_8_1 is not set
# CT_KERNEL_SANITISED_V_2_6_9_0 is not set
# CT_KERNEL_SANITISED_V_2_6_9_1 is not set
# CT_KERNEL_SANITISED_V_2_6_10_0 is not set
# CT_KERNEL_SANITISED_V_2_6_11_0 is not set
# CT_KERNEL_SANITISED_V_2_6_11_1 is not set
# CT_KERNEL_SANITISED_V_2_6_11_2 is not set
# CT_KERNEL_SANITISED_V_2_6_12_0 is not set
# CT_KERNEL_INSTALL_V_2_6_20_1 is not set
# CT_KERNEL_INSTALL_V_2_6_20_2 is not set
# CT_KERNEL_INSTALL_V_2_6_20_3 is not set
# CT_KERNEL_INSTALL_V_2_6_20_4 is not set
# CT_KERNEL_INSTALL_V_2_6_20_5 is not set
# CT_KERNEL_INSTALL_V_2_6_20_6 is not set
# CT_KERNEL_INSTALL_V_2_6_20_7 is not set
# CT_KERNEL_INSTALL_V_2_6_21 is not set
CT_KERNEL_INSTALL_V_2_6_21_1=y
CT_KERNEL_LINUX_VERBOSITY_0=y
# CT_KERNEL_LINUX_VERBOSITY_1 is not set
# CT_KERNEL_LINUX_VERBOSITY_2 is not set
CT_KERNEL_LINUX_VERBOSE_LEVEL=0
CT_KERNEL_LINUX_CONFIG_FILE="${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"
# CT_KERNEL_LINUX_NEEDS_CONFIG is not set
#
# binutils
#
CT_BINUTILS_VERSION="2.17.50.0.10"
CT_BINUTILS_VERSION="2.17.50.0.14"
# CT_BINUTILS_V_2_11_2 is not set
# CT_BINUTILS_V_2_13_90 is not set
# CT_BINUTILS_V_2_14 is not set
@ -264,7 +168,11 @@ CT_BINUTILS_VERSION="2.17.50.0.10"
# CT_BINUTILS_V_2_17_50_0_7 is not set
# CT_BINUTILS_V_2_17_50_0_8 is not set
# CT_BINUTILS_V_2_17_50_0_9 is not set
CT_BINUTILS_V_2_17_50_0_10=y
# CT_BINUTILS_V_2_17_50_0_10 is not set
# CT_BINUTILS_V_2_17_50_0_11 is not set
# CT_BINUTILS_V_2_17_50_0_12 is not set
# CT_BINUTILS_V_2_17_50_0_13 is not set
CT_BINUTILS_V_2_17_50_0_14=y
CT_BINUTILS_EXTRA_CONFIG=""
#
@ -277,32 +185,7 @@ CT_BINUTILS_EXTRA_CONFIG=""
# CT_CC_USE_CORE is not set
CT_CC_CORE_GCC=y
# CT_CC_CORE_TCC is not set
CT_CC_CORE_VERSION=""
CT_CC_CORE="gcc"
# CT_CC_CORE_V_2_95_3 is not set
# CT_CC_CORE_V_3_2_3 is not set
# CT_CC_CORE_V_3_3 is not set
# CT_CC_CORE_V_3_3_1 is not set
# CT_CC_CORE_V_3_3_2 is not set
# CT_CC_CORE_V_3_3_3 is not set
# CT_CC_CORE_V_3_3_4 is not set
# CT_CC_CORE_V_3_3_5 is not set
# CT_CC_CORE_V_3_3_6 is not set
# CT_CC_CORE_V_3_4_0 is not set
# CT_CC_CORE_V_3_4_1 is not set
# CT_CC_CORE_V_3_4_2 is not set
# CT_CC_CORE_V_3_4_3 is not set
# CT_CC_CORE_V_3_4_4 is not set
# CT_CC_CORE_V_3_4_5 is not set
# CT_CC_CORE_V_3_4_6 is not set
# CT_CC_CORE_V_4_0_0 is not set
# CT_CC_CORE_V_4_0_1 is not set
# CT_CC_CORE_V_4_0_2 is not set
# CT_CC_CORE_V_4_0_3 is not set
# CT_CC_CORE_V_4_0_4 is not set
# CT_CC_CORE_V_4_1_0 is not set
# CT_CC_CORE_V_4_1_1 is not set
CT_CC_CORE_EXTRA_CONFIG=""
#
# Final C compiler
@ -325,6 +208,7 @@ CT_CC="gcc"
# CT_CC_V_3_4_3 is not set
# CT_CC_V_3_4_4 is not set
# CT_CC_V_3_4_5 is not set
# CT_CC_V_3_4_6 is not set
# CT_CC_V_4_0_0 is not set
# CT_CC_V_4_0_1 is not set
# CT_CC_V_4_0_2 is not set
@ -332,6 +216,8 @@ CT_CC="gcc"
CT_CC_V_4_0_4=y
# CT_CC_V_4_1_0 is not set
# CT_CC_V_4_1_1 is not set
# CT_CC_V_4_1_2 is not set
CT_CC_CXA_ATEXIT=y
CT_CC_EXTRA_CONFIG=""
CT_CC_SUPPORT_CXX=y
CT_CC_SUPPORT_FORTRAN=y
@ -343,7 +229,7 @@ CT_CC_SUPPORT_OBJCXX=y
#
# Additionnal supported languages:
#
# CT_CC_LANG_CXX is not set
CT_CC_LANG_CXX=y
# CT_CC_LANG_FORTRAN is not set
# CT_CC_LANG_JAVA is not set
# CT_CC_LANG_ADA is not set
@ -356,7 +242,7 @@ CT_CC_LANG_OTHERS=""
#
CT_LIBC_GLIBC=y
# CT_LIBC_UCLIBC is not set
CT_LIBC_VERSION="2.4"
CT_LIBC_VERSION="2.3.6"
CT_LIBC="glibc"
# CT_LIBC_V_1_09_1 is not set
# CT_LIBC_V_2_0_1 is not set
@ -376,8 +262,8 @@ CT_LIBC="glibc"
# CT_LIBC_V_2_3_3 is not set
# CT_LIBC_V_2_3_4 is not set
# CT_LIBC_V_2_3_5 is not set
# CT_LIBC_V_2_3_6 is not set
CT_LIBC_V_2_4=y
CT_LIBC_V_2_3_6=y
# CT_LIBC_V_2_4 is not set
# CT_LIBC_V_2_5 is not set
# CT_LIBC_GLIBC_THREADS_NPTL is not set
CT_LIBC_GLIBC_THREADS_LINUXTHREADS=y
@ -386,19 +272,6 @@ CT_LIBC_GLIBC_EXTRA_CONFIG=""
CT_LIBC_GLIBC_EXTRA_CFLAGS=""
CT_LIBC_EXTRA_CC_ARGS=""
CT_LIBC_GLIBC_CONFIGPARMS=""
CT_LIBC_GLIBC_USE_PORTS=y
# CT_LIBC_ADDONS is not set
CT_LIBC_ADDONS_LIST=""
# CT_LIBC_V_snapshot is not set
# CT_LIBC_V_specific_date is not set
# CT_LIBC_V_0_9_26 is not set
# CT_LIBC_V_0_9_27 is not set
# CT_LIBC_V_0_9_28 is not set
# CT_LIBC_V_0_9_28_1 is not set
# CT_LIBC_V_0_9_28_2 is not set
# CT_LIBC_UCLIBC_DEBUG_LEVEL_0 is not set
# CT_LIBC_UCLIBC_DEBUG_LEVEL_1 is not set
# CT_LIBC_UCLIBC_DEBUG_LEVEL_2 is not set
CT_LIBC_UCLIBC_DEBUG_LEVEL=0
CT_LIBC_UCLIBC_CONFIG_FILE=""
# CT_LIBC_UCLIBC_LOCALES is not set
# CT_LIBC_GLIBC_USE_PORTS is not set
CT_LIBC_ADDONS=y
CT_LIBC_ADDONS_LIST="linuxthreads"

File diff suppressed because it is too large Load Diff

View File

@ -30,13 +30,13 @@ do_binutils() {
--prefix=${CT_PREFIX_DIR} \
--disable-nls \
${CT_BINUTILS_EXTRA_CONFIG} \
${BINUTILS_SYSROOT_ARG} 2>&1 |CT_DoLog DEBUG
${BINUTILS_SYSROOT_ARG} 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Building binutils"
make ${PARALLELMFLAGS} 2>&1 |CT_DoLog DEBUG
make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing binutils"
make install 2>&1 |CT_DoLog DEBUG
make install 2>&1 |CT_DoLog ALL
# Make those new tools available to the core C compiler to come:
# Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
@ -46,7 +46,7 @@ do_binutils() {
for t in ar as ld strip; do
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
done |CT_DoLog DEBUG
done |CT_DoLog ALL
CT_EndStep
}

View File

@ -62,18 +62,18 @@ do_cc_core() {
--enable-symvers=gnu \
--enable-languages=c \
--disable-shared \
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog DEBUG
${CT_CC_CORE_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
if [ ! "${CT_CANADIAN}" = "y" ]; then
CT_DoLog EXTRA "Building libiberty"
make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog DEBUG
make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog ALL
fi
CT_DoLog EXTRA "Building core C compiler"
make ${PARALLELMFLAGS} all-gcc 2>&1 |CT_DoLog DEBUG
make ${PARALLELMFLAGS} all-gcc 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing core C compiler"
make install-gcc 2>&1 |CT_DoLog DEBUG
make install-gcc 2>&1 |CT_DoLog ALL
CT_EndStep
}

View File

@ -80,11 +80,11 @@ do_cc() {
--enable-symvers=gnu \
--enable-c99 \
--enable-long-long \
${CT_CC_EXTRA_CONFIG} 2>&1 |CT_DoLog DEBUG
${CT_CC_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
if [ ! "${CT_CANADIAN}" = "y" ]; then
CT_DoLog EXTRA "Building libiberty"
make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog DEBUG
make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog ALL
fi
@ -109,10 +109,10 @@ do_cc() {
esac
CT_DoLog EXTRA "Building final compiler"
make ${PARALLELMFLAGS} all 2>&1 |CT_DoLog DEBUG
make ${PARALLELMFLAGS} all 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing final compiler"
make install 2>&1 |CT_DoLog DEBUG
make install 2>&1 |CT_DoLog ALL
# FIXME: shouldn't people who want this just --disable-multilib in final gcc
# and be done with it?

View File

@ -40,7 +40,7 @@ do_kernel_check_config() {
mkdir -p "${CT_BUILD_DIR}/build-kernel-defconfig"
cd "${CT_BUILD_DIR}/build-kernel-defconfig"
make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" O=`pwd` \
ARCH=${CT_KERNEL_ARCH} defconfig 2>&1 |CT_DoLog DEBUG
ARCH=${CT_KERNEL_ARCH} defconfig 2>&1 |CT_DoLog ALL
CT_KERNEL_LINUX_CONFIG_FILE="`pwd`/.config"
@ -92,7 +92,7 @@ do_kernel_headers() {
# Install kernel headers using headers_install from kernel sources.
do_kernel_install() {
CT_DoLog EXTRA "Using kernel's headers_install"
CT_DoLog DEBUG "Using kernel's headers_install"
mkdir -p "${CT_BUILD_DIR}/build-kernel-headers"
cd "${CT_BUILD_DIR}/build-kernel-headers"
@ -108,7 +108,7 @@ do_kernel_install() {
ARCH=${CT_KERNEL_ARCH} \
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
${V_OPT} \
headers_install 2>&1 |CT_DoLog DEBUG
headers_install 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Checking installed headers"
make -C "${CT_SRC_DIR}/${CT_KERNEL_FILE}" \
@ -116,20 +116,20 @@ do_kernel_install() {
ARCH=${CT_KERNEL_ARCH} \
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
${V_OPT} \
headers_check 2>&1 |CT_DoLog DEBUG
headers_check 2>&1 |CT_DoLog ALL
}
# Install kernel headers from oldish Mazur's sanitised headers.
do_kernel_sanitised() {
CT_DoLog EXTRA "Copying sanitised headers"
cd "${CT_SRC_DIR}/${CT_KERNEL_FILE}"
cp -rv include/linux "${CT_HEADERS_DIR}" 2>&1 |CT_DoLog DEBUG
cp -rv "include/asm-${CT_KERNEL_ARCH}" "${CT_HEADERS_DIR}/asm" 2>&1 |CT_DoLog DEBUG
cp -rv include/linux "${CT_HEADERS_DIR}" 2>&1 |CT_DoLog ALL
cp -rv "include/asm-${CT_KERNEL_ARCH}" "${CT_HEADERS_DIR}/asm" 2>&1 |CT_DoLog ALL
}
# Install kernel headers by plain copy.
do_kernel_copy() {
CT_DoLog EXTRA "Copying plain kernel headers"
CT_DoLog DEBUG "Copying plain kernel headers"
CT_DoLog WARN "You are using plain kernel headers. You really shouldn't do that."
CT_DoLog WARN "You'd be better off by using installed headers (or sanitised headers)."
@ -178,12 +178,12 @@ do_kernel_copy() {
;;
esac
;;
esac 2>&1 |CT_DoLog DEBUG
esac 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Copying kernel headers"
cp -rv include/asm-generic "${CT_HEADERS_DIR}/asm-generic" 2>&1 |CT_DoLog DEBUG
cp -rv include/linux "${CT_HEADERS_DIR}" 2>&1 |CT_DoLog DEBUG
cp -rv include/asm-${CT_KERNEL_ARCH} "${CT_HEADERS_DIR}/asm" 2>&1 |CT_DoLog DEBUG
cp -rv include/asm-generic "${CT_HEADERS_DIR}/asm-generic" 2>&1 |CT_DoLog ALL
cp -rv include/linux "${CT_HEADERS_DIR}" 2>&1 |CT_DoLog ALL
cp -rv include/asm-${CT_KERNEL_ARCH} "${CT_HEADERS_DIR}/asm" 2>&1 |CT_DoLog ALL
}
# Use preinstalled headers (most probably by using make headers_install in a
@ -194,5 +194,5 @@ do_kernel_preinstalled() {
mkdir -p "${CT_SYSROOT_DIR}/usr"
cd "${CT_KERNEL_LINUX_HEADERS_CUSTOM_DIR}"
cp -rv include "${CT_SYSROOT_DIR}/usr" 2>&1 |CT_DoLog DEBUG
cp -rv include "${CT_SYSROOT_DIR}/usr" 2>&1 |CT_DoLog ALL
}

View File

@ -10,7 +10,7 @@ do_libc_get() {
CT_GetFile "${CT_LIBC_FILE}" ftp://ftp.gnu.org/gnu/glibc
# C library addons
addons_list=`echo "${CT_LIBC_ADDONS}" |sed -r -e 's/,/ /g; s/ $//g;'`
addons_list=`echo "${CT_LIBC_ADDONS_LIST}" |sed -r -e 's/,/ /g; s/ $//g;'`
for addon in ${addons_list}; do
CT_GetFile "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}" ftp://ftp.gnu.org/gnu/glibc
done
@ -24,7 +24,7 @@ do_libc_extract() {
CT_ExtractAndPatch "${CT_LIBC_FILE}"
# C library addons
addons_list=`echo "${CT_LIBC_ADDONS}" |sed -r -e 's/,/ /g; s/ $//g;'`
addons_list=`echo "${CT_LIBC_ADDONS_LIST}" |sed -r -e 's/,/ /g; s/ $//g;'`
for addon in ${addons_list}; do
CT_ExtractAndPatch "${CT_LIBC}-${addon}-${CT_LIBC_VERSION}"
done
@ -66,6 +66,11 @@ do_libc_headers() {
# is ok here, since all we want are the basic headers at this point.
# Override libc_cv_ppc_machine so glibc-cvs doesn't complain
# 'a version of binutils that supports .machine "altivec" is needed'.
# We also need to use the ports addon if specified
addons=
[ "${CT_LIBC_GLIBC_USE_PORTS}" = "y" ] && addons="${CT_LIBC}-ports-${CT_LIBC_VERSION}"
libc_cv_ppc_machine=yes \
CC=${CT_CC_NATIVE} \
"${CT_SRC_DIR}/${CT_LIBC_FILE}/configure" \
@ -76,8 +81,8 @@ do_libc_headers() {
--without-cvs \
--disable-sanity-checks \
--enable-hacker-mode \
--enable-add-ons="" \
--without-nptl 2>&1 |CT_DoLog DEBUG
--enable-add-ons="${addons}" \
--without-nptl 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing C library headers"
@ -93,9 +98,11 @@ do_libc_headers() {
# errlist-compat.c.
# Note: BOOTSTRAP_GCC is used by:
# patches/glibc-2.3.5/glibc-mips-bootstrap-gcc-header-install.patch
libc_cv_ppc_machine=yes \
make CFLAGS=-DBOOTSTRAP_GCC sysdeps/gnu/errlist.c 2>&1 |CT_DoLog DEBUG
libc_cv_ppc_machine=yes \
make CFLAGS="-O -DBOOTSTRAP_GCC" sysdeps/gnu/errlist.c 2>&1 |CT_DoLog ALL
mkdir -p stdio-common
# sleep for 2 seconds for benefit of filesystems with lousy time
# resolution, like FAT, so make knows for sure errlist-compat.c doesn't
# need generating
@ -105,8 +112,8 @@ do_libc_headers() {
# Note: BOOTSTRAP_GCC (see above)
libc_cv_ppc_machine=yes \
make cross-compiling=yes install_root=${CT_SYSROOT_DIR} \
CFLAGS=-DBOOTSTRAP_GCC ${LIBC_SYSROOT_ARG} \
install-headers 2>&1 |CT_DoLog DEBUG
CFLAGS="-O -DBOOTSTRAP_GCC" ${LIBC_SYSROOT_ARG} \
install-headers 2>&1 |CT_DoLog ALL
# Two headers -- stubs.h and features.h -- aren't installed by install-headers,
# so do them by hand. We can tolerate an empty stubs.h for the moment.
@ -142,7 +149,7 @@ do_libc() {
extra_config=""
case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
*enable-kernel*) ;;
*) extra_config="${extra_config} --enable-kernel=${CT_KERNEL_VERSION}"
*) extra_config="${extra_config} --enable-kernel=`echo ${CT_KERNEL_VERSION} |sed -r -e 's/^([^.]+\.[^.]+\.[^.]+)(|\.[^.]+)$/\1/;'`"
esac
case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in
*-tls*) ;;
@ -164,12 +171,13 @@ do_libc() {
,y) extra_config="${extra_config} --without-fp";;
esac;;
esac
case "${CT_LIBC_ADDONS},${CT_LIBC_ADDONS_LIST}" in
y,) extra_config="${extra_config} --enable-add-ons";;
y,*) extra_config="${extra_config} --enable-add-ons=${CT_LIBC_ADDONS_LIST}";;
esac
CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\""
case "${CT_LIBC_ADDONS},${CT_LIBC_GLIBC_USE_PORTS}" in
y,y) addons_config="--enable-add-ons=${CT_LIBC_ADDONS_LIST},${CT_LIBC}-ports-${CT_LIBC_VERSION}";;
y,) addons_config="--enable-add-ons=${CT_LIBC_ADDONS_LIST}";;
,y) addons_config="--enable-add-ons=${CT_LIBC}-ports-${CT_LIBC_VERSION}";;
*) addons_config="";;
esac
# Add some default CC args
extra_cc_args="${CT_CFLAGS_FOR_HOST}"
@ -182,6 +190,8 @@ do_libc() {
esac;;
esac
CT_DoLog DEBUG "Configuring with addons : \"${addons_config}\""
CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\""
CT_DoLog DEBUG "Extra CC args passed: \"${extra_cc_args}\""
# sh3 and sh4 really need to set configparms as of gcc-3.4/glibc-2.3.2
@ -214,13 +224,15 @@ do_libc() {
"${CT_SRC_DIR}/${CT_LIBC_FILE}/configure" \
--prefix=/usr \
--build=${CT_BUILD} --host=${CT_TARGET} \
${CT_LIBC_GLIBC_EXTRA_CONFIG} \
${extra_config} \
--without-cvs \
--without-nptl \
--disable-profile \
--disable-debug \
--without-gd \
--with-headers="${CT_HEADERS_DIR}" 2>&1 |CT_DoLog DEBUG
--with-headers="${CT_HEADERS_DIR}" \
${addons_config} \
${extra_config} \
${CT_LIBC_GLIBC_EXTRA_CONFIG} 2>&1 |CT_DoLog ALL
if grep -l '^install-lib-all:' "${CT_SRC_DIR}/${CT_LIBC_FILE}/Makerules" > /dev/null; then
# nptl-era glibc.
@ -248,17 +260,17 @@ do_libc() {
CT_DoLog EXTRA "Building C library"
make LD=${CT_TARGET}-ld \
RANLIB=${CT_TARGET}-ranlib \
${GLIBC_INITIAL_BUILD_RULE} 2>&1 |CT_DoLog DEBUG
${GLIBC_INITIAL_BUILD_RULE} 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing C library"
make install_root="${CT_SYSROOT_DIR}" \
${LIBC_SYSROOT_ARG} \
${GLIBC_INITIAL_INSTALL_RULE} 2>&1 |CT_DoLog DEBUG
${GLIBC_INITIAL_INSTALL_RULE} 2>&1 |CT_DoLog ALL
# This doesn't seem to work when building a crosscompiler,
# as it tries to execute localedef using the just-built ld.so!?
#CT_DoLog EXTRA "Installing locales"
#make localedata/install-locales install_root=${SYSROOT} 2>&1 |CT_DoLog DEBUG
#make localedata/install-locales install_root=${SYSROOT} 2>&1 |CT_DoLog ALL
# Fix problems in linker scripts.
#
@ -276,13 +288,13 @@ do_libc() {
for file in libc.so libpthread.so libgcc_s.so; do
for dir in lib lib64 usr/lib usr/lib64; do
if [ -f "${CT_SYSROOT_DIR}/${dir}/${file}" -a ! -L ${CT_SYSROOT_DIR}/$lib/$file ]; then
mv "${CT_SYSROOT_DIR}/${dir}/${file}" "${CT_SYSROOT_DIR}/${dir}/${file}_orig"
cp "${CT_SYSROOT_DIR}/${dir}/${file}" "${CT_SYSROOT_DIR}/${dir}/${file}_orig"
CT_DoLog DEBUG "Fixing \"${CT_SYS_ROOT_DIR}/${dir}/${file}\""
sed -i -r -e 's,/usr/lib/,,g;
s,/usr/lib64/,,g;
s,/lib/,,g;
s,/lib64/,,g;
/BUG in libc.scripts.output-format.sed/d' "${CT_SYSROOT_DIR}/${dir}/${file}_orig"
/BUG in libc.scripts.output-format.sed/d' "${CT_SYSROOT_DIR}/${dir}/${file}"
fi
done
done
@ -303,13 +315,15 @@ do_libc_finish() {
cd "${CT_BUILD_DIR}/build-libc"
CT_DoLog EXTRA "Re-building C library"
make LD=${CT_TARGET}-ld RANLIB=${CT_TARGET}-ranlib 2>&1 |CT_DoLog DEBUG
make LD=${CT_TARGET}-ld RANLIB=${CT_TARGET}-ranlib 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing missing C library components"
# note: should do full install and then fix linker scripts, but this is faster
for t in bin rootsbin sbin data others; do
make install_root="${CT_SYSROOT_DIR}" \
${LIBC_SYSROOT_ARG} \
install-${t} 2>&1 |CT_DoLog DEBUG
install-${t} 2>&1 |CT_DoLog ALL
done
CT_EndStep
}

View File

@ -41,17 +41,17 @@ do_libfloat() {
CT_DoLog EXTRA "Copying sources to build dir"
mkdir build-libfloat
cd build-libfloat
( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog DEBUG
( cd "${CT_SRC_DIR}/${CT_LIBFLOAT_FILE}"; tar cf - . ) |tar xvf - |CT_DoLog ALL
CT_DoLog EXTRA "Cleaning library"
make clean 2>&1 |CT_DoLog DEBUG
make clean 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Building library"
make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog DEBUG
make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing library"
make CROSS_COMPILE="${CT_CC_CORE_PREFIX_DIR}/bin/${CT_TARGET}-" \
DESTDIR="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog DEBUG
DESTDIR="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL
CT_Popd

View File

@ -68,13 +68,13 @@ do_libc_headers() {
# use of the native build host tools, which we need at this
# stage, as we don't have target tools yet.
CT_DoLog EXTRA "Applying configuration"
CT_DoYes "" |make CROSS= PREFIX="${CT_SYSROOT_DIR}/" oldconfig 2>&1 |CT_DoLog DEBUG
CT_DoYes "" |make CROSS= PREFIX="${CT_SYSROOT_DIR}/" oldconfig 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Building headers"
make ${PARALLELMFLAGS} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers 2>&1 |CT_DoLog DEBUG
make ${PARALLELMFLAGS} CROSS= PREFIX="${CT_SYSROOT_DIR}/" headers 2>&1 |CT_DoLog ALL
CT_DoLog EXTRA "Installing headers"
make CROSS= PREFIX="${CT_SYSROOT_DIR}/" install_dev 2>&1 |CT_DoLog DEBUG
make CROSS= PREFIX="${CT_SYSROOT_DIR}/" install_dev 2>&1 |CT_DoLog ALL
CT_EndStep
}
@ -104,7 +104,7 @@ do_libc() {
CT_DoYes "" |make ${PARALLELMFLAGS} \
CROSS=${CT_TARGET}- \
PREFIX="${CT_SYSROOT_DIR}/" \
oldconfig 2>&1 |CT_DoLog DEBUG
oldconfig 2>&1 |CT_DoLog ALL
# We do _not_ want to strip anything for now, in case we specifically
# asked for a debug toolchain, thus the STRIPTOOL= assignment
@ -113,7 +113,7 @@ do_libc() {
CROSS=${CT_TARGET}- \
PREFIX="${CT_SYSROOT_DIR}/" \
STRIPTOOL=true \
all 2>&1 |CT_DoLog DEBUG
all 2>&1 |CT_DoLog ALL
# YEM-FIXME: we want to install libraries in $SYSROOT/lib, but we don't want
# to install headers in $SYSROOT/include, thus making only install_runtime.
@ -127,17 +127,14 @@ do_libc() {
make CROSS=${CT_TARGET}- \
PREFIX="${CT_SYSROOT_DIR}/" \
STRIPTOOL=true \
install 2>&1 |CT_DoLog DEBUG
install 2>&1 |CT_DoLog ALL
CT_EndStep
}
# This function is used to install those components needing the final C compiler
do_libc_finish() {
CT_DoStep INFO "Finishing C library"
# uClibc has nothing to finish
CT_DoLog EXTRA "uClibc has nothing to finish"
CT_EndStep
:
}
# Initialises the .config file to sensible values

View File

@ -64,7 +64,8 @@ if [ "${CT_LOG_USE_COLORS}" = "y" ]; then
CT_WARN_COLOR="${_A_NOR}${_A_BRI}${_F_YEL}"
CT_INFO_COLOR="${_A_NOR}${_A_BRI}${_F_GRN}"
CT_EXTRA_COLOR="${_A_NOR}${_A_DIM}${_F_GRN}"
CT_DEBUG_COLOR="${_A_NOR}${_A_DIM}${_F_WHI}"
CT_DEBUG_COLOR="${_A_NOR}${_A_BRI}${_F_BLU}"
CT_ALL_COLOR="${_A_NOR}${_A_DIM}${_F_WHI}"
CT_NORMAL_COLOR="${_A_NOR}"
else
CT_ERROR_COLOR=
@ -72,6 +73,7 @@ else
CT_INFO_COLOR=
CT_EXTRA_COLOR=
CT_DEBUG_COLOR=
CT_ALL_COLOR=
CT_NORMAL_COLOR=
fi

View File

@ -29,6 +29,7 @@ CT_LOG_LEVEL_WARN=1
CT_LOG_LEVEL_INFO=2
CT_LOG_LEVEL_EXTRA=3
CT_LOG_LEVEL_DEBUG=4
CT_LOG_LEVEL_ALL=5
# Attributes
_A_NOR="\\033[0m"
@ -56,6 +57,7 @@ _F_WHI="\\033[37m"
# - INFO: Informational messages
# - EXTRA: Extra informational messages
# - DEBUG: Debug messages
# - ALL: Component's build messages
# Usage: CT_DoLog <level> [message]
# If message is empty, then stdin will be logged.
CT_DoLog() {
@ -63,7 +65,7 @@ CT_DoLog() {
local l
eval max_level="\${CT_LOG_LEVEL_${CT_LOG_LEVEL_MAX}}"
# Set the maximum log level to DEBUG if we have none
[ -z ${max_level} ] && max_level=${CT_LOG_LEVEL_DEBUG}
[ -z "${max_level}" ] && max_level=${CT_LOG_LEVEL_DEBUG}
LEVEL="$1"; shift
eval level="\${CT_LOG_LEVEL_${LEVEL}}"
@ -79,7 +81,7 @@ CT_DoLog() {
case "${CT_LOG_SEE_TOOLS_WARN},${line}" in
y,*"warning:"*) cur_L=WARN; cur_l=${CT_LOG_LEVEL_WARN};;
*"error:"*) cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};;
"make["?*"]:"*"Stop.") cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};;
*"make["?*"]:"*"Stop.") cur_L=ERROR; cur_l=${CT_LOG_LEVEL_ERROR};;
*) cur_L="${LEVEL}"; cur_l="${level}";;
esac
l="`printf \"[%-5s]%*s%s%s\" \"${cur_L}\" \"${indent}\" \" \" \"${line}\"`"
@ -249,8 +251,8 @@ CT_DoGetFile() {
local _curl=`which curl`
case "${_wget},${_curl}" in
,) CT_DoError "Could find neither wget nor curl";;
,*) CT_DoGetFileCurl "$1";;
*) CT_DoGetFileWget "$1";;
,*) CT_DoGetFileCurl "$1" |CT_DoLog DEBUG;;
*) CT_DoGetFileWget "$1" |CT_DoLog DEBUG;;
esac
}
@ -270,7 +272,7 @@ CT_GetFile() {
CT_DoLog DEBUG "Removing already present \"${file}\""
rm -f "${CT_TARBALLS_DIR}/${file}${ext}"
else
CT_DoLog EXTRA "Already have \"${file}\""
CT_DoLog DEBUG "Already have \"${file}\""
return 0
fi
fi
@ -285,8 +287,8 @@ CT_GetFile() {
# Try all urls in turn
for url in "$@"; do
case "${url}" in
*) CT_DoLog EXTRA "Trying \"${url}/${file}${ext}\""
CT_DoGetFile "${url}/${file}${ext}" 2>&1 |CT_DoLog DEBUG
*) CT_DoLog DEBUG "Trying \"${url}/${file}${ext}\""
CT_DoGetFile "${url}/${file}${ext}" 2>&1
;;
esac
[ -f "${file}${ext}" ] && got_it=1 && break 2 || true
@ -357,15 +359,15 @@ CT_ExtractAndPatch() {
# If the directory exists, then consider extraction and patching done
if [ -d "${file}" ]; then
CT_DoLog EXTRA "Already extracted \"${file}\""
CT_DoLog DEBUG "Already extracted \"${file}\""
return 0
fi
CT_DoLog EXTRA "Extracting \"${file}\""
case "${ext}" in
.tar.bz2) tar xvjf "${full_file}" |CT_DoLog DEBUG;;
.tar.gz|.tgz) tar xvzf "${full_file}" |CT_DoLog DEBUG;;
.tar) tar xvf "${full_file}" |CT_DoLog DEBUG;;
.tar.bz2) tar xvjf "${full_file}" |CT_DoLog ALL;;
.tar.gz|.tgz) tar xvzf "${full_file}" |CT_DoLog ALL;;
.tar) tar xvf "${full_file}" |CT_DoLog ALL;;
*) CT_Abort "Don't know how to handle \"${file}\": unknown extension" ;;
esac
@ -396,7 +398,7 @@ CT_ExtractAndPatch() {
for p in "${patch_dir}"/*.patch; do
if [ -f "${p}" ]; then
CT_DoLog DEBUG "Applying patch \"${p}\""
patch -g0 -F1 -p1 -f <"${p}" |CT_DoLog DEBUG
patch -g0 -F1 -p1 -f <"${p}" |CT_DoLog ALL
CT_TestAndAbort "Failed while applying patch file \"${p}\"" ${PIPESTATUS[0]} -ne 0
fi
done