diff options
author | midipix <writeonce@midipix.org> | 2016-05-06 18:10:14 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-11 00:22:43 -0500 |
commit | bec9ab5c6dea951b6a0b37eaca219715ded1ab2f (patch) | |
tree | eb3701f11ffb7b307c30f1b2b6606d08ea059e18 /configure | |
parent | 2921431cca2f82fbae5e488e93c2e829ffa75c84 (diff) | |
download | mdso-bec9ab5c6dea951b6a0b37eaca219715ded1ab2f.tar.bz2 mdso-bec9ab5c6dea951b6a0b37eaca219715ded1ab2f.tar.xz |
build system: added --strict, --ccstrict, --ldstrict support.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -68,6 +68,7 @@ init_vars() mb_cflags_os=$CFLAGS_OS mb_cflags_site=$CFLAGS_SITE mb_cflags_path=$CFLAGS_PATH + mb_cflags_strict=$CFLAGS_STRICT mb_cflags_util=$CFLAGS_UTIL mb_ldflags=$LDFLAGS @@ -77,6 +78,7 @@ init_vars() mb_ldflags_config=$LDFLAGS_CONFIG mb_ldflags_sysroot=$LDFLAGS_SYSROOT mb_ldflags_path=$LDFLAGS_PATH + mb_ldflags_strict=$LDFLAGS_STRICT mb_ldflags_util=$LDFLAGS_UTIL mb_pe_subsystem=$PE_SUBSYSTEM @@ -153,6 +155,7 @@ common_defaults() [ -z "$mb_cflags_os" ] && mb_cflags_os=$mb_default_cflags_os [ -z "$mb_cflags_site" ] && mb_cflags_site=$mb_default_cflags_site [ -z "$mb_cflags_path" ] && mb_cflags_path=$mb_default_cflags_path + [ -z "$mb_cflags_strict" ] && mb_cflags_strict=$mb_default_cflags_strict [ -z "$mb_cflags_util" ] && mb_cflags_util=$mb_default_cflags_util [ -z "$mb_ldflags_debug" ] && mb_ldflags_debug=$mb_default_ldflags_debug @@ -161,6 +164,7 @@ common_defaults() [ -z "$mb_ldflags_config" ] && mb_ldflags_config=$mb_default_ldflags_config [ -z "$mb_ldflags_sysroot" ] && mb_ldflags_sysroot=$mb_default_ldflags_sysroot [ -z "$mb_ldflags_path" ] && mb_ldflags_path=$mb_default_ldflags_path + [ -z "$mb_ldflags_strict" ] && mb_ldflags_strict=$mb_default_ldflags_strict [ -z "$mb_ldflags_util" ] && mb_ldflags_util=$mb_default_ldflags_util [ -z "$mb_pe_subsystem" ] && mb_pe_subsystem=$mb_default_pe_subsystem @@ -331,6 +335,16 @@ config_flags() mb_ldflags="$mb_ldflags_libs" mb_ldflags_util="$mb_ldflags_util -static" fi + + # ccstrict + if [ "$mb_ccstrict" = 'yes' ]; then + mb_cflags_strict='-Wall -Werror -Wextra -Wundef' + fi + + # ldstrict + if [ "$mb_ldstrict" = 'yes' ]; then + mb_ldflags_strict='-Wl,--no-undefined' + fi } @@ -360,6 +374,7 @@ config_copy() -e 's^@cflags_os@^'"$mb_cflags_os"'^g' \ -e 's^@cflags_site@^'"$mb_cflags_site"'^g' \ -e 's^@cflags_path@^'"$mb_cflags_path"'^g' \ + -e 's^@cflags_strict@^'"$mb_cflags_strict"'^g' \ -e 's^@cflags_util@^'"$mb_cflags_util"'^g' \ \ -e 's^@ldflags@^'"$mb_ldflags"'^g' \ @@ -369,6 +384,7 @@ config_copy() -e 's^@ldflags_config@^'"$mb_ldflags_config"'^g' \ -e 's^@ldflags_sysroot@^'"$mb_ldflags_sysroot"'^g' \ -e 's^@ldflags_path@^'"$mb_ldflags_path"'^g' \ + -e 's^@ldflags_strict@^'"$mb_ldflags_strict"'^g' \ -e 's^@ldflags_util@^'"$mb_ldflags_util"'^g' \ \ -e 's^@pe_subsystem@^'"$mb_pe_subsystem"'^g' \ @@ -533,6 +549,18 @@ for arg ; do mb_disable_shared='no' ;; + # convenience + --strict) + mb_ccstrict='yes' + mb_ldstrict='yes' + ;; + --ccstrict) + mb_ccstrict='yes' + ;; + --ldstrict) + mb_ldstrict='yes' + ;; + # project --nickname=*) mb_nickname=${arg#*=} |