Skip to content

Commit e83b604

Browse files
guix: enable build-id on linux
1 parent a39960b commit e83b604

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,11 @@ if test "$use_hardening" != "no"; then
11281128
AX_CHECK_LINK_FLAG([-fPIE -pie], [PIE_FLAGS="-fPIE"; HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"], [], [$CXXFLAG_WERROR])
11291129
fi
11301130

1131+
dnl Add build-id for perf and debug symbol matching (Linux only)
1132+
if test "$TARGET_OS" = "linux"; then
1133+
AX_CHECK_LINK_FLAG([-Wl,--build-id=sha1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--build-id=sha1"], [], [$LDFLAG_WERROR])
1134+
fi
1135+
11311136
dnl These flags are specific to ld64, and may cause issues with other linkers.
11321137
dnl For example: GNU ld will interpret -dead_strip as -de and then try and use
11331138
dnl "ad_strip" as the symbol for the entry point.

0 commit comments

Comments
 (0)