From cdc56c65abb83b9e03a2de70fafa3e08fbce788e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 21 Jan 2022 14:27:49 +0100 Subject: [PATCH] Another try at choosing the default compiler Cross-compilers often provide only "gcc" and not "cc". So let's try "cc" when building natively and "gcc" when cross-compiling. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aeb020e..aac99fc 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,11 @@ PKGCFDIR=$(LIBDIR)/pkgconfig INSTALL=install DIRINSTALL=install -d STRIP=-s -CC=$(CROSS_COMPILE)cc +ifdef CROSS_COMPILE +CC=$(CROSS_COMPILE)gcc +else +CC=cc +endif AR=$(CROSS_COMPILE)ar RANLIB=$(CROSS_COMPILE)ranlib -- 2.39.2