Browse code

Prevent the creation of "a.out" at the repo root

Our clever "gcc" invocations were creating a spurious "a.out" file at the root of the repo (which just happened to be in ".gitignore" so we didn't notice it sooner).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>

Tianon Gravi authored on 2015/11/18 02:44:36
Showing 1 changed files
... ...
@@ -110,7 +110,7 @@ fi
110 110
 # test whether "btrfs/version.h" exists and apply btrfs_noversion appropriately
111 111
 if \
112 112
 	command -v gcc &> /dev/null \
113
-	&& ! gcc -E - &> /dev/null <<<'#include <btrfs/version.h>' \
113
+	&& ! gcc -E - -o /dev/null &> /dev/null <<<'#include <btrfs/version.h>' \
114 114
 ; then
115 115
 	DOCKER_BUILDTAGS+=' btrfs_noversion'
116 116
 fi
... ...
@@ -119,7 +119,7 @@ fi
119 119
 # functionality.
120 120
 if \
121 121
 	command -v gcc &> /dev/null \
122
-	&& ! ( echo -e  '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -ldevmapper -xc - &> /dev/null ) \
122
+	&& ! ( echo -e  '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }'| gcc -ldevmapper -xc - -o /dev/null &> /dev/null ) \
123 123
 ; then
124 124
        DOCKER_BUILDTAGS+=' libdm_no_deferred_remove'
125 125
 fi