Compare commits

...

34 Commits
master ... 1.2

Author SHA1 Message Date
Yann E. MORIN" bae76c39c8 1.2: close branch 13 years ago
Yann E. MORIN" 49ff206f15 Restore the 1.2 maintenance branch. 14 years ago
Yann E. MORIN" f60c8b1ac2 Bump version to 1.2.5. 14 years ago
Yann E. MORIN" 0fd5e653e5 Backport #1111 from trunk: 14 years ago
Yann E. MORIN" e95bd748e8 Bump version to 1.2.4+svn. 15 years ago
Yann E. MORIN" 1942f97ede Bump version to 1.2.4. 15 years ago
Yann E. MORIN" aa5541b302 Backport #1026 from trunk: 15 years ago
Yann E. MORIN" 2cee839c90 Backport #1014 from trunk: 15 years ago
Yann E. MORIN" 44744cdee8 Backport #1013 from trunk: 15 years ago
Yann E. MORIN" 111ecace8e Backport #1011 from trunk: 15 years ago
Yann E. MORIN" fb44155d7e Bump version up to 1.2.3+svn. 15 years ago
Yann E. MORIN" 2401832b11 Bump version up to 1.2.3. 15 years ago
Yann E. MORIN" 57db77a46d Backport #975 from trunk: 15 years ago
Yann E. MORIN" 679e8feb9f Backport #973 from trunk: 15 years ago
Yann E. MORIN" 49bc58bd34 Backport #971 from trunk: 15 years ago
Yann E. MORIN" 55452b5de7 Backport #969 from trunk: 15 years ago
Yann E. MORIN" 2b6bb80937 Bump version to 1.2.2+svn. 15 years ago
Yann E. MORIN" 92a4aa5416 Bump version to 1.2.2. 15 years ago
Yann E. MORIN" a5a845d68f Backport #958 from trunk: 15 years ago
Yann E. MORIN" fbd4ddda05 Backport #953 from trunk: 15 years ago
Yann E. MORIN" e146d33934 Update version to 1.2.1+svn 15 years ago
Yann E. MORIN" 0883ab052d Update version to 1.2.1. 15 years ago
Yann E. MORIN" d4f21486ba Backport #926 from trunk: 15 years ago
Yann E. MORIN" 92bc8d23a4 Backport #922 from trunk: 15 years ago
Yann E. MORIN" b09275ea5e Merge #908 from trunk: 15 years ago
Yann E. MORIN" ee225f2629 Merge #893 and #923 from trunk: 15 years ago
Yann E. MORIN" 64dd9107e4 Backport #878 from trunk: 15 years ago
Yann E. MORIN" f37915ff06 Backport #876 from trunk: 15 years ago
Yann E. MORIN" b520c7f9c4 Backport #864 from trunk: 15 years ago
Yann E. MORIN" f0ac6d13b8 Backport #863 from trunk: 15 years ago
Yann E. MORIN" 87108e0241 Backport #857 from trunk: 15 years ago
Yann E. MORIN" 25f9fdd5b3 Backport #849 from trunk: 15 years ago
Yann E. MORIN" 3277d5a526 Backport #844 from trunk: 15 years ago
Yann E. MORIN" 295e193d70 Create the 1.2 maintenance branch. 15 years ago
  1. 2
      .version
  2. 9
      arch/arm/config.in
  3. 19
      arch/arm/functions
  4. 2
      config/global/ct-behave.in
  5. 2
      kconfig/conf.c
  6. 16
      kconfig/kconfig.mk
  7. 4
      kconfig/lxdialog/check-lxdialog.sh
  8. 12
      samples/samples.mk
  9. 26
      scripts/build/cc_gcc.sh
  10. 2
      scripts/build/debug/100-dmalloc.sh
  11. 5
      scripts/build/debug/200-duma.sh
  12. 4
      scripts/build/debug/300-gdb.sh
  13. 4
      scripts/build/debug/500-strace.sh
  14. 14
      scripts/build/libc_glibc.sh
  15. 30
      scripts/crosstool.sh
  16. 48
      scripts/functions
  17. 17
      scripts/showSamples.sh
  18. 2
      tools/extract-config.sh
  19. 6
      tools/populate.in

