From: Ralph Ronnquist Date: Wed, 30 Mar 2022 06:11:02 +0000 (+1100) Subject: pick compiler by preference X-Git-Tag: deb_0.1.3~5^2 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=refs%2Fheads%2Fwip-libc;p=rrq%2Foverlay-boot.git pick compiler by preference --- diff --git a/src/Makefile b/src/Makefile index 5c8c757..7567e7b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,9 @@ all: reaper -CC = musl-gcc +# Pick compiler by preference +CCPREFS = /usr/bin/musl-gcc /usr/bin/gcc +CC = $(word 1,$(shell ls $(CCPREFS) 2>/dev/null)) + CFLAGS = -Wall -static -O3 -flto reaper: reaper.c