mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-20 17:12:55 +00:00
misc: do not use "tar cf - |tar xf -"
Using this: tar cf - -C "/some/place" |tar xf - -C "/some/other/place" to copy a directory to another place does not properly fail (when it does). Using this instead: cp -av "/some/place" "/some/other/place" makes it easy to see why and how it failed. Impacted: libc/uClibc debug/ltrace tools/sstrip scripts/populate
This commit is contained in:
parent
5ae9b7faf9
commit
8908eb3037
@ -20,11 +20,11 @@ do_debug_ltrace_extract() {
|
||||
|
||||
do_debug_ltrace_build() {
|
||||
CT_DoStep INFO "Installing ltrace"
|
||||
mkdir -p "${CT_BUILD_DIR}/build-ltrace"
|
||||
CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
|
||||
|
||||
CT_DoLog EXTRA "Copying sources to build dir"
|
||||
(cd "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}"; tar cf - .)| tar xvf - |CT_DoLog ALL
|
||||
CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}" \
|
||||
"${CT_BUILD_DIR}/build-ltrace"
|
||||
CT_Pushd "${CT_BUILD_DIR}/build-ltrace"
|
||||
|
||||
CT_DoLog EXTRA "Configuring ltrace"
|
||||
CT_DoExecLog ALL \
|
||||
|
@ -58,15 +58,14 @@ do_libc_headers() {
|
||||
|
||||
CT_DoStep INFO "Installing C library headers"
|
||||
|
||||
mkdir -p "${CT_BUILD_DIR}/build-libc-headers"
|
||||
# Simply copy files until uClibc has the ability to build out-of-tree
|
||||
CT_DoLog EXTRA "Copying sources to build dir"
|
||||
CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" \
|
||||
"${CT_BUILD_DIR}/build-libc-headers"
|
||||
cd "${CT_BUILD_DIR}/build-libc-headers"
|
||||
|
||||
# Simply copy files until uClibc has the ablity to build out-of-tree
|
||||
CT_DoLog EXTRA "Copying sources to build dir"
|
||||
tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
|
||||
|
||||
# Retrieve the config file
|
||||
cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
||||
CT_DoExecLog ALL cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
||||
|
||||
# uClibc uses the CROSS environment variable as a prefix to the
|
||||
# compiler tools to use. Setting it to the empty string forces
|
||||
@ -99,15 +98,14 @@ do_libc_start_files() {
|
||||
do_libc() {
|
||||
CT_DoStep INFO "Installing C library"
|
||||
|
||||
mkdir -p "${CT_BUILD_DIR}/build-libc"
|
||||
# Simply copy files until uClibc has the ability to build out-of-tree
|
||||
CT_DoLog EXTRA "Copying sources to build dir"
|
||||
CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" \
|
||||
"${CT_BUILD_DIR}/build-libc"
|
||||
cd "${CT_BUILD_DIR}/build-libc"
|
||||
|
||||
# Simply copy files until uClibc has the ablity to build out-of-tree
|
||||
CT_DoLog EXTRA "Copying sources to build dir"
|
||||
tar cf - -C "${CT_SRC_DIR}/uClibc-${CT_LIBC_VERSION}" . |tar xf -
|
||||
|
||||
# Retrieve the config file
|
||||
cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
||||
CT_DoExecLog ALL cp "${CT_CONFIG_DIR}/uClibc.config" .config
|
||||
|
||||
# uClibc uses the CROSS environment variable as a prefix to the compiler
|
||||
# tools to use. The newly built tools should be in our path, so we need
|
||||
|
@ -12,9 +12,9 @@ case "${CT_SSTRIP_FROM}" in
|
||||
}
|
||||
do_tools_sstrip_build() {
|
||||
CT_DoStep INFO "Installing sstrip"
|
||||
mkdir -p "${CT_BUILD_DIR}/build-strip"
|
||||
CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip" \
|
||||
"${CT_BUILD_DIR}/build-strip"
|
||||
cd "${CT_BUILD_DIR}/build-strip"
|
||||
( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf -
|
||||
|
||||
CT_DoLog EXTRA "Building sstrip"
|
||||
CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
|
||||
|
@ -127,9 +127,9 @@ mkdir -p "${CT_ROOT_DST_DIR}"
|
||||
CT_ROOT_SRC_DIR=$(cd "${CT_ROOT_SRC_DIR}"; pwd)
|
||||
CT_ROOT_DST_DIR=$(cd "${CT_ROOT_DST_DIR}"; pwd)
|
||||
|
||||
# Populate the destination directory with files form the source directory
|
||||
# Populate the destination directory with files from the source directory
|
||||
pushd "${CT_ROOT_SRC_DIR}" >/dev/null
|
||||
tar cf - . |tar xf - -C "${CT_ROOT_DST_DIR}"
|
||||
cp -a . "${CT_ROOT_DST_DIR}"
|
||||
popd >/dev/null
|
||||
|
||||
# A function do search for a library
|
||||
|
Loading…
x
Reference in New Issue
Block a user