Welcome: Pass -m to ld to fix building with clang/lld

This commit is contained in:
joshua stein 2020-01-30 21:58:32 -06:00 committed by Andreas Kling
parent c33cb8a289
commit b4568b1422
Notes: sideshowbarker 2024-07-19 09:36:58 +09:00
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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