repo/extra/mold/patches/amd64_only.patch
2023-08-21 18:26:58 -05:00

50 lines
1.4 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c4f1f9..78cc7c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -288,8 +288,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# compiler instances. This is hacky but greatly reduces compile time
# on a multicore machine.
list(APPEND MOLD_ELF_TARGETS
- X86_64 I386 ARM64 ARM32 RV32LE RV32BE RV64LE RV64BE PPC32 PPC64V1 PPC64V2
- S390X SPARC64 M68K SH4 ALPHA MIPS64LE MIPS64BE LOONGARCH32 LOONGARCH64)
+ X86_64)
list(APPEND MOLD_ELF_TEMPLATE_FILES
elf/arch-loongarch.cc
@@ -362,18 +361,6 @@ target_sources(mold PRIVATE
common/perf.cc
common/tar.cc
common/uuid.cc
- elf/arch-alpha.cc
- elf/arch-arm32.cc
- elf/arch-arm64.cc
- elf/arch-i386.cc
- elf/arch-m68k.cc
- elf/arch-mips64.cc
- elf/arch-ppc32.cc
- elf/arch-ppc64v1.cc
- elf/arch-ppc64v2.cc
- elf/arch-s390x.cc
- elf/arch-sh4.cc
- elf/arch-sparc64.cc
elf/arch-x86-64.cc
elf/elf.cc
git-hash.cc
diff --git a/elf/main.cc b/elf/main.cc
index 90ceed9..2452cbd 100644
--- a/elf/main.cc
+++ b/elf/main.cc
@@ -408,11 +408,6 @@ int elf_main(int argc, char **argv) {
if (ctx.arg.emulation.empty())
ctx.arg.emulation = deduce_machine_type(ctx, file_args);
- // Redo if -m is not x86-64.
- if constexpr (is_x86_64<E>)
- if (ctx.arg.emulation != X86_64::target_name)
- return redo_main<E>(argc, argv, ctx.arg.emulation);
-
Timer t_all(ctx, "all");
install_signal_handler();