From: Martin Mares Date: Fri, 21 Jan 2022 13:27:49 +0000 (+0100) Subject: Another try at choosing the default compiler X-Git-Tag: v3.8.0~56 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=cdc56c65abb83b9e03a2de70fafa3e08fbce788e;p=pciutils.git 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. --- 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