Skip to content

Commit

Permalink
configure: force check_compile() to link an executable
Browse files Browse the repository at this point in the history
by using -c (which just creates an object file), we don't catch implicit
function declarations as an error (see discussion of rofl0r#274).
  • Loading branch information
rofl0r committed Dec 25, 2018
1 parent 49bf4ba commit a6959ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ check_compile() {
printf "checking %s ... " "$1"
printf "$3" > "$tmpc"
local res=0
$CC $OUR_CPPFLAGS $CPPFLAGS $2 $CFLAGS -c "$tmpc" -o /dev/null >/dev/null 2>&1 \
$CC $OUR_CPPFLAGS $CPPFLAGS $2 $CFLAGS "$tmpc" -o /dev/null >/dev/null 2>&1 \
|| res=1
test x$res = x0 && \
{ printf "yes\n" ; test x"$2" = x || OUR_CPPFLAGS="$OUR_CPPFLAGS $2" ; } \
Expand Down

0 comments on commit a6959ee

Please sign in to comment.