Commit 4e97b24
committed
build: fall back to gcc or clang when the host has no cc
HOST_ARCH came from `cc -dumpmachine`. On a host with gcc or clang but
no cc symlink that command fails, HOST_ARCH is empty, and it no longer
equals the target triple, so a native build is misread as a cross
build: it links -static and prints `cc: not found` on every make.
Try cc, then gcc, then clang for the host triple. The fallback stays a
native compiler rather than $(CC), which may itself be a cross
compiler, so cross detection is unaffected.1 parent d6625f5 commit 4e97b24
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
| |||
0 commit comments