aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.cc
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-02-13 18:38:53 +0800
committerLulu Cheng <chenglulu@loongson.cn>2023-02-18 15:29:31 +0800
commit017849d9d88f021770a90f12fffec9aa2425ed27 (patch)
tree79ce114bc4e7a2f54e0e34bd31241d9601e6730d /gcc/c/c-parser.cc
parenta7d8c40484c31a74a2c2bb17d835d60ba7dd8d29 (diff)
downloadgcc-017849d9d88f021770a90f12fffec9aa2425ed27.zip
gcc-017849d9d88f021770a90f12fffec9aa2425ed27.tar.gz
gcc-017849d9d88f021770a90f12fffec9aa2425ed27.tar.bz2
LoongArch: Fix multiarch tuple canonization
Multiarch tuple will be coded in file or directory names in multiarch-aware distros, so one ABI should have only one multiarch tuple. For example, "--target=loongarch64-linux-gnu --with-abi=lp64s" and "--target=loongarch64-linux-gnusf" should both set multiarch tuple to "loongarch64-linux-gnusf". Before this commit, "--target=loongarch64-linux-gnu --with-abi=lp64s --disable-multilib" will produce wrong result (loongarch64-linux-gnu). A recent LoongArch psABI revision mandates "loongarch64-linux-gnu" to be used for -mabi=lp64d (instead of "loongarch64-linux-gnuf64") for some non-technical reason [1]. Note that we cannot make "loongarch64-linux-gnuf64" an alias for "loongarch64-linux-gnu" because to implement such an alias, we must create thousands of symlinks in the distro and doing so would be completely unpractical. This commit also aligns GCC with the revision. Tested by building cross compilers with --enable-multiarch and multiple combinations of --target=loongarch64-linux-gnu*, --with-abi=lp64{s,f,d}, and --{enable,disable}-multilib; and run "xgcc --print-multiarch" then manually verify the result with eyesight. [1]: https://github.com/loongson/LoongArch-Documentation/pull/80 gcc/ChangeLog: * config.gcc (triplet_abi): Set its value based on $with_abi, instead of $target. (la_canonical_triplet): Set it after $triplet_abi is set correctly. * config/loongarch/t-linux (MULTILIB_OSDIRNAMES): Make the multiarch tuple for lp64d "loongarch64-linux-gnu" (without "f64" suffix).
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions