mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-06-20 00:03:53 +00:00
Fix xtensa overlays
They are unpacked properly, but fail during build. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
@ -415,7 +415,7 @@ config OVERLAY_NAME
|
|||||||
'<ARCH>_<OVERLAY_NAME>.tar' (optionally, with .gz/.bz2/.lzma/.xz
|
'<ARCH>_<OVERLAY_NAME>.tar' (optionally, with .gz/.bz2/.lzma/.xz
|
||||||
extension).
|
extension).
|
||||||
|
|
||||||
Leave blank to use the default '<ARCH>-overlay.tar'.
|
Leave blank to use the default '<ARCH>_overlay.tar'.
|
||||||
For more information about this option, please also consult the
|
For more information about this option, please also consult the
|
||||||
section 'Using crosstool-NG to build Xtensa toolchains' in the
|
section 'Using crosstool-NG to build Xtensa toolchains' in the
|
||||||
in http://crosstool-ng.github.io/docs/caveats-features/
|
in http://crosstool-ng.github.io/docs/caveats-features/
|
||||||
|
@ -641,11 +641,8 @@ CT_GetFileExtension()
|
|||||||
shift
|
shift
|
||||||
local first_ext="$1"
|
local first_ext="$1"
|
||||||
|
|
||||||
# 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 ${first_ext} $(CT_DoListTarballExt); do
|
for ext in ${first_ext} $(CT_DoListTarballExt); do
|
||||||
if [ -e "${CT_TARBALLS_DIR}/${file}${ext}" -o -L "${CT_TARBALLS_DIR}/${file}${ext}" ]; then
|
if [ -e "${file}${ext}" -o -L "${file}${ext}" ]; then
|
||||||
echo "${ext}"
|
echo "${ext}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -723,8 +720,8 @@ CT_GetLocal() {
|
|||||||
local ext
|
local ext
|
||||||
|
|
||||||
# Do we already have it in *our* tarballs dir?
|
# Do we already have it in *our* tarballs dir?
|
||||||
if ext="$( CT_GetFileExtension "${basename}" ${first_ext} )"; then
|
if ext="$( CT_GetFileExtension "${CT_TARBALLS_DIR}/${basename}" ${first_ext} )"; then
|
||||||
CT_DoLog DEBUG "Already have '${basename}'"
|
CT_DoLog DEBUG "Already have '${CT_TARBALLS_DIR}/${basename}${ext}'"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -1866,7 +1863,7 @@ CT_DoExtractPatch()
|
|||||||
archive="${basename}"
|
archive="${basename}"
|
||||||
fi
|
fi
|
||||||
# TBD save/discover the extension while fetching
|
# TBD save/discover the extension while fetching
|
||||||
ext=`CT_GetFileExtension "${archive}"`
|
ext=`CT_GetFileExtension "${CT_TARBALLS_DIR}/${archive}"`
|
||||||
if [ "${archive_dirname}" = "." ]; then
|
if [ "${archive_dirname}" = "." ]; then
|
||||||
CT_mkdir_pushd "${CT_COMMON_SRC_DIR}/${basename}"
|
CT_mkdir_pushd "${CT_COMMON_SRC_DIR}/${basename}"
|
||||||
CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}/${basename}"
|
CT_Extract "${CT_TARBALLS_DIR}/${archive}${ext}" "${CT_COMMON_SRC_DIR}/${basename}"
|
||||||
@ -1959,13 +1956,28 @@ CT_DoExtractPatch()
|
|||||||
CT_Abort "Neither file nor directory: ${custom_location}"
|
CT_Abort "Neither file nor directory: ${custom_location}"
|
||||||
fi
|
fi
|
||||||
elif [ "${CT_TARGET_USE_OVERLAY}" = "y" ]; then
|
elif [ "${CT_TARGET_USE_OVERLAY}" = "y" ]; then
|
||||||
# Possibly has overlays; copy from common source and apply overlays if any
|
# Possibly has overlays; check and if it has, copy from common source and apply
|
||||||
|
# overlays.
|
||||||
local overlay
|
local overlay
|
||||||
|
|
||||||
CT_DoExecLog ALL cp -av "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
|
if [ ! -d "${CT_BUILD_DIR}/overlay" ]; then
|
||||||
overlay="${CT_OVERLAY_LOCATION}/${CT_ARCH}-${CT_OVERLAY_NAME:-overlay}"
|
CT_DoLog ALL mkdir -p "${CT_BUILD_DIR}/overlay"
|
||||||
ext=`CT_GetFileExtension "${overlay}"`
|
overlay="${CT_OVERLAY_LOCATION}/${CT_ARCH}_${CT_OVERLAY_NAME:-overlay}"
|
||||||
CT_Extract "${overlay}${ext}" "${CT_SRC_DIR}" "${dir_name}"
|
ext=`CT_GetFileExtension "${overlay}"`
|
||||||
|
if [ ! -r "${overlay}${ext}" ]; then
|
||||||
|
CT_Abort "Overlay ${overlay} not found"
|
||||||
|
fi
|
||||||
|
CT_Extract "${overlay}${ext}" "${CT_BUILD_DIR}/overlay"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "${CT_BUILD_DIR}/overlay/${dir_name}" ]; then
|
||||||
|
CT_DoExecLog ALL cp -a "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
|
||||||
|
tar cf - -C "${CT_BUILD_DIR}/overlay" "${dir_name}" | \
|
||||||
|
CT_DoExecLog FILE tar xvf - -C "${CT_SRC_DIR}"
|
||||||
|
else
|
||||||
|
# No overlay for this component, just symlink
|
||||||
|
CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# Common source, just symlink
|
# Common source, just symlink
|
||||||
CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
|
CT_DoExecLog ALL ln -s "${CT_COMMON_SRC_DIR}/${basename}" "${CT_SRC_DIR}/${dir_name}"
|
||||||
|
Reference in New Issue
Block a user