Skip to content

Commit

Permalink
java/openjdk8: fix build with lld 17
Browse files Browse the repository at this point in the history
Building java/openjdk8 with lld 17 results in the following link error:

  Making SA debugger back-end...
  ld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'ps_getpid' failed: symbol not defined
  ld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'ps_lcontinue' failed: symbol not defined
  ld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'ps_lgetxmmregs' failed: symbol not defined
  ld: error: version script assignment of 'SUNWprivate_1.1' to symbol 'ps_lsetxmmregs' failed: symbol not defined
  cc: error: linker command failed with exit code 1 (use -v to see invocation)

This is because lld 17 defaults to errors when undefined symbols are
referenced in linker version scripts. Since there are many of these in
openjdk 8, suppress the errors by adding -Wl,--undefined-version to the
--with-extra-ldflags configure option.

PR:		274106
Approved by:	maintainer timeout (10 days)
MFH:		2023Q4
  • Loading branch information
DimitryAndric committed Oct 6, 2023
1 parent 9b934eb commit a2f61c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/openjdk8/Makefile
Expand Up @@ -83,7 +83,8 @@ CONFIGURE_ARGS+= --disable-freetype-bundling \
--with-jvm-variants=${JDK_BUILD_JVM} \
--with-milestone=fcs \
--with-package-path=${LOCALBASE} \
--with-zlib=system
--with-zlib=system \
--with-extra-ldflags="-Wl,--undefined-version"
CONFIGURE_SCRIPT= ../../configure
CONFIGURE_WRKSRC= ${WRKSRC}/common/autoconf

Expand Down

0 comments on commit a2f61c3

Please sign in to comment.