X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=configure;h=748f7014c63541b26ef66dd8b72fcd1a8a27f777;hb=cdf2f9e31efab8dc45215dd4e6ecb3de9149b4a9;hp=e3e37d569965d5c7c872cd8240e0b77bd85be8c8;hpb=e1e6d335854d1a233f167cd443bc2dc71460ec57;p=fio.git diff --git a/configure b/configure index e3e37d56..748f7014 100755 --- a/configure +++ b/configure @@ -45,6 +45,7 @@ print_config() { # Default CFLAGS CFLAGS="-D_GNU_SOURCE -include config-host.h $CFLAGS" +CONFIGURE_CFLAGS="-Werror-implicit-function-declaration" BUILD_CFLAGS="" # Print a helpful header at the top of config.log @@ -88,14 +89,14 @@ do_cc() { } compile_object() { - do_cc $CFLAGS -Werror-implicit-function-declaration -c -o $TMPO $TMPC + do_cc $CFLAGS $CONFIGURE_CFLAGS -c -o $TMPO $TMPC } compile_prog() { local_cflags="$1" local_ldflags="$2 $LIBS" echo "Compiling test case $3" >> config.log - do_cc $CFLAGS -Werror-implicit-function-declaration $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags + do_cc $CFLAGS $CONFIGURE_CFLAGS $local_cflags -o $TMPE $TMPC $LDFLAGS $local_ldflags } feature_not_found() { @@ -360,16 +361,15 @@ Darwin) if test -z "$cpu" && test "$(sysctl -n hw.optional.x86_64)" = "1"; then cpu="x86_64" fi - # Error at compile time linking of weak/partial symbols if possible... + # Avoid configure feature detection of features provided by weak symbols cat > $TMPC < $TMPC << EOF int main(int argc, char **argv) { int rc; - rc = pmem_is_pmem(NULL, NULL); + rc = pmem_is_pmem(NULL, 0); return 0; } EOF @@ -2695,6 +2695,7 @@ print_config "Windows PDB generation" "$pdb" ########################################## # check for timerfd support timerfd_create="no" +if test "$esx" != "yes" ; then cat > $TMPC << EOF #include #include @@ -2704,8 +2705,9 @@ int main(int argc, char **argv) return timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); } EOF -if compile_prog "" "" "timerfd_create"; then - timerfd_create="yes" + if compile_prog "" "" "timerfd_create"; then + timerfd_create="yes" + fi fi print_config "timerfd_create" "$timerfd_create"