[all-commits] [llvm/llvm-project] 47eeee: [Driver] Default LoongArch to -fno-direct-access-e...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Nov 14 00:43:56 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 47eeee297775347cbdb7624d6a766c2a3eec4a59
https://github.com/llvm/llvm-project/commit/47eeee297775347cbdb7624d6a766c2a3eec4a59
Author: Fangrui Song <i at maskray.me>
Date: 2023-11-14 (Tue, 14 Nov 2023)
Changed paths:
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/fdirect-access-external-data.c
Log Message:
-----------
[Driver] Default LoongArch to -fno-direct-access-external-data for non-PIC (#72221)
For -fno-pic, if an extern variable is defined in a DSO, a copy
relocation will be needed. However, loongarch*-linux does not and will
not support copy relocations.
Change Driver to default to -fno-direct-access-external-data for
LoongArch && non-PIC.
Keep Frontend conditions unchanged (-fdirect-access-external-data ||
-fno-direct-access-external-data && PIC>0 => direct access).
Fix #71645
More information about the All-commits
mailing list