From ba4f921239ba4ca71903f737b6ec7e93a864f092 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Duje=20Mihanovi=C4=87?= Date: Fri, 1 Jul 2022 21:38:43 +0200 Subject: [PATCH] all: Export {C,LD,AS}FLAGS This makes applying custom compiler/linker/assembler flags actually work. --- Makefile | 3 +++ boot/x86/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4e5ae9a..cc92307 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ export CC = gcc export QEMU = qemu-system-i386 -monitor stdio export GIT_REV = $(shell git describe --long HEAD) export REAL_CC = $(CROSS_COMPILE)$(CC) +export CFLAGS +export LDFLAGS +export ASFLAGS MAKEFLAGS += -rR default: kernel/kernel.elf bootloader diff --git a/boot/x86/Makefile b/boot/x86/Makefile index 3d12d12..89891a8 100644 --- a/boot/x86/Makefile +++ b/boot/x86/Makefile @@ -14,6 +14,6 @@ clean: # Implicit rules %: %.s - $(AS) $(ASFLAGS_BASE) -f bin $< -o $@ + $(AS) $(ASFLAGS_BASE) $(ASFLAGS) -f bin $< -o $@ .PHONY : default clean stage3 -- 2.39.2