summaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure34
1 files changed, 9 insertions, 25 deletions
diff --git a/configure b/configure
index 033f89c..839d8b3 100755
--- a/configure
+++ b/configure
@@ -33,7 +33,12 @@ usage()
" ___________________________________________" \
"__________________________________"
- cat "$mb_project_dir"/project/config/cfgdefs.usage
+ if [ -f "$mb_project_dir"/project/config/cfgdefs.usage ]; then
+ cat "$mb_project_dir"/project/config/cfgdefs.usage
+ else
+ printf '%s\n\n' \
+ "[ info: this project does not provide a project-specific cfgdefs.usage file. ]"
+ fi
fi
exit 0
@@ -275,7 +280,7 @@ init_vars()
mb_toolchain=$TOOLCHAIN
mb_sysroot=$SYSROOT
mb_cross_compile=$CROSS_COMPILE
- mb_shell=$SHELL
+ mb_shell=$CONFIG_SHELL
# pkgconf
mb_pkgconf=$PKGCONF
@@ -713,7 +718,7 @@ config_flags()
# ccstrict
if [ _$mb_ccstrict = _yes ]; then
- mb_cflags_strict='$(_CFLAGS_Wall) $(_CFLAGS_Werror) $(_CFLAGS_Wextra) $(_CFLAGS_Wundef)'
+ mb_cflags_strict='$(_CFLAGS_Wall) $(_CFLAGS_Werror) $(_CFLAGS_Wextra) $(_CFLAGS_Wundef) $(_CFLAGS_Wpedantic)'
fi
# ldstrict
@@ -840,32 +845,11 @@ config_ccenv()
error_msg "${mb_pretty} or otherwise by setting the NATIVE_CC environment variable to '$ccenv_host_cc',"
error_msg "${mb_pretty} however that should almost never be necessary; then again,"
error_msg "${mb_pretty} forcing native mode when cross-building is strictly prohibited."
-
- error_msg ' !!'
- error_msg "$mb_package: error: --sysroot is required when cross-compiling."
- exit 2
- fi
-
- # add the include and library directories to the compiler and linker search path
- if [ "$mb_cchost" = "$mb_native_cchost" ]; then
- mb_cflags_last="$mb_cflags_last -I$mb_includedir"
- mb_ldflags_last="$mb_ldflags_last -L$mb_libdir"
- else
- case "$mb_libdir" in
- /*)
- mb_cflags_last="$mb_cflags_last -I$mb_sysroot/.$mb_includedir"
- mb_ldflags_last="$mb_ldflags_last -L$mb_sysroot/.$mb_libdir"
- ;;
- *)
- mb_cflags_last="$mb_cflags_last -I$mb_includedir"
- mb_ldflags_last="$mb_ldflags_last -L$mb_libdir"
- esac
fi
# re-generate Makefile.tmp
output_section_break
config_copy
-
}
config_custom_cfgdefs()
@@ -948,7 +932,7 @@ config_host()
mb_cfghost_cflags="$mb_cfghost_cflags -ffreestanding"
mb_cfghost_cflags="$mb_cfghost_cflags -nostdlib"
else
- printf 'int main(void){return 0;}' \
+ printf 'int main(void){return 0;}\n' \
> "$mb_cfghost_tmpname"
fi