Skip to content

Commit

Permalink
configure.ac: for reproducible-build, use --build-id=sha1, not --buil…
Browse files Browse the repository at this point in the history
…d-id=none, to support users relying on build-id in the linked object.
  • Loading branch information
douzzer committed Oct 23, 2024
1 parent bffcfb7 commit 30181f2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -573,16 +573,15 @@ then
AM_CFLAGS="$AM_CFLAGS -ffile-prefix-map=\$(abs_top_srcdir)/= -ffile-prefix-map=\$(top_srcdir)/="
fi

# opportunistically use linker option --build-id=none

if "$CC" -Wl,--build-id=none -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
# opportunistically force linker option --build-id=sha1 (usually the default)
if "$CC" -Wl,--build-id=sha1 -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
#include <stdlib.h>
int main(int argc, char **argv) {
(void)argc; (void)argv; return 0;
}
EOF
then
AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=none"
AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=sha1"
fi
fi

Expand Down

0 comments on commit 30181f2

Please sign in to comment.