Makefile: Improve gcc detection
- Aug 28, 2021
-
-
Golden authored
Wasn't working for me until I fixed it. Turns out gcc really doesn't like giving its name out. Most of the time it reads argv[0].
-
The Makefile's gcc
autodetection wasn't working for me, so I fixed it.
Turns out gcc
is extremely abrasive towards you getting its real name.
Most of the time it gives you argv[0]
(typically cc
).
Meanwhile clang
will happily tell me that its clang
wherever possible.
Please tell me if this works on your machine.
It'll be just wonderful if gcc
's behavior differs between platforms.
Wasn't working for me until I fixed it. Turns out gcc really doesn't like giving its name out. Most of the time it reads argv[0].