build: Misc updates for new freestanding-toolchain

This commit is contained in:
mintsuki 2023-03-16 03:38:53 +01:00
parent 7d6125d413
commit fadb9a7c13
4 changed files with 17 additions and 2 deletions

View File

@ -25,7 +25,7 @@ MKESCAPE = $(subst $(SPACE),\ ,$(1))
SHESCAPE = $(subst ','\'',$(1)) SHESCAPE = $(subst ','\'',$(1))
NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1)) NASMESCAPE = $(subst ','"'$(COMMA) \"'\"$(COMMA) '"',$(1))
define DEFAULT_VAR = define PROPER_ASSIGN =
ifeq ($(origin $1),default) ifeq ($(origin $1),default)
override $(1) := $(2) override $(1) := $(2)
endif endif
@ -43,7 +43,7 @@ override BUILD_PXE := @BUILD_PXE@
override BUILD_CD := @BUILD_CD@ override BUILD_CD := @BUILD_CD@
override BUILD_LIMINE_DEPLOY := @BUILD_LIMINE_DEPLOY@ override BUILD_LIMINE_DEPLOY := @BUILD_LIMINE_DEPLOY@
$(eval $(call DEFAULT_VAR,CC,@CC@)) $(eval $(call PROPER_ASSIGN,CC,@CC@))
export CC export CC
override MKDIR_P := @MKDIR_P@ override MKDIR_P := @MKDIR_P@

View File

@ -1,6 +1,11 @@
override MAKEFLAGS += -rR override MAKEFLAGS += -rR
include $(TOOLCHAIN_FILE) include $(TOOLCHAIN_FILE)
export CC_FOR_TARGET
export LD_FOR_TARGET
export OBJDUMP_FOR_TARGET
export OBJCOPY_FOR_TARGET
export READELF_FOR_TARGET
TARGET ?= TARGET ?=
BUILDDIR ?= BUILDDIR ?=

View File

@ -1,6 +1,11 @@
override MAKEFLAGS += -rR override MAKEFLAGS += -rR
include $(TOOLCHAIN_FILE) include $(TOOLCHAIN_FILE)
export CC_FOR_TARGET
export LD_FOR_TARGET
export OBJDUMP_FOR_TARGET
export OBJCOPY_FOR_TARGET
export READELF_FOR_TARGET
BUILDDIR ?= BUILDDIR ?=

View File

@ -1,4 +1,9 @@
include $(TOOLCHAIN_FILE) include $(TOOLCHAIN_FILE)
export CC_FOR_TARGET
export LD_FOR_TARGET
export OBJDUMP_FOR_TARGET
export OBJCOPY_FOR_TARGET
export READELF_FOR_TARGET
override CC := $(CC_FOR_TARGET) override CC := $(CC_FOR_TARGET)
CFLAGS = -O2 -g -Wall -Wextra CFLAGS = -O2 -g -Wall -Wextra