8000 Switch to -mcmodel=small -fpic on two platforms · python/cpython@57a8019 · GitHub
[go: up one dir, main page]

Skip to content

Commit 57a8019

Browse files
committed
Switch to -mcmodel=small -fpic on two platforms
1 parent c8b5073 commit 57a8019

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Tools/jit/build.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,12 +1039,8 @@ def _handle_relocation(
10391039
f"-ffreestanding", # XXX
10401040
# We don't need this (and it causes weird relocations):
10411041
f"-fno-asynchronous-unwind-tables", # XXX
1042-
# # Disable stack-smashing canaries, which use magic symbols:
1043-
# f"-fno-stack-protector", # XXX
10441042
# The GHC calling convention uses %rbp as an argument-passing register:
10451043
f"-fomit-frame-pointer", # XXX
1046-
# # Disable debug info:
1047-
# f"-g0", # XXX
10481044
]
10491045

10501046

@@ -1220,16 +1216,12 @@ def dump(self) -> str:
12201216

12211217
def main(host: str) -> None:
12221218
for engine, ghccc, cflags in [
1223-
(aarch64_apple_darwin, False, [f"-I{ROOT}", "-fno-pic", "-mcmodel=large"]),
1219+
(aarch64_apple_darwin, False, [f"-I{ROOT}"]),
12241220
(aarch64_unknown_linux_gnu, False, [f"-I{ROOT}", "-fno-pic", "-mcmodel=large"]),
12251221
(i686_pc_windows_msvc, True, [f"-I{PC}", "-fno-pic", "-mcmodel=large"]),
12261222
(x86_64_apple_darwin, True, [f"-I{ROOT}", "-fno-pic", "-mcmodel=large"]),
12271223
(x86_64_pc_windows_msvc, True, [f"-I{PC}", "-fno-pic", "-mcmodel=large"]),
1228-
# (x86_64_unknown_linux_gnu, True, [f"-I{ROOT}", "-fpic", "-mcmodel=large"]), # XXX
1229-
# (x86_64_unknown_linux_gnu, True, [f"-I{ROOT}", "-fno-pic", "-mcmodel=large"]), # XXX
1230-
# (x86_64_unknown_linux_gnu, True, [f"-I{ROOT}", "-fpic", "-mcmodel=medium"]), # XXX
1231-
(x86_64_unknown_linux_gnu, True, [f"-I{ROOT}", "-fno-pic", "-mcmodel=medium"]), # XXX
1232-
# (x86_64_unknown_linux_gnu, True, [f"-I{ROOT}", "-fpic", "-mcmodel=small"]), # XXX
1224+
(x86_64_unknown_linux_gnu, True, [f"-I{ROOT}"]),
12331225
]:
12341226
if engine.pattern.fullmatch(host):
12351227
break

0 commit comments

Comments
 (0)
0