2018-09-02 14:19:23 +02:00
|
|
|
run_configure() {
|
|
|
|
local srcdir="$1"
|
|
|
|
shift
|
|
|
|
|
2018-10-20 19:27:23 +02:00
|
|
|
local cflags="-O2 -Os"
|
2018-10-19 13:02:06 +02:00
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
2018-10-20 19:27:23 +02:00
|
|
|
cflags="$cflags -fstack-protector-all"
|
|
|
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
2018-10-19 13:02:06 +02:00
|
|
|
fi
|
2018-10-14 16:55:36 +02:00
|
|
|
|
2018-09-02 14:19:23 +02:00
|
|
|
ac_cv_func_malloc_0_nonnull=yes \
|
|
|
|
ac_cv_func_realloc_0_nonnull=yes \
|
2020-04-07 03:42:44 +02:00
|
|
|
hw_cv_func_vsnprintf_c99=yes \
|
|
|
|
hw_cv_func_snprintf_c99=yes \
|
2018-10-14 16:55:36 +02:00
|
|
|
CFLAGS="$cflags" LDFLAGS="$ldflags" \
|
2018-09-02 14:19:23 +02:00
|
|
|
$srcdir/configure --prefix="" --build="$HOSTTUPLE" --host="$TARGET" \
|
|
|
|
--bindir="/bin" --sbindir="/bin" --sysconfdir="/etc" \
|
|
|
|
--libexecdir="/lib/libexec" --datarootdir="/share" \
|
|
|
|
--datadir="/share" --sharedstatedir="/share" \
|
|
|
|
--with-bashcompletiondir="/share/bash-completion/completions" \
|
|
|
|
--includedir="/include" \
|
2018-09-30 02:36:59 +02:00
|
|
|
--libdir="/lib" \
|
2018-09-02 14:19:23 +02:00
|
|
|
--enable-shared --disable-static $@
|
|
|
|
}
|