1.1 --- a/scripts/build/libc_uClibc.sh Tue May 08 17:48:32 2007 +0000
1.2 +++ b/scripts/build/libc_uClibc.sh Sat May 19 22:52:47 2007 +0000
1.3 @@ -142,32 +142,46 @@
1.4 config_file="$1"
1.5 munge_file="${CT_BUILD_DIR}/munge-uClibc-config.sed"
1.6
1.7 + # Hack our target in the config file.
1.8 + # Also remove stripping: its the responsibility of the
1.9 + # firmware builder to strip or not.
1.10 cat > "${munge_file}" <<-ENDSED
1.11 s/^(TARGET_.*)=y$/# \\1 is not set/
1.12 s/^# TARGET_${CT_KERNEL_ARCH} is not set/TARGET_${CT_KERNEL_ARCH}=y/
1.13 s/^TARGET_ARCH=".*"/TARGET_ARCH="${CT_KERNEL_ARCH}"/
1.14 +s/.*(DOSTRIP).*/# \\1 is not set/
1.15 ENDSED
1.16
1.17 + # Accomodate for old and new uClibc versions, where the
1.18 + # way to select between big/little endian has changed
1.19 case "${CT_ARCH_BE},${CT_ARCH_LE}" in
1.20 y,) cat >> "${munge_file}" <<-ENDSED
1.21 +s/.*(ARCH_LITTLE_ENDIAN).*/# \\1 is not set/
1.22 s/.*(ARCH_BIG_ENDIAN).*/\\1=y/
1.23 -s/.*(ARCH_LITTLE_ENDIAN).*/# \\1 is not set/
1.24 +s/.*(ARCH_WANTS_LITTLE_ENDIAN).*/# \\1 is not set/
1.25 +s/.*(ARCH_WANTS_BIG_ENDIAN).*/\\1=y/
1.26 ENDSED
1.27 ;;
1.28 ,y) cat >> "${munge_file}" <<-ENDSED
1.29 +s/.*(ARCH_LITTLE_ENDIAN).*/\\1=y/
1.30 s/.*(ARCH_BIG_ENDIAN).*/# \\1 is not set/
1.31 -s/.*(ARCH_LITTLE_ENDIAN).*/\\1=y/
1.32 +s/.*(ARCH_WANTS_LITTLE_ENDIAN).*/\\1=y/
1.33 +s/.*(ARCH_WANTS_BIG_ENDIAN).*/# \\1 is not set/
1.34 ENDSED
1.35 ;;
1.36 esac
1.37
1.38 + # Accomodate for old and new uClibc version, where the
1.39 + # way to select between hard/soft float has changed
1.40 case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
1.41 y,) cat >> "${munge_file}" <<-ENDSED
1.42 s/.*(HAS_FPU).*/\\1=y/
1.43 +s/.*(UCLIBC_HAS_FPU).*/\\1=y/
1.44 ENDSED
1.45 ;;
1.46 ,y) cat >> "${munge_file}" <<-ENDSED
1.47 s/.*(HAS_FPU).*/\\# \\1 is not set/
1.48 +s/.*(UCLIBC_HAS_FPU).*/# \\1 is not set/
1.49 ENDSED
1.50 ;;
1.51 esac
1.52 @@ -191,12 +205,19 @@
1.53 s/^UCLIBC_DOWNLOAD_PREGENERATED_LOCALE=y/\\# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE is not set/
1.54 ENDSED
1.55
1.56 - # Hack our -pipe into WARNINGS, which will be internally incorporated to
1.57 - # CFLAGS. This a dirty hack, but yet needed
1.58 if [ "${CT_USE_PIPES}" = "y" ]; then
1.59 - cat >> "${munge_file}" <<-ENDSED
1.60 + if grep UCLIBC_EXTRA_CFLAGS extra/Configs/Config.in >/dev/null 2>&1; then
1.61 + # Good, there is special provision for such things as -pipe!
1.62 + cat >> "${munge_file}" <<-ENDSED
1.63 +s/^(UCLIBC_EXTRA_CFLAGS=".*)"$/\\1 -pipe"/
1.64 +ENDSED
1.65 + else
1.66 + # Hack our -pipe into WARNINGS, which will be internally incorporated to
1.67 + # CFLAGS. This a dirty hack, but yet needed
1.68 + cat >> "${munge_file}" <<-ENDSED
1.69 s/^(WARNINGS=".*)"$/\\1 -pipe"/
1.70 ENDSED
1.71 + fi
1.72 fi
1.73
1.74 # Force on options needed for C++ if we'll be making a C++ compiler.
1.75 @@ -227,6 +248,7 @@
1.76 s/^DOASSERTS=y/# DOASSERTS is not set/
1.77 s/^SUPPORT_LD_DEBUG=y/# SUPPORT_LD_DEBUG is not set/
1.78 s/^SUPPORT_LD_DEBUG_EARLY=y/# SUPPORT_LD_DEBUG_EARLY is not set/
1.79 +s/^UCLIBC_MALLOC_DEBUGGING=y/# UCLIBC_MALLOC_DEBUGGING is not set/
1.80 ENDSED
1.81 ;;
1.82 1)
1.83 @@ -237,6 +259,7 @@
1.84 s/^DOASSERTS=y/# DOASSERTS is not set/
1.85 s/^SUPPORT_LD_DEBUG=y/# SUPPORT_LD_DEBUG is not set/
1.86 s/^SUPPORT_LD_DEBUG_EARLY=y/# SUPPORT_LD_DEBUG_EARLY is not set/
1.87 +s/^UCLIBC_MALLOC_DEBUGGING=y/# UCLIBC_MALLOC_DEBUGGING is not set/
1.88 ENDSED
1.89 ;;
1.90 2)
1.91 @@ -247,6 +270,7 @@
1.92 s/^# DOASSERTS is not set.*/DOASSERTS=y/
1.93 s/^# SUPPORT_LD_DEBUG is not set.*/SUPPORT_LD_DEBUG=y/
1.94 s/^# SUPPORT_LD_DEBUG_EARLY is not set.*/SUPPORT_LD_DEBUG_EARLY=y/
1.95 +s/^# UCLIBC_MALLOC_DEBUGGING is not set/UCLIBC_MALLOC_DEBUGGING=y/
1.96 ENDSED
1.97 ;;
1.98 esac