path: root/reproduce/software/shell/configure.sh
diff options
authorRaul Infante-Sainz <infantesainz@gmail.com>2021-03-19 18:11:12 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2021-03-20 01:08:21 +0000
commita981196b2e2eea6fe0517040c49a32f757ad28cf (patch)
tree555b917ab048813e612831306f638efa6364856c /reproduce/software/shell/configure.sh
parentc3e82b1c7b6c358719f3d1dd5cf4871cde3446a7 (diff)
Configuration: nullability-completeness warnings suppressed
With a recent update of macOS systems (macOS Big Sur 11.2.3 and Xcode 12.4), there are many warnings when building C programs (for example the simple program we compile to check the compiler, or some of the software like `gzip'). It prints hundreds of warning lines for every source file that are irrelevant for our builds, but really clutters the output. With this commit, these warnings are disabled by adding `-Wno-nullability-completeness' to the 'CPPFLAGS' environment variable. This has also been added to the very first check of the C compiler in the configure step.
Diffstat (limited to 'reproduce/software/shell/configure.sh')
1 files changed, 10 insertions, 1 deletions
diff --git a/reproduce/software/shell/configure.sh b/reproduce/software/shell/configure.sh
index 8ae74d2..fe46cef 100755
--- a/reproduce/software/shell/configure.sh
+++ b/reproduce/software/shell/configure.sh
@@ -424,8 +424,17 @@ if ! [ -d $compilertestdir ]; then mkdir $compilertestdir; fi
# Check C compiler
# ----------------
+# Here we check if the C compiler works properly. About the "no warning"
+# variable ('nowarnings'):
+# -Wno-nullability-completeness: on macOS Big Sur 11.2.3 and Xcode 12.4,
+# hundreds of 'nullability-completeness' warnings are printed which can
+# be very annoying and even hide important errors or warnings. It is
+# also harmless for our test here, so it is generally added.
echo; echo; echo "Checking host C compiler ('$CC')...";
cat > $testsource <<EOF
#include <stdio.h>
@@ -433,7 +442,7 @@ cat > $testsource <<EOF
int main(void){printf("...C compiler works.\n");
-if $CC $testsource -o$testprog && $testprog; then
+if $CC $noccwarnings $testsource -o$testprog && $testprog; then
rm $testsource $testprog
rm $testsource