2
.version

@ -1 +1 @@
1.2.0
1.2.5

9
arch/arm/config.in

@ -4,7 +4,6 @@ config ARCH_arm
select ARCH_SUPPORTS_BOTH_ENDIAN
select ARCH_DEFAULT_LE
select ARCH_SUPPORT_ARCH
select ARCH_SUPPORT_ABI
select ARCH_SUPPORT_CPU
select ARCH_SUPPORT_TUNE
select ARCH_SUPPORT_FPU
@ -20,5 +19,9 @@ config ARCH_ARM_EABI
help
Set up the toolchain so that it generates EABI-compliant binaries.
config ARCH_ABI
default "aapcs" if ARCH_ARM_EABI
config ARCH_ARM_ABI_OK
bool
default y
depends on ! ARCH_ARM_EABI
select ARCH_SUPPORT_ABI

19
arch/arm/functions

@ -12,20 +12,7 @@ CT_DoArchValues() {
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
# In case we're EABI, do *not* specify any ABI!
# which means, either we do not have an ABI specified, or we're not EABI.
CT_TestOrAbort "Internal error: CT_ARCH_ABI should not be set for EABI build." -z "${CT_ARCH_ABI}" -o -z "${CT_ARCH_ARM_EABI}"
}

2
config/global/ct-behave.in

@ -44,7 +44,7 @@ config DEBUG_CT
if DEBUG_CT
config DEBUG_CT_PAUSE_STEPS
config DEBUG_PAUSE_STEPS
bool
prompt "Pause between every steps"
default n

2
kconfig/conf.c

@ -559,7 +559,7 @@ int main(int ac, char **av)
"*** You have not yet configured "PROJECT_NAME"!\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make xconfig\").\n"
"*** \"make menuconfig\" or \"make config\").\n"
"***\n"));
exit(1);
}

16
kconfig/kconfig.mk

