From b4568b1422c05ae1b50e6c96d262bb44b8a2f3d8 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Thu, 30 Jan 2020 21:58:32 -0600 Subject: [PATCH] Welcome: Pass -m to ld to fix building with clang/lld --- Applications/Welcome/Makefile | 3 ++- Makefile.common | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Applications/Welcome/Makefile b/Applications/Welcome/Makefile index 9fc91bca6b..7299b09e5b 100644 --- a/Applications/Welcome/Makefile +++ b/Applications/Welcome/Makefile @@ -9,6 +9,7 @@ LIB_DEPS = GUI Draw IPC Core .SUFFIXES: .png %.png.o: %.png - @echo "LINK $<"; $(LINK) --relocatable --format binary --output $@ $< + @echo "LINK $<" + $(QUIET) $(LINK) --relocatable --format binary -m elf_$(ARCH) --output $@ $< include ../../Makefile.common diff --git a/Makefile.common b/Makefile.common index 924ae18ffa..33df9ab2d9 100644 --- a/Makefile.common +++ b/Makefile.common @@ -40,6 +40,7 @@ ifneq ($(USE_HOST_CXX),) AS = as LINK = ld OBJ_SUFFIX ?= .host + ARCH = $(shell arch -s) else TOOLCHAIN_PATH = $(SERENITY_BASE_DIR)/Toolchain/Local/bin CXX = $(PRE_CXX) $(TOOLCHAIN_PATH)/i686-pc-serenity-g++ @@ -48,6 +49,7 @@ else LINK = $(TOOLCHAIN_PATH)/i686-pc-serenity-ld RANLIB = $(TOOLCHAIN_PATH)/i686-pc-serenity-ranlib AR = $(TOOLCHAIN_PATH)/i686-pc-serenity-ar + ARCH = i386 DEFINES += -DDEBUG