enable option for binutils deterministic-archives

Signed-off-by: Norbert Lange <nolange79@gmail.com>
This commit is contained in:
Norbert Lange 2019-10-10 18:56:22 +02:00
parent 3f461da11f
commit 7469bc8a73
2 changed files with 13 additions and 1 deletions

View File

@ -156,6 +156,15 @@ config BINUTILS_RELRO
Setting this option to 'M' configures binutils with their internal
default for the selected architecture.
config BINUTILS_DETERMINISTIC_ARCHIVES
bool
prompt "Enable deterministic archives by default" if BINUTILS_2_23_or_later
default y if BINUTILS_2_23_or_later
help
Setting this option will enable deterministic mode by default (-D).
ar and ranlib will use zero for UIDs, GIDs,
timestamps, and use consistent file modes for all files.
config BINUTILS_EXTRA_CONFIG_ARRAY
string
prompt "binutils extra config"

View File

@ -158,6 +158,9 @@ do_binutils_backend() {
elif [ "${CT_BINUTILS_RELRO}" != "m" ]; then
extra_config+=( --disable-relro )
fi
if [ "${CT_BINUTILS_DETERMINISTIC_ARCHIVES}" = "y" ]; then
extra_config+=( --enable-deterministic-archives )
fi
if [ "${CT_BINUTILS_HAS_PKGVERSION_BUGURL}" = "y" ]; then
[ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")