@ -20,7 +20,7 @@ endif
# Build a list of all config files
ARCHS = $(patsubst $(CT_LIB_DIR)/arch/%,%,$(wildcard $(CT_LIB_DIR)/arch/*))
ARCH_CONFIG_FILE = $(wildcard $(CT_LIB_DIR)/arch/*/*.in)
ARCH_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/arch/*/*.in)
DEBUG_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/debug/*.in)
TOOLS_CONFIG_FILES = $(wildcard $(CT_LIB_DIR)/config/tools/*.in)
@ -118,12 +118,22 @@ $(obj)/conf $(obj)/mconf:: $(obj)
$(obj):
@mkdir -p $(obj)
$(obj)/mconf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/mconf.c
HEADERS = $(CT_LIB_DIR)/kconfig/expr.h \
$(CT_LIB_DIR)/kconfig/lkc.h \
$(CT_LIB_DIR)/kconfig/lkc_proto.h
FILES = $(CT_LIB_DIR)/kconfig/confdata.c \
$(CT_LIB_DIR)/kconfig/expr.c \
$(CT_LIB_DIR)/kconfig/menu.c \
$(CT_LIB_DIR)/kconfig/symbol.c \
$(CT_LIB_DIR)/kconfig/util.c
$(obj)/mconf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/mconf.c $(HEADERS) $(FILES)
@$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{mconf.c,zconf.tab.c,lxdialog/*.c} \
$(shell $(CT_LIB_DIR)/kconfig/lxdialog/check-lxdialog.sh -ccflags) \
$(shell $(CT_LIB_DIR)/kconfig/lxdialog/check-lxdialog.sh -ldflags $(HOST_CC))
$(obj)/conf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/conf.c
$(obj)/conf:: $(SHIPPED) $(CT_LIB_DIR)/kconfig/conf.c $(HEADERS) $(FILES)
@$(HOST_CC) $(CFLAGS) -o $@ $(CT_LIB_DIR)/kconfig/{conf.c,zconf.tab.c}
clean::

4
kconfig/lxdialog/check-lxdialog.sh

@ -43,7 +43,7 @@ trap "rm -f $tmp" 0 1 2 3 15
# Check if we can link to ncurses
check() {
echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
if [ $? != 0 ]; then
if [ $? -ne 0 ]; then
echo " *** Unable to find the ncurses libraries." 1>&2
echo " *** make menuconfig require the ncurses libraries" 1>&2
echo " *** " 1>&2
@ -57,7 +57,7 @@ usage() {
printf "Usage: $0 [-check compiler options|-header|-library]\n"
}
if [ $# == 0 ]; then
if [ $# -eq 0 ]; then
usage
exit 1
fi

12
samples/samples.mk

@ -35,6 +35,18 @@ PHONY += $(CT_SAMPLES)
$(CT_SAMPLES):
@echo 'Configuring for "$@"'
@$(CT_NG) $(patsubst %,copy_config_%,$(@)) oldconfig
@if grep -E '^CT_EXPERIMENTAL=y$$' .config >/dev/null 2>&1; then \
echo ''; \
echo '***********************************************************'; \
echo ''; \
echo 'WARNING! This sample may enable experimental features.'; \
echo ' Please be sure to review the configuration prior'; \
echo ' to building and using your toolchain!'; \
echo 'Now, you have been warned!'; \
echo ''; \
echo '***********************************************************'; \
echo ''; \
fi
@echo 'Execute "$(CT_NG) build" to build your toolchain'
$(patsubst %,copy_config_%,$(CT_SAMPLES)):

26
scripts/build/cc_gcc.sh

@ -263,26 +263,6 @@ do_cc() {
CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty
fi
# Idea from <cort.dougan at gmail.com>:
# Fix lib/lib64 confusion for GCC 3.3.3 on PowerPC64 and x86_64.
# GCC 3.4.0 and up don't suffer from this confusion, and don't need this
# kludge.
# FIXME: we should patch gcc's source rather than uglify crosstool.sh.
# FIXME: is this needed for gcc-3.3.[56]?
case "${CT_CC_FILE}" in
gcc-3.3.[34])
case "${CT_TARGET}" in
powerpc64-unknown-linux-gnu|x86_64-unknown-linux-gnu)
for d in $(find "${CT_SYSROOT_DIR}" -name lib -type d -empty); do
if [ -d $(dirname "${d}")/lib64 ] ; then
rm -rf "${d}"
ln -s $(dirname "${d}")/lib64 "${d}"
fi
done ;;
*) ;;
esac ;;
esac
CT_DoLog EXTRA "Building final compiler"
CT_DoExecLog ALL make ${PARALLELMFLAGS} all
@ -293,11 +273,5 @@ do_cc() {
# to call the C compiler with the same, somewhat canonical name.
ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-{g,}cc 2>&1 |CT_DoLog ALL
# 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 - ) |CT_DoLog ALL
rm -rf "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
CT_EndStep
}

2
scripts/build/debug/100-dmalloc.sh

@ -48,7 +48,7 @@ do_debug_dmalloc_build() {
${extra_config}
CT_DoLog EXTRA "Building dmalloc"
CT_DoExecLog ALL make 2>&1 |CT_DoLog ALL
CT_DoExecLog ALL make
CT_DoLog EXTRA "Installing dmalloc"
CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" installincs installlib

5
scripts/build/debug/200-duma.sh

@ -12,10 +12,13 @@ do_debug_duma_get() {
# D.U.M.A. doesn't separate its name from its version with a dash,
# but with an underscore. Create a link so that crosstool-NG can
# work correctly:
cd "${CT_TARBALLS_DIR}"
CT_Pushd "${CT_TARBALLS_DIR}"
duma_ext=$(CT_GetFileExtension "duma_${CT_DUMA_VERSION}")
rm -f "duma-${CT_DUMA_VERSION}${duma_ext}"
ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}"
# Downloading from sourceforge leaves garbage, cleanup
rm -f showfiles.php\?group_id\=*
CT_Popd
}
do_debug_duma_extract() {

4
scripts/build/debug/300-gdb.sh

@ -78,6 +78,7 @@ do_debug_gdb_build() {
--target=${CT_TARGET} \
--prefix="${CT_PREFIX_DIR}" \
--with-build-sysroot="${CT_SYSROOT_DIR}" \
--disable-werror \
${cross_extra_config}
CT_DoLog EXTRA "Building cross-gdb"
@ -176,7 +177,7 @@ do_debug_gdb_build() {
CT_DoExecLog ALL make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install
# Building a native gdb also builds a gdbserver
find "${CT_DEBUG_INSTALL_DIR}" -type f -name gdbserver -exec rm -fv {} + 2>&1 |CT_DoLog ALL
find "${CT_DEBUG_INSTALL_DIR}" -type f -name gdbserver -exec rm -fv {} \; 2>&1 |CT_DoLog ALL
unset ac_cv_func_strncmp_works
@ -220,6 +221,7 @@ do_debug_gdb_build() {
--without-x \
--without-included-gettext \
--without-develop \
--disable-werror \
${gdbserver_extra_config}
CT_DoLog EXTRA "Building gdbserver"

4
scripts/build/debug/500-strace.sh

@ -9,6 +9,10 @@ do_print_filename() {
do_debug_strace_get() {
CT_GetFile "strace-${CT_STRACE_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/strace/
# Downloading from sourceforge leaves garbage, cleanup
CT_Pushd "${CT_TARBALLS_DIR}"
rm -f showfiles.php\?group_id\=*
CT_Popd
}
do_debug_strace_extract() {

14
scripts/build/libc_glibc.sh

@ -431,13 +431,7 @@ do_libc() {
# Fix problems in linker scripts.
#
# 1. Remove absolute paths
# Any file in a list of known suspects that isn't a symlink is assumed to be a linker script.
# FIXME: test -h is not portable
# FIXME: probably need to check more files than just these three...
# Need to use sed instead of just assuming we know what's in libc.so because otherwise alpha breaks
#
# 2. Remove lines containing BUG per http://sources.redhat.com/ml/bug-glibc/2003-05/msg00055.html,
# Remove lines containing BUG per http://sources.redhat.com/ml/bug-glibc/2003-05/msg00055.html,
# needed to fix gcc-3.2.3/glibc-2.3.2 targeting arm
#
# To make "strip *.so.*" not fail (ptxdist does this), rename to .so_orig rather than .so.orig
@ -447,11 +441,7 @@ do_libc() {
if [ -f "${CT_SYSROOT_DIR}/${dir}/${file}" -a ! -L ${CT_SYSROOT_DIR}/$lib/$file ]; then
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}"
CT_DoExecLog ALL sed -i -r -e '/BUG in libc.scripts.output-format.sed/d' "${CT_SYSROOT_DIR}/${dir}/${file}"
fi
done
done

30
scripts/crosstool.sh

@ -350,6 +350,20 @@ if [ -z "${CT_RESTART}" ]; then
mkdir -p "${CT_SYSROOT_DIR}/lib"
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"
# 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).
case "${CT_TARGET}" in
powerpc64*|ppc64*|x86_64*)
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"
;;
esac
# Canadian-cross are really picky on the way they are built. Tweak the values.
CT_UNIQ_BUILD=$(echo "${CT_BUILD}" |sed -r -e 's/-/-build_/')
if [ "${CT_CANADIAN}" = "y" ]; then
@ -495,7 +509,7 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
if [ "${CT_STOP}" = "${step}" ]; then
do_stop=1
fi
if [ "${CTDEBUG_CT_PAUSE_STEPS}" = "y" ]; then
if [ "${CT_DEBUG_PAUSE_STEPS}" = "y" ]; then
CT_DoPause "Step '${step}' finished"
fi
fi
@ -510,9 +524,9 @@ if [ "${CT_ONLY_DOWNLOAD}" != "y" -a "${CT_ONLY_EXTRACT}" != "y" ]; then
# Install the /populator/
CT_DoLog EXTRA "Installing the populate helper"
sed -r -e 's,@@CT_READELF@@,'"${CT_PREFIX_DIR}/bin/${CT_TARGET}-readelf"',g;' \
-e 's,@@CT_SYSROOT_DIR@@,'"${CT_SYSROOT_DIR}"',g;' \
"${CT_LIB_DIR}/tools/populate.in" >"${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate"
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"
# Create the aliases to the target tools
@ -521,15 +535,13 @@ 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}"'-/;')
CT_DoLog DEBUG "Linking '${_t}' -> '${t}'"
ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL
ln -sv "${t}" "${_t}" 2>&1
fi
if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then
_t=$(echo "$t" |sed -r -e "${CT_TARGET_ALIAS_SED_EXPR}")
CT_DoLog DEBUG "Linking '${_t}' -> '${t}'"
ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL
ln -sv "${t}" "${_t}" 2>&1
fi
done
done |CT_DoLog ALL
CT_Popd
CT_EndStep

48
scripts/functions

@ -5,6 +5,8 @@
# Prepare the fault handler
CT_OnError() {
ret=$?
# Bail out early in subshell, the upper level shell will act accordingly.
[ ${BASH_SUBSHELL} -eq 0 ] || exit $ret
CT_DoLog ERROR "Build failed in step '${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}'"
for((step=(CT_STEP_COUNT-1); step>1; step--)); do
CT_DoLog ERROR " called in step '${CT_STEP_MESSAGE[${step}]}'"
@ -169,7 +171,7 @@ CT_TestOrAbort() {
# Test the presence of a tool, or abort if not found
# Usage: CT_HasOrAbort <tool>
CT_HasOrAbort() {
CT_TestAndAbort "'${1}' not found and needed for successful toolchain build." -z ""$(CT_Which "${1}")
CT_TestAndAbort "'${1}' not found and needed for successful toolchain build." -z "$(CT_Which "${1}")"
return 0
}
@ -262,18 +264,20 @@ CT_DoYes() {
}
# Get the file name extension of a component
# Usage: CT_GetFileExtension <component_name-component_version>
# Usage: CT_GetFileExtension <component_name-component_version> [extension]
# If found, echoes the extension to stdout
# If not found, echoes nothing on stdout.
CT_GetFileExtension() {
local ext
local file="$1"
shift
local first_ext="$1"
CT_Pushd "${CT_TARBALLS_DIR}"
# we need to also check for an empty extension for those very
# peculiar components that don't have one (such as sstrip from
# buildroot).
for ext in .tar.gz .tar.bz2 .tgz .tar ''; do
for ext in ${first_ext} .tar.gz .tar.bz2 .tgz .tar ''; do
if [ -f "${file}${ext}" ]; then
echo "${ext}"
break
@ -342,7 +346,7 @@ CT_GetFile() {
esac
# Do we already have it?
ext=$(CT_GetFileExtension "${file}")
ext=$(CT_GetFileExtension "${file}" ${first_ext})
if [ -n "${ext}" ]; then
CT_DoLog DEBUG "Already have '${file}'"
return 0
@ -381,12 +385,11 @@ CT_GetFile() {
CT_DoGetFile "${url}/${file}${ext}"
if [ -f "${file}${ext}" ]; then
if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
# No need to test if the file already exists because
# it does NOT. If it did exist, we'd have been stopped
# above, when looking for local copies.
# The file may already exist if downloads are forced: remove it first
CT_DoLog EXTRA "Saving '${file}' to local storage"
mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
fi
return 0
fi
@ -402,12 +405,11 @@ CT_GetFile() {
CT_DoGetFile "${url}/${file}${ext}"
if [ -f "${file}${ext}" ]; then
if [ "${CT_SAVE_TARBALLS}" = "y" ]; then
# No need to test if the file already exists because
# it does NOT. If it did exist, we'd have been stopped
# above, when looking for local copies.
# The file may already exist if downloads are forced: remove it first
CT_DoLog EXTRA "Saving '${file}' to local storage"
mv "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}" |CT_DoLog ALL
ln -sv "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}" |CT_DoLog ALL
CT_DoExecLog ALL rm -f "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}"
CT_DoExecLog ALL mv -f "${file}${ext}" "${CT_LOCAL_TARBALLS_DIR}"
CT_DoExecLog ALL ln -s "${CT_LOCAL_TARBALLS_DIR}/${file}${ext}" "${file}${ext}"
fi
return 0
fi
@ -497,7 +499,7 @@ CT_ExtractAndPatch() {
official_patch_dir=
custom_patch_dir=
[ "${CUSTOM_PATCH_ONLY}" = "y" ] || official_patch_dir="${CT_LIB_DIR}/patches/${base_file}/${ver_file}"
[ "${CT_CUSTOM_PATCH_ONLY}" = "y" ] || official_patch_dir="${CT_LIB_DIR}/patches/${base_file}/${ver_file}"
[ "${CT_CUSTOM_PATCH}" = "y" ] && custom_patch_dir="${CT_CUSTOM_PATCH_DIR}/${base_file}/${ver_file}"
for patch_dir in "${official_patch_dir}" "${custom_patch_dir}"; do
if [ -n "${patch_dir}" -a -d "${patch_dir}" ]; then
@ -631,13 +633,17 @@ CT_DoSaveState() {
esac
CT_DoLog DEBUG " Saving environment and aliases"
# We must omit shell functions
# We must omit shell functions, and some specific bash variables
# that break when restoring the environment, later. We could do
# all the processing in the awk script, but a sed is easier...
set |awk '
BEGIN { _p = 1; }
$0~/^[^ ]+ \(\)/ { _p = 0; }
_p == 1
$0 == "}" { _p = 1; }
' >"${state_dir}/env.sh"
BEGIN { _p = 1; }
$0~/^[^ ]+ \(\)/ { _p = 0; }
_p == 1
$0 == "}" { _p = 1; }
' |sed -r -e '/^BASH_(ARGC|ARGV|LINENO|SOURCE|VERSINFO)=/d;
/^(UID|EUID)=/d;
/^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh"
CT_DoLog DEBUG " Saving CT_CC_CORE_STATIC_PREFIX_DIR='${CT_CC_CORE_STATIC_PREFIX_DIR}'"
CT_Pushd "${CT_CC_CORE_STATIC_PREFIX_DIR}"

17
scripts/showSamples.sh

@ -18,15 +18,16 @@ dump_single_sample() {
local sample="$2"
if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
sample_top="${CT_TOP_DIR}"
sample_type="local"
sample_type="l"
else
sample_top="${CT_LIB_DIR}"
sample_type="global"
sample_type="g"
fi
. "${sample_top}/samples/${sample}/crosstool.config"
if [ -z "${wiki}" ]; then
printf " %-*s (%s" ${width} "${sample}" "${sample_type}"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf ",B"
[ "${CT_EXPERIMENTAL}" = "y" ] && printf ",X"
echo ")"
if [ ${verbose} -ne 0 ]; then
echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
@ -108,3 +109,13 @@ fi
for sample in "${@}"; do
( dump_single_sample ${opt} ${width} "${sample}" )
done
if [ "${opt}" = -w ]; then
printf "^ Total: ${#@} samples | ||||||||||||"
echo ""
elif [ -z "${opt}" ]; then
echo ' l (local) : sample was found in current directory'
echo ' g (global) : sample was installed with crosstool-NG'
echo ' X (EXPERIMENTAL): sample may use EXPERIMENTAL features'
echo ' B (BORKEN) : sample is currently broken'
fi

2
tools/extract-config.sh

@ -10,7 +10,7 @@ BEGIN {
dump = 0;
}
$0~/Dumping crosstool-NG configuration: done in.+s$/ {
$0~/Dumping crosstool-NG configuration: done in/ {
dump = 0;
}

6
tools/populate.in

@ -4,8 +4,10 @@
# (C) 2007 Yann E. MORIN
# Licensed under the GPL v2
CT_READELF="@@CT_READELF@@"
CT_SYSROOT_DIR="@@CT_SYSROOT_DIR@@"
# Detect where the toolchain is:
BIN_DIR="$(cd "$(dirname "$0")"; pwd)"
CT_READELF="${BIN_DIR}/@@CT_TARGET@@-readelf"
CT_SYSROOT_DIR="${BIN_DIR}/../@@CT_TARGET@@/sys-root"
myname=$(basename "$0")

Loading…
Cancel
Save