diff options
author | Chris Packham <judge.packham@gmail.com> | 2022-09-11 15:06:23 +1200 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2022-09-26 10:46:28 +1300 |
commit | 1b475008757aecd671a2ba3be70c42c8f4187c99 (patch) | |
tree | 366454c16177914212c1a58bf2ed5415d247059e /scripts | |
parent | c803bb71f65be256152d55f30897f057f1618acc (diff) | |
download | crosstool-ng-1b475008757aecd671a2ba3be70c42c8f4187c99.tar.gz crosstool-ng-1b475008757aecd671a2ba3be70c42c8f4187c99.tar.bz2 crosstool-ng-1b475008757aecd671a2ba3be70c42c8f4187c99.zip |
cc/gcc: Use canon_prefix when dealing with moved libraries
${CT_PREFIX_DIR} may contain relative paths (e.g.
"${CT_TOP_DIR}/../x-tools/${CT_TARGET}"). Code added in commit d83a0036
("Add symlinks from the libraries' original location to the new one.")
didn't cope well with this. As we're already calculating
${cannon_prefix} make use of it when adding the symlinks. This avoids
any issues with ${CT_PREFIX_DIR}.
Fixes #1807
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/cc/gcc.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index bec66c2e..d75ad986 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -804,7 +804,7 @@ gcc_movelibs() # Move only files, directories are for other multilibs. We're looking inside # GCC's directory structure, thus use unmangled multi_os_dir that GCC reports. - gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir_gcc}" + gcc_dir="${canon_prefix}/${CT_TARGET}/lib/${multi_os_dir_gcc}" if [ ! -d "${gcc_dir}" ]; then # GCC didn't install anything outside of sysroot return @@ -817,7 +817,7 @@ gcc_movelibs() dst_dir="${canon_root}/lib/${multi_os_dir}" fi CT_SanitizeVarDir dst_dir gcc_dir - rel=$( echo "${gcc_dir#${CT_PREFIX_DIR}/}" | sed 's#[^/]\{1,\}#..#g' ) + rel=$( echo "${gcc_dir#${canon_prefix}/}" | sed 's#[^/]\{1,\}#..#g' ) ls "${gcc_dir}" | while read f; do case "${f}" in |