t-crtstuff revision 1.1.1.2 1 1.1 mrg # -fasynchronous-unwind-tables is on by default for LoongArch.
2 1.1 mrg # We turn it off for crt*.o because it would make __EH_FRAME_BEGIN__ point
3 1.1 mrg # to .eh_frame data from crtbeginT.o instead of the user-defined object
4 1.1 mrg # during static linking.
5 1.1 mrg CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
6 1.1.1.2 mrg
7 1.1.1.2 mrg # As shown in the test case PR118844, when using lld for linking,
8 1.1.1.2 mrg # it fails due to B26 in crtbeginS.o causing the link to exceed the range.
9 1.1.1.2 mrg # Therefore, the issue was resolved by adding the compilation option
10 1.1.1.2 mrg # "-mcmodel=extreme" when compiling crtbeginS.o.
11 1.1.1.2 mrg CRTSTUFF_T_CFLAGS_S += -mcmodel=extreme
12