File 0022-extlinux-Build-with-host-gcc.patch of Package syslinux

From 9ab1f080c791828ff16f6410d5ea6d7d86e0bcd3 Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Sun, 22 Oct 2023 21:07:04 +0200
Subject: [PATCH 22/22] extlinux: Build with host gcc

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 extlinux/Makefile | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/extlinux/Makefile b/extlinux/Makefile
index 623fb899..d8d890aa 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -15,6 +15,7 @@
 ##
 
 include $(MAKEDIR)/syslinux.mk
+include $(MAKEDIR)/build-host.mk
 
 OPTFLAGS = -g -Os
 INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller
@@ -53,16 +54,9 @@ spotless: clean
 installer: extlinux
 
 extlinux: $(OBJS)
-	$(CC) $(LDFLAGS) -o $@ $^
+	$(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^
 
 strip:
 	$(STRIP) extlinux
 
-%.o: %.c
-	$(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
-%.i: %.c
-	$(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
-%.s: %.c
-	$(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
-
 -include .*.d
-- 
2.42.0

openSUSE Build Service is sponsored by