On Wed, 12 Mar 2025 16:56:32 GMT, Magnus Ihse Bursie <[email protected]> wrote:
> Also, to double check, are the new variables `ICONV_CFLAGS` and
> `ICONV_LDFLAGS` going to be non-empty on BSD?
Yes, the current BSD port has the following in `libraries.m4`:
if test "x$OPENJDK_TARGET_OS" = "xbsd"; then
if test "x$OPENJDK_TARGET_OS_ENV" = "xbsd.openbsd"; then
ICONV_CFLAGS="-I/usr/local/include"
ICONV_LDFLAGS="-L/usr/local/lib"
ICONV_LIBS=-liconv
elif test "x$OPENJDK_TARGET_OS_ENV" = "xbsd.freebsd"; then
ICONV_CFLAGS=-DLIBICONV_PLUG
ICONV_LDFLAGS=
ICONV_LIBS=
else
ICONV_CFLAGS=
ICONV_LDFLAGS=
ICONV_LIBS=
fi
else
ICONV_CFLAGS=
ICONV_LDFLAGS=
ICONV_LIBS=-liconv
fi
AC_SUBST(ICONV_CFLAGS)
AC_SUBST(ICONV_LDFLAGS)
AC_SUBST(ICONV_LIBS)
So strictly speaking we only need `ICONV_CFLAGS` for FreeBSD, and `ICONV_LIBS`
for aix and macosx. That is if we don't want to include OpenBSD support at this
time.
> make/modules/jdk.jdwp.agent/Lib.gmk line 76:
>
>> 74: java.base:libjava, \
>> 75: JDK_LIBS := java.base:libjvm, \
>> 76: LIBS_linux := $(LIBDL), \
>
> Something got wrong here. You should have kept the LIBS_linux line, and the
> new LIBS line should be `LIBS := $(ICONV_LIBS)`.
Ooops, I'll fix!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23995#issuecomment-2720660907
PR Review Comment: https://git.openjdk.org/jdk/pull/23995#discussion_r1993169985