diff options
author | Mikhail T. <freebsd-2024@virtual-estates.net> | 2024-09-09 09:50:21 +0200 |
---|---|---|
committer | Ronald Klop <ronald@FreeBSD.org> | 2024-09-10 13:34:53 +0200 |
commit | e3120f0ac06e578482a669fe51fb65fb2bcb6619 (patch) | |
tree | c6ff1eab2d9627bd43ce7043e523bffd7a231037 /java/openjdk11 | |
parent | sysutils/avfs, x11-fm/worker: assume these ports' maintainership (diff) |
java/openjdk11: respect compiler and linker flags
pass CFLAGS, CXXFLAGS and LDFLAGS to the build
This enables more easily testing different build options.
fix build on gcc by passing --disable-precompiled-headers not only on powerpc64
"Without this, I was getting PCH-error from g++12 on my amd64 machine too."
PR: 279367
Tested by: poudriere
Approved by: maintainer timeout (java@)
Diffstat (limited to 'java/openjdk11')
-rw-r--r-- | java/openjdk11/Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile index 4e1ad8b25325..da7fa2f9fea1 100644 --- a/java/openjdk11/Makefile +++ b/java/openjdk11/Makefile @@ -1,6 +1,7 @@ PORTNAME= openjdk DISTVERSIONPREFIX= jdk- DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION} +PORTREVISION= 1 CATEGORIES= java devel PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION} @@ -88,6 +89,9 @@ CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --disable-hotspot-gtest \ --with-jvm-features=shenandoahgc \ --with-alsa=${LOCALBASE} \ + --with-extra-cflags="${CFLAGS}" \ + --with-extra-cxxflags="${CXXFLAGS}" \ + --with-extra-ldflags="${LDFLAGS}" \ --with-fontconfig=${LOCALBASE} \ --with-freetype=system \ --with-freetype-include=${LOCALBASE}/include/freetype2 \ @@ -147,9 +151,10 @@ CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE} .if ${COMPILER_TYPE} == gcc USE_GCC= yes -CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} -L${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \ - --with-extra-cflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \ - --with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" +LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} -L${LOCALBASE}/lib/gcc${GCC_DEFAULT} +CFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} +CXXFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} +CONFIGURE_ARGS+=--disable-precompiled-headers .else MAKE_ENV+= USE_CLANG=true .endif |