build: Make it possible to build without gcc

The external Makefile hardcodes gcc to get the machine spec.
This should use the configured C compiler instead.

This bug was introduced in 601464416b.
This commit is contained in:
Wladimir J. van der Laan 2020-06-26 16:46:43 +02:00 committed by Rusty Russell
parent a3a37ea4ce
commit 32f9805a30
1 changed files with 1 additions and 1 deletions

2
external/Makefile vendored
View File

@ -9,7 +9,7 @@ ifdef BUILD
CROSSCOMPILE_OPTS := --host="$(MAKE_HOST)" --build="$(BUILD)"
TARGET_DIR := external/"$(MAKE_HOST)"
else
TARGET_DIR := external/"$(shell gcc -dumpmachine)"
TARGET_DIR := external/"$(shell ${CC} -dumpmachine)"
endif
LIBSODIUM_HEADERS := external/libsodium/src/libsodium/include/sodium.h