[PATCH v1] tools: use HOSTCC/CPP to compile rombios code and helper

Olaf Hering posted 1 patch 22 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200518144400.16708-1-olaf@aepfle.de
Maintainers: "Roger Pau Monné" <roger.pau@citrix.com>, Wei Liu <wl@xen.org>, Jan Beulich <jbeulich@suse.com>, Ian Jackson <ian.jackson@eu.citrix.com>, Andrew Cooper <andrew.cooper3@citrix.com>
tools/firmware/rombios/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v1] tools: use HOSTCC/CPP to compile rombios code and helper

Posted by Olaf Hering 22 weeks ago
Use also HOSTCFLAGS for biossums while touching the code.

Spotted by inspecting build logfile.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/firmware/rombios/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/firmware/rombios/Makefile b/tools/firmware/rombios/Makefile
index 78237fd736..02abdb3038 100644
--- a/tools/firmware/rombios/Makefile
+++ b/tools/firmware/rombios/Makefile
@@ -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)

Re: [PATCH v1] tools: use HOSTCC/CPP to compile rombios code and helper

Posted by Wei Liu 22 weeks ago
On Mon, May 18, 2020 at 04:44:00PM +0200, Olaf Hering wrote:
> Use also HOSTCFLAGS for biossums while touching the code.
> 
> Spotted by inspecting build logfile.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Acked-by: Wei Liu <wl@xen.org>

> ---
>  tools/firmware/rombios/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/firmware/rombios/Makefile b/tools/firmware/rombios/Makefile
> index 78237fd736..02abdb3038 100644
> --- a/tools/firmware/rombios/Makefile
> +++ b/tools/firmware/rombios/Makefile
> @@ -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)

Re: [PATCH v1] tools: use HOSTCC/CPP to compile rombios code and helper

Posted by Andrew Cooper 22 weeks ago
On 18/05/2020 15:44, Olaf Hering wrote:
> Use also HOSTCFLAGS for biossums while touching the code.
>
> Spotted by inspecting build logfile.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>