C-SKY: Define SYSROOT_SUFFIX_SPEC.
authorXianmiao Qu <cooper.qu@linux.alibaba.com>
Tue, 10 Jan 2023 15:00:32 +0000 (23:00 +0800)
committerXianmiao Qu <cooper.qu@linux.alibaba.com>
Tue, 10 Jan 2023 11:57:49 +0000 (19:57 +0800)
The earlier patch
  https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575418.html
refine the way to generate sysroot suffix, but it can't find the
right path for all CPUs. The SYSROOT_SUFFIX_SPEC should be defined
to fix it.

gcc/
* config/csky/csky-linux-elf.h (SYSROOT_SUFFIX_SPEC): New.

gcc/config/csky/csky-linux-elf.h

index 677c201..3f67af6 100644 (file)
 
 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-cskyv2%{mfloat-abi=hard:-hf}%{mbig-endian:-be}.so.1"
 
+#define SYSROOT_SUFFIX_SPEC                                    \
+  "%{mbig-endian:/big}"                                                \
+  "%{mcpu=ck807*:/ck807}"                                      \
+  "%{mcpu=ck860*:/ck860}"                                      \
+  "%{mcpu=ck800*:/ck800}"                                      \
+  "%{mfloat-abi=softfp:/soft-fp}"                              \
+  "%{mfloat-abi=hard:/hard-fp}"
+
 #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v}            \
    %{b}                                                                \
    %{static:-Bstatic}                                          \