Skip to content

Commit

Permalink
8314554: Debian/Ubuntu should not link OpenJDK with --as-needed link …
Browse files Browse the repository at this point in the history
…option

Reviewed-by: erikj
  • Loading branch information
Vladimir Petko authored and erikj79 committed Aug 24, 2023
1 parent 97b94cb commit e36620d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion make/autoconf/flags-ldflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Add -z,defs, to forbid undefined symbols in object files.
# add -z,relro (mark relocations read only) for all libs
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
# add --no-as-needed to disable default --as-needed link flag on some GCC toolchains
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now -Wl,--no-as-needed"
# Linux : remove unused code+data in link step
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
Expand Down

1 comment on commit e36620d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.