repo/extra/mold/patches/elf_amd64_only.patch

61 lines
1.7 KiB
Diff
Raw Normal View History

2022-12-27 02:28:51 +00:00
From 979677eb2560122138c5857b4c2b8e387220a0cd Mon Sep 17 00:00:00 2001
Message-Id: <979677eb2560122138c5857b4c2b8e387220a0cd.1672107964.git.owen@owenrafferty.com>
From: Owen Rafferty <owen@owenrafferty.com>
Date: Mon, 26 Dec 2022 20:20:01 -0600
Subject: [PATCH] only build support for elf amd64
---
CMakeLists.txt | 12 +-----------
elf/main.cc | 5 -----
2 files changed, 1 insertion(+), 16 deletions(-)
2022-09-27 17:10:15 +00:00
diff --git a/CMakeLists.txt b/CMakeLists.txt
2022-12-27 02:28:51 +00:00
index 6b985719..0779117c 100644
2022-09-27 17:10:15 +00:00
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
2022-12-27 02:28:51 +00:00
@@ -275,8 +275,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
2022-11-13 06:22:42 +00:00
# compiler instances. This is hacky but greatly reduces compile time
# on a multicore machine.
2022-09-27 17:10:15 +00:00
list(APPEND MOLD_ELF_TARGETS
2022-10-19 16:53:39 +00:00
- X86_64 I386 ARM64 ARM32 RV32LE RV32BE RV64LE RV64BE
2022-11-13 06:22:42 +00:00
- PPC64V1 PPC64V2 S390X SPARC64 M68K)
2022-09-27 17:10:15 +00:00
+ X86_64)
list(APPEND MOLD_ELF_TEMPLATE_FILES
elf/cmdline.cc
2022-12-27 02:28:51 +00:00
@@ -337,15 +336,6 @@ endif()
2022-09-27 17:10:15 +00:00
target_sources(mold PRIVATE
compress.cc
demangle.cc
- elf/arch-arm32.cc
- elf/arch-arm64.cc
- elf/arch-i386.cc
2022-11-13 06:22:42 +00:00
- elf/arch-m68k.cc
2022-10-19 16:53:39 +00:00
- elf/arch-ppc64v1.cc
2022-09-27 17:10:15 +00:00
- elf/arch-ppc64v2.cc
- elf/arch-riscv.cc
2022-10-19 16:53:39 +00:00
- elf/arch-s390x.cc
2022-09-27 17:10:15 +00:00
- elf/arch-sparc64.cc
elf/arch-x86-64.cc
filepath.cc
git-hash.cc
diff --git a/elf/main.cc b/elf/main.cc
2022-12-27 02:28:51 +00:00
index ed5b3c03..8bd193f1 100644
2022-09-27 17:10:15 +00:00
--- a/elf/main.cc
+++ b/elf/main.cc
2022-12-27 02:28:51 +00:00
@@ -381,11 +381,6 @@ int elf_main(int argc, char **argv) {
2022-09-27 17:10:15 +00:00
if (ctx.arg.emulation == MachineType::NONE)
ctx.arg.emulation = deduce_machine_type(ctx, file_args);
- // Redo if -m is not x86-64.
2022-10-19 16:53:39 +00:00
- if constexpr (std::is_same_v<E, X86_64>)
- if (ctx.arg.emulation != MachineType::X86_64)
- return redo_main<E>(argc, argv, ctx.arg.emulation);
2022-09-27 17:10:15 +00:00
-
Timer t_all(ctx, "all");
install_signal_handler();
2022-12-27 02:28:51 +00:00
--
2.39.0