again: fix cc detection
[fw/sdcc] / support / regression / ports / host / spec.mk
index e1dd68f64676f75d61046e5b3eccc7f78b1153da..077e1df57e67ad508a44e550a7b6cd11fdbf85b2 100644 (file)
@@ -1,5 +1,5 @@
 # Port specification for compiling on the host machines version of gcc
-SDCC = $(shell which gcc > /dev/null || which cc)
+SDCC = $(shell ( sh -c "gcc --version" 2>&1 ) > /dev/null  && echo gcc || echo cc)
 SDCCFLAGS = -DPORT_HOST=1 -Wall -fsigned-char -DREENTRANT=
 
 EXEEXT = .bin