pick compiler by preference wip-libc
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Wed, 30 Mar 2022 06:11:02 +0000 (17:11 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Wed, 30 Mar 2022 06:11:02 +0000 (17:11 +1100)
src/Makefile

index 5c8c75744c433dfc733ce6b76d1923ca91da7c14..7567e7b84d920198faeb146e5dbf23697e2dfedc 100644 (file)
@@ -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