@@ -1151,6 +1151,7 @@ defvar LibmHasFrexpF128 = LibcallImpls<(add frexp_f128), isNotOSWindowsOrIsCygwi
11511151defvar LibmHasLdexpF128 = LibcallImpls<(add ldexp_f128), isNotOSWindowsOrIsCygwinMinGW>;
11521152
11531153defvar has__stack_chk_fail = LibcallImpls<(add __stack_chk_fail), isNotOSOpenBSD>;
1154+ defvar has__stack_smash_handler = LibcallImpls<(add __stack_smash_handler), isOSOpenBSD>;
11541155
11551156//===----------------------------------------------------------------------===//
11561157// Objective-C Runtime Libcalls
@@ -1229,7 +1230,7 @@ def AArch64SystemLibrary : SystemRuntimeLibrary<
12291230 DarwinExp10, DarwinSinCosStret,
12301231 LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
12311232 DefaultLibmExp10,
1232- has__stack_chk_fail)
1233+ has__stack_chk_fail, has__stack_smash_handler )
12331234>;
12341235
12351236// Prepend a # to every name
@@ -1506,7 +1507,7 @@ def ARMSystemLibrary
15061507 LibcallImpls<(add __divmodsi4, __udivmodsi4),
15071508 RuntimeLibcallPredicate<[{TT.isOSBinFormatMachO() &&
15081509 (!TT.isiOS() || !TT.isOSVersionLT(5, 0))}]>>,
1509- has__stack_chk_fail)> {
1510+ has__stack_chk_fail, has__stack_smash_handler )> {
15101511 let DefaultLibcallCallingConv = LibcallCallingConv<[{
15111512 (!TT.isOSDarwin() && !TT.isiOS() && !TT.isWatchOS() && !TT.isDriverKit()) ?
15121513 (FloatABI == FloatABI::Hard ? CallingConv::ARM_AAPCS_VFP
@@ -2015,7 +2016,7 @@ def PPCSystemLibrary
20152016 LibmHasSinCosPPCF128,
20162017 AvailableIf<memcpy, isNotAIX>,
20172018 LibcallImpls<(add Int128RTLibcalls), isPPC64>,
2018- has__stack_chk_fail)>;
2019+ has__stack_chk_fail, has__stack_smash_handler )>;
20192020
20202021//===----------------------------------------------------------------------===//
20212022// RISCV Runtime Libcalls
@@ -2030,7 +2031,7 @@ def RISCVSystemLibrary
20302031 exp10f, exp10, exp10l_f128,
20312032 __riscv_flush_icache,
20322033 LibcallImpls<(add Int128RTLibcalls), isRISCV64>,
2033- has__stack_chk_fail)>;
2034+ has__stack_chk_fail, has__stack_smash_handler )>;
20342035
20352036//===----------------------------------------------------------------------===//
20362037// SPARC Runtime Libcalls
@@ -2098,7 +2099,7 @@ def SPARCSystemLibrary
20982099 LibcallImpls<(add _Q_qtoll, _Q_qtoull, _Q_lltoq, _Q_ulltoq), isSPARC32>,
20992100 LibcallImpls<(add SPARC64_MulDivCalls, Int128RTLibcalls), isSPARC64>,
21002101 LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
2101- has__stack_chk_fail)
2102+ has__stack_chk_fail, has__stack_smash_handler )
21022103>;
21032104
21042105//===----------------------------------------------------------------------===//
@@ -2159,7 +2160,8 @@ defvar X86CommonLibcalls =
21592160 // FIXME: MSVCRT doesn't have powi. The f128 case is added as a
21602161 // hack for one test relying on it.
21612162 __powitf2_f128,
2162- has__stack_chk_fail
2163+ has__stack_chk_fail,
2164+ has__stack_smash_handler
21632165);
21642166
21652167defvar Windows32DivRemMulCalls =
@@ -2328,5 +2330,6 @@ def LegacyDefaultSystemLibrary
23282330 exp10f, exp10, exp10l_f128,
23292331 __powisf2, __powidf2, __powitf2_f128,
23302332 LibcallImpls<(add Int128RTLibcalls), isArch64Bit>,
2331- has__stack_chk_fail
2333+ has__stack_chk_fail,
2334+ has__stack_smash_handler
23322335)>;
0 commit comments