diff options
author | Xianmiao Qu <cooper.qu@linux.alibaba.com> | 2023-01-25 00:14:46 +0800 |
---|---|---|
committer | Xianmiao Qu <cooper.qu@linux.alibaba.com> | 2023-01-25 00:14:46 +0800 |
commit | 4d518ed1c0edbfff5208e09616f98ea412b55c52 (patch) | |
tree | 828e4e545248102b1b73e3cfedd6d700bebc8c82 /gcc/config.gcc | |
parent | f31fa9ea35ebcf221a2abaacba5511225f5d036e (diff) | |
download | gcc-4d518ed1c0edbfff5208e09616f98ea412b55c52.zip gcc-4d518ed1c0edbfff5208e09616f98ea412b55c52.tar.gz gcc-4d518ed1c0edbfff5208e09616f98ea412b55c52.tar.bz2 |
C-SKY: Fix wrong sysroot suffix when disable multilib.
The SYSROOT_SUFFIX_SPEC works even when multilib is disabled.
So when build no-multilib glibc toolchain and the options are
not same as MULTILIB_DEFAULTS, the sysroot will specify wrong
because the libc will not be installed as such.
This bug causes glibc regression test error:
https://sourceware.org/pipermail/libc-testresults/2023q1/010706.html
The error is:
/scratch/jmyers/glibc-bot/install/compilers/csky-linux-gnuabiv2/csky-glibc-linux-gnuabiv2/bin/ld: cannot find -lc: No such file or directory
gcc/
* config.gcc(csky-*-linux*): Define CSKY_ENABLE_MULTILIB
and only include 'csky/t-csky-linux' when enable multilib.
* config/csky/csky-linux-elf.h(SYSROOT_SUFFIX_SPEC): Don't
define it when disable multilib.
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index d828223..89f5604 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1642,7 +1642,12 @@ csky-*-*) ;; csky-*-linux*) tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} csky/csky-linux-elf.h" - tmake_file="${tmake_file} csky/t-csky csky/t-csky-linux" + tmake_file="${tmake_file} csky/t-csky" + + if test "x${enable_multilib}" = xyes ; then + tm_defines="$tm_defines CSKY_ENABLE_MULTILIB" + tmake_file="${tmake_file} csky/t-csky-linux" + fi case ${target} in csky-*-linux-gnu*) |