Skip to contentSkip to conversation

tools: use HOSTCC/CPP to compile rombios code and helper

PATCH In review Olaf Hering 3 participants 3 messages May 18, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: use HOSTCC/CPP to compile rombios code and helper

Use also HOSTCFLAGS for biossums while touching the code.

Spotted by inspecting build logfile.

---
 tools/firmware/rombios/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/firmware/rombios/Makefile +2 -2
index 78237fd736..02abdb3038 100644
@@ -19,7 +19,7 @@ clean: subdirs-clean
 distclean: clean
 
 BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
-	gcc -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
+	$(CPP) -DBX_SMP_PROCESSORS=1 -P $< > _rombios_.c
 	bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
 	sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s
 	as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt
@@ -29,6 +29,6 @@ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
 	rm -f _rombios_.s
 
 biossums: biossums.c
-	gcc -o biossums biossums.c
+	$(HOSTCC) $(HOSTCFLAGS) -o biossums biossums.c
 
 -include $(DEPS_INCLUDE)
Acked-by on v1 1/1
#2 lore raw
In reply to Olaf Hering
Quoted 5 lines · Olaf Hering

Use also HOSTCFLAGS for biossums while touching the code.

Spotted by inspecting build logfile.

Quoted 25 lines
---
 tools/firmware/rombios/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/firmware/rombios/Makefile +2 -2
index 78237fd736..02abdb3038 100644
@@ -19,7 +19,7 @@ clean: subdirs-clean
 distclean: clean
 
 BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
-	gcc -DBX_SMP_PROCESSORS=1 -E -P $< > _rombios_.c
+	$(CPP) -DBX_SMP_PROCESSORS=1 -P $< > _rombios_.c
 	bcc -o rombios.s -C-c -D__i86__ -0 -S _rombios_.c
 	sed -e 's/^\.text//' -e 's/^\.data//' rombios.s > _rombios_.s
 	as86 _rombios_.s -b tmp.bin -u- -w- -g -0 -j -O -l rombios.txt
@@ -29,6 +29,6 @@ BIOS-bochs-latest: rombios.c biossums 32bitgateway.c tcgbios.c
 	rm -f _rombios_.s
 
 biossums: biossums.c
-	gcc -o biossums biossums.c
+	$(HOSTCC) $(HOSTCFLAGS) -o biossums biossums.c
 
 -include $(DEPS_INCLUDE)