mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 01:56:37 -04:00
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@)
This commit is contained in:
parent
0cb139ce88
commit
e3120f0ac0
1 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue