diff options
author | Alexey Neyman <stilor@att.net> | 2019-12-23 23:19:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-23 23:19:24 (GMT) |
commit | 66c293205368720945a09e0df03e11f6608abd4b (patch) | |
tree | 6aa2bcba61b4aa0d590154bb74b5c9f0f17c2cb0 | |
parent | be5d0317d23ce7d3c4eb497d21ec7c27b0acf6de (diff) | |
parent | 7469bc8a7382ca0912d59840478b1584f873ac55 (diff) |
Merge pull request #1259 from nolange/add_binutils_deterministic_archives
enable option for binutils deterministic-archives
-rw-r--r-- | config/binutils/binutils.in | 11 | ||||
-rw-r--r-- | scripts/build/binutils/binutils.sh | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in index 928659a..a92dec9 100644 --- a/config/binutils/binutils.in +++ b/config/binutils/binutils.in @@ -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" @@ -206,7 +215,7 @@ config ELF2FLT_EXTRA_CONFIG_ARRAY default "" help Extra flags passed onto ./configure when configuring - + You can enter multiple arguments here, and arguments can contain spaces if they are properly quoted (or escaped, but prefer quotes). Eg.: --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 2a738de..6a2ec7b 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -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}") |