From 5c9d51ef001b878ef17ab550b8da4f9ff156e2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Wed, 5 Feb 2020 16:19:44 +0100 Subject: [PATCH] m68k: make sure boot & kernel code can run on 020-060 Change-Id: I5830085fcd6120600ff3be85a2fdd2602e1935fe Reviewed-on: https://review.haiku-os.org/c/haiku/+/2221 Reviewed-by: Adrien Destugues --- build/jam/ArchitectureRules | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/build/jam/ArchitectureRules b/build/jam/ArchitectureRules index 96878252bb..eff6fde919 100644 --- a/build/jam/ArchitectureRules +++ b/build/jam/ArchitectureRules @@ -432,8 +432,8 @@ rule KernelArchitectureSetup architecture case m68k : # We don't want to have to handle emulating missing FPU opcodes for # 040 and 060 in the kernel. - HAIKU_KERNEL_CCFLAGS += -mtune=68020-60 ; - HAIKU_KERNEL_C++FLAGS += -mtune=68020-60 ; + HAIKU_KERNEL_CCFLAGS += -m68020-60 ; + HAIKU_KERNEL_C++FLAGS += -m68020-60 ; case riscv64 : # Kernel lives within any single 2 GiB address space. @@ -518,6 +518,17 @@ rule KernelArchitectureSetup architecture HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ; HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ; } + case *_m68k : + # TODO: make sure all m68k bootloaders are non-PIC + HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fno-pic -Wno-error=main ; + HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -fno-pic -Wno-error=main ; + switch $(cpu) { + case m68k : + # use only common instructions by default + HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -m68020-60 ; + HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -m68020-60 ; + # TODO: coldfire (FireBee) + } case * : # all other bootloaders are non-PIC HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -fno-pic -Wno-error=main ;