Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2024 11:36:16 GMT
From:      Ronald Klop <ronald@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: e3120f0ac06e - main - java/openjdk11: respect compiler and linker flags
Message-ID:  <202409101136.48ABaG03039863@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by ronald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e3120f0ac06e578482a669fe51fb65fb2bcb6619

commit e3120f0ac06e578482a669fe51fb65fb2bcb6619
Author:     Mikhail T. <freebsd-2024@virtual-estates.net>
AuthorDate: 2024-09-09 07:50:21 +0000
Commit:     Ronald Klop <ronald@FreeBSD.org>
CommitDate: 2024-09-10 11:34:53 +0000

    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@)
---
 java/openjdk11/Makefile | 11 ++++++++---
 1 file 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409101136.48ABaG03039863>