diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-03-22 23:59:45 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-03-24 01:08:56 -0400 |
commit | cc8ab1ded5dbc6c2ddb1b8c62f0e0f8f486a5f17 (patch) | |
tree | 52cc1d85601a51a1e4ef3376e25e9bd4425d1afe /sim/moxie/configure | |
parent | 523ba8f92e3ff4c49f65b582c89b4563b1b665ad (diff) | |
download | gdb-cc8ab1ded5dbc6c2ddb1b8c62f0e0f8f486a5f17.zip gdb-cc8ab1ded5dbc6c2ddb1b8c62f0e0f8f486a5f17.tar.gz gdb-cc8ab1ded5dbc6c2ddb1b8c62f0e0f8f486a5f17.tar.bz2 |
sim: moxie: convert to nrun.o
This port already used a lot of common/ files, so cutting it over to
nrun.o and using a few more common objects is pretty straight forward.
Diffstat (limited to 'sim/moxie/configure')
-rwxr-xr-x | sim/moxie/configure | 114 |
1 files changed, 112 insertions, 2 deletions
diff --git a/sim/moxie/configure b/sim/moxie/configure index ccfdb77..efd1e06 100755 --- a/sim/moxie/configure +++ b/sim/moxie/configure @@ -765,6 +765,9 @@ enable_sim_alignment enable_sim_hostendian enable_sim_environment enable_sim_inline +enable_werror +enable_build_warnings +enable_sim_build_warnings ' ac_precious_vars='build_alias host_alias @@ -1412,6 +1415,11 @@ Optional Features: --enable-sim-hostendian=end Specify host byte endian orientation. --enable-sim-environment=environment Specify mixed, user, virtual or operating environment. --enable-sim-inline=inlines Specify which functions should be inlined. + --enable-werror treat compile warnings as errors + --enable-build-warnings enable build-time compiler warnings if gcc is used + --enable-sim-build-warnings + enable SIM specific build-time compiler warnings if + gcc is used Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -12365,7 +12373,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12368 "configure" +#line 12376 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12471,7 +12479,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12474 "configure" +#line 12482 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13457,6 +13465,108 @@ fi fi +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; case "${enableval}" in + yes | y) ERROR_ON_WARNING="yes" ;; + no | n) ERROR_ON_WARNING="no" ;; + *) as_fn_error "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; + esac +fi + + +# Enable -Werror by default when using gcc +if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then + ERROR_ON_WARNING=yes +fi + +WERROR_CFLAGS="" +if test "${ERROR_ON_WARNING}" = yes ; then +# NOTE: Disabled in the sim dir due to most sims generating warnings. +# WERROR_CFLAGS="-Werror" + true +fi + +build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ +-Wpointer-sign \ +-Wno-unused -Wunused-value -Wunused-function \ +-Wno-switch -Wno-char-subscripts -Wmissing-prototypes +-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \ +-Wold-style-declaration -Wold-style-definition" + +# Enable -Wno-format by default when using gcc on mingw since many +# GCC versions complain about %I64. +case "${host}" in + *-*-mingw32*) build_warnings="$build_warnings -Wno-format" ;; + *) build_warnings="$build_warnings -Wformat-nonliteral" ;; +esac + +# Check whether --enable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then : + enableval=$enable_build_warnings; case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting compiler warning flags = $build_warnings" 6>&1 +fi +fi +# Check whether --enable-sim-build-warnings was given. +if test "${enable_sim_build_warnings+set}" = set; then : + enableval=$enable_sim_build_warnings; case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes +then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 +$as_echo_n "checking compiler warning flags... " >&6; } + # Separate out the -Werror flag as some files just cannot be + # compiled with it enabled. + for w in ${build_warnings}; do + case $w in + -Werr*) WERROR_CFLAGS=-Werror ;; + *) # Check that GCC accepts it + saved_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $w" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + WARN_CFLAGS="${WARN_CFLAGS} $w" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$saved_CFLAGS" + esac + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 +$as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } +fi + + ac_sources="$sim_link_files" ac_dests="$sim_link_links" |