mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-10 12:58:30 -04:00
Pass CFLAGS to detect.sh
Needed when cross-compiling with clang.
This commit is contained in:
parent
8081ce7853
commit
f2b401539c
2
Makefile
2
Makefile
@ -156,7 +156,7 @@ PROG_OBJ := $(PROG_COMMON_OBJ) $(PROG_SPECIFIC_OBJ)
|
|||||||
|
|
||||||
# Generate autodetected configuration header
|
# Generate autodetected configuration header
|
||||||
programs/config.h:programs/detect.sh .prog-cflags
|
programs/config.h:programs/detect.sh .prog-cflags
|
||||||
$(QUIET_GEN) CC=$(CC) $< > $@
|
$(QUIET_GEN) CC="$(CC)" CFLAGS="$(CFLAGS)" $< > $@
|
||||||
|
|
||||||
# Compile program object files
|
# Compile program object files
|
||||||
$(PROG_OBJ): %.o: %.c $(PROG_COMMON_HEADERS) $(COMMON_HEADERS) .prog-cflags
|
$(PROG_OBJ): %.o: %.c $(PROG_COMMON_HEADERS) $(COMMON_HEADERS) .prog-cflags
|
||||||
|
@ -17,7 +17,7 @@ check_function() {
|
|||||||
echo "int main() { $funcname(); }" > "$tmpfile"
|
echo "int main() { $funcname(); }" > "$tmpfile"
|
||||||
echo
|
echo
|
||||||
echo "/* Is the $funcname() function available? */"
|
echo "/* Is the $funcname() function available? */"
|
||||||
if $CC -x c $tmpfile -o /dev/null > /dev/null 2>&1; then
|
if $CC $CFLAGS -x c $tmpfile -o /dev/null > /dev/null 2>&1; then
|
||||||
echo "#define $macro 1"
|
echo "#define $macro 1"
|
||||||
else
|
else
|
||||||
echo "/* $macro is not set */"
|
echo "/* $macro is not set */"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user