From f6a6b96a7e08f5be3f39ca4cb4faff62a324a95f Mon Sep 17 00:00:00 2001 From: malc Date: Tue, 7 Jul 2020 12:18:15 +0300 Subject: [PATCH] Address some parts of #136 This is convoluted yet demonstrates the power and beauty of build.bash. --- build.bash | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build.bash b/build.bash index 24a217f..b40e5b4 100755 --- a/build.bash +++ b/build.bash @@ -76,8 +76,17 @@ cflags() { f="-g -std=c99 -O2 $muinc -Wall -Werror -Wextra -pedantic" f="$f -DCACHE_PAGEREFS" $darwin && f="$f -DCIDER -D_GNU_SOURCE" \ - || f="$f -D_POSIX_C_SOURCE";; # needed for fdopen - */ml_*.o) f="-g -Wno-pointer-sign -O2";; + || f="$f -D_POSIX_C_SOURCE" # needed for fdopen + ;; + + */ml_*.o) + f="-g -Wno-pointer-sign -O2" + expr &>/dev/null "${LLPP_CC-}" : "clang" && { + f+=" -fno-strict-aliasing" + f+=" -Wno-incompatible-pointer-types-discards-qualifiers" + } || f+=" -Wno-discarded-qualifiers" + ;; + *) f="-g -O2";; esac ! $darwin || f="$f -DGL_SILENCE_DEPRECATION" -- 2.11.4.GIT