]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
configure: Allow HOST_CC to override CC
authorGlenn Washburn <development@efficientek.com>
Fri, 18 Mar 2022 06:41:35 +0000 (01:41 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 4 Apr 2022 16:24:39 +0000 (18:24 +0200)
According to the INSTALL, "The HOST_* variables override not prefixed
variables". This change makes it so, instead of previous behavior, which
was to ignore the HOST_CC environment variable.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac

index 3ffbc7c57bd48dadf242a9ce215530e595f3ce88..7c08ec1bed9fa751000ae6dd55aa4b46f2d366da 100644 (file)
@@ -79,6 +79,11 @@ grub_TRANSFORM([grub-sparc64-setup])
 grub_TRANSFORM([grub-render-label])
 grub_TRANSFORM([grub-file])
 
+# Allow HOST_CC to override CC.
+if test "x$HOST_CC" != x; then
+  CC=$HOST_CC
+fi
+
 # Optimization flag.  Allow user to override.
 if test "x$TARGET_CFLAGS" = x; then
   TARGET_CFLAGS=-Os