2018-09-02 14:19:23 +02:00
|
|
|
run_configure() {
|
|
|
|
local srcdir="$1"
|
|
|
|
shift
|
|
|
|
|
2018-10-19 13:02:06 +02:00
|
|
|
local cflags=""
|
|
|
|
local ldflags=""
|
|
|
|
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
|
|
|
cflags="-fstack-protector-all"
|
|
|
|
ldflags="-z noexecstack -z relro -z now"
|
|
|
|
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 \
|
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 $@
|
|
|
|
}
|