diff mbox series

[sgabios] Makefile: Add HOSTCC

Message ID 489fd750574cf761c1f083eaa7d2306e41035004.1522004432.git.crobinso@redhat.com
State New
Headers show
Series [sgabios] Makefile: Add HOSTCC | expand

Commit Message

Cole Robinson March 25, 2018, 7:03 p.m. UTC
From: Paolo Bonzini <pbonzini@redhat.com>


 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.16.2

Comments

Cole Robinson July 3, 2018, 2:40 p.m. UTC | #1
I probably should have added more context here...

We carry this patch to sgabios in Fedora to enable cross compilation. It
would be nice to get it into the qemu sgabios git repo so we don't have
to track it downstream anymore

Thanks,
Cole

On 03/25/2018 03:03 PM, Cole Robinson wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>

> 

>  Makefile | 3 ++-

>  1 file changed, 2 insertions(+), 1 deletion(-)

> 

> diff --git a/Makefile b/Makefile

> index 970b0ff..c8cb92b 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -30,6 +30,7 @@ ASFLAGS += -DBUILD_USER="$(BUILD_USER)"

>  LDSCRIPT := rom16.ld

>  LDFLAGS := -T $(LDSCRIPT) -nostdlib

>  OBJCOPY := objcopy

> +HOSTCC := $(CC)

>  

>  ASRCS = sgabios.S

>  

> @@ -55,7 +56,7 @@ sgabios.elf: .depend $(OBJS) $(LDSCRIPT) csum8

>  	$(LD) $(LDFLAGS) $(OBJS) -o $@

>  

>  csum8: csum8.c

> -	$(CC) -Wall -O2 -o $@ $<

> +	$(HOSTCC) -Wall -O2 -o $@ $<

>  

>  sgabios.o: buildinfo

>  

>
Paolo Bonzini July 15, 2018, 2:48 p.m. UTC | #2
On 03/07/2018 16:40, Cole Robinson wrote:
> I probably should have added more context here...

> 

> We carry this patch to sgabios in Fedora to enable cross compilation. It

> would be nice to get it into the qemu sgabios git repo so we don't have

> to track it downstream anymore

> 

> Thanks,

> Cole


Applied to sgabios.git, thanks!

Paolo
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 970b0ff..c8cb92b 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@  ASFLAGS += -DBUILD_USER="$(BUILD_USER)"
 LDSCRIPT := rom16.ld
 LDFLAGS := -T $(LDSCRIPT) -nostdlib
 OBJCOPY := objcopy
+HOSTCC := $(CC)
 
 ASRCS = sgabios.S
 
@@ -55,7 +56,7 @@  sgabios.elf: .depend $(OBJS) $(LDSCRIPT) csum8
 	$(LD) $(LDFLAGS) $(OBJS) -o $@
 
 csum8: csum8.c
-	$(CC) -Wall -O2 -o $@ $<
+	$(HOSTCC) -Wall -O2 -o $@ $<
 
 sgabios.o: buildinfo