with_binutils_ldscript_dir
with_binutils_build_dir
enable_ld_elf2flt_binary
+enable_werror
enable_got_check
enable_emit_relocs
enable_emit_ctor_dtor
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-ld-elf2flt-binary
use ld-elf2flt shell script
+ --disable-werror do not build with -Werror
--disable-got-check disable check for GOT (needed on H8)
--disable-emit-relocs don't use the --emit-relocs (-q) linker option
--enable-emit-ctor-dtor manually create ctor/dtor list
fi
}
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror; werror=$enableval
+else
+ werror=yes
+
+fi
+
+var_yn_to_10 werror
+
# Check whether --enable-got-check was given.
if test "${enable_got_check+set}" = set; then :
enableval=$enable_got_check; got_check=$enableval
done
-test "$GCC" = yes && CFLAGS="-Wall $CFLAGS"
+if test "$GCC" = yes ; then
+ CFLAGS="-Wall $CFLAGS"
+ if test "$werror" = 1 ; then
+ CFLAGS="-Werror -Wno-error=unused-label $CFLAGS"
+ fi
+fi
fi
}
+AC_ARG_ENABLE(werror,
+ AS_HELP_STRING([--disable-werror], [do not build with -Werror]),
+ [ werror=$enableval ],
+ [ werror=yes ]
+)
+var_yn_to_10 werror
+
AC_ARG_ENABLE(got-check,
AS_HELP_STRING([--disable-got-check], [disable check for GOT (needed on H8)]),
[ got_check=$enableval ],
strsignal \
])
-test "$GCC" = yes && CFLAGS="-Wall $CFLAGS"
+if test "$GCC" = yes ; then
+ CFLAGS="-Wall $CFLAGS"
+ if test "$werror" = 1 ; then
+ CFLAGS="-Werror -Wno-error=unused-label $CFLAGS"
+ fi
+fi
dnl Subsitute values
AC_SUBST(target)