From cb101bdad6181fa8217180a81fb3a6f31f5c6c91 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 23 Nov 2018 00:03:51 -0500 Subject: [PATCH] BootRules: Fix BuildMBR under Clang. We need to force -m32 here, and we also need to tell Clang that we want to allow relocations in .text. Clang builds now get to kernel entry, but the bootloader fails to load the early-boot modules with strange remapping errors, and so panics with "get boot partitions failed!" --- build/jam/BootRules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/jam/BootRules b/build/jam/BootRules index 2e18934804..6095e9d21b 100644 --- a/build/jam/BootRules +++ b/build/jam/BootRules @@ -221,6 +221,6 @@ actions BuildMBR { $(RM) $(1) $(HAIKU_CC_$(HAIKU_PACKAGING_ARCH)) $(HAIKU_LINKFLAGS_$(HAIKU_PACKAGING_ARCH)) \ - $(2) -o $(1) $(MBRFLAGS) -nostdlib -Xlinker --oformat=binary \ + $(2) -o $(1) $(MBRFLAGS) -nostdlib -m32 -Wl,--oformat,binary -Wl,-z,notext \ -Xlinker -S -Xlinker -N -Xlinker --entry=start -Xlinker -Ttext=0x600 }