diff options
author | glewis <glewis@FreeBSD.org> | 2019-07-02 05:18:18 +0800 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2019-07-02 05:18:18 +0800 |
commit | 991a52129c4cdd749c7920a25e8d35d352f8ba54 (patch) | |
tree | 1836f6226557b0f2cf5ea193d2d10749e2261e37 /java | |
parent | 8c13b04652458a4601b62363788b0a241c8642d0 (diff) | |
download | freebsd-ports-gnome-991a52129c4cdd749c7920a25e8d35d352f8ba54.tar.gz freebsd-ports-gnome-991a52129c4cdd749c7920a25e8d35d352f8ba54.tar.zst freebsd-ports-gnome-991a52129c4cdd749c7920a25e8d35d352f8ba54.zip |
Allow the JDK to be compiled with gcc.
This is required for powerpc64 support.
Diffstat (limited to 'java')
-rw-r--r-- | java/openjdk11/Makefile | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile index 42d79695c4a3..3b50fef09155 100644 --- a/java/openjdk11/Makefile +++ b/java/openjdk11/Makefile @@ -37,12 +37,12 @@ MAKE_ENV= LANG="C" \ CLASSPATH="" \ JAVA_HOME="" \ LD_LIBRARY_PATH="" \ - CC=/usr/bin/cc \ - CXX=/usr/bin/c++ \ - MAKEFLAGS="" \ - USE_CLANG=true + CC=${CC} \ + CXX=${CXX} \ + CPP=${CPP} \ + MAKEFLAGS="" -JDK_OSARCH= bsd-${ARCH:S/amd64/x86_64/:S/i386/x86/} +JDK_OSARCH= bsd-${ARCH:S/amd64/x86_64/:S/i386/x86/:S/powerpc64/ppc64/} JDK_BUILDDIR= ${WRKSRC}/build/${JDK_OSARCH}-normal-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE} JDK_IMAGEDIR= ${JDK_BUILDDIR}/images/jdk INSTALLDIR= ${PREFIX}/${PKGBASE} @@ -56,8 +56,9 @@ JDK_BUILD_NUMBER= 7 BSD_JDK_VERSION= 2 GNU_CONFIGURE= yes -CONFIGURE_ENV= CC=/usr/bin/cc \ - CXX=/usr/bin/c++ +CONFIGURE_ENV= CC=${CC} \ + CXX=${CXX} \ + CPP=${CPP} CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --disable-ccache \ --disable-javac-server \ @@ -75,7 +76,6 @@ CONFIGURE_ARGS= --with-boot-jdk=${BOOTSTRAPJDKDIR} \ --with-libpng=system \ --with-zlib=system \ --with-lcms=system \ - --with-toolchain-type=clang \ --x-includes=${LOCALBASE}/include \ --x-libraries=${LOCALBASE}/lib \ --with-cacerts-file=${FILESDIR}/cacerts \ @@ -108,6 +108,20 @@ BUILD_DEPENDS+= ${BOOTSTRAPJDKDIR}/bin/javac:java/bootstrap-openjdk11 JDK_BUILD_JVM= server +MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE} +CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE} + +.if ${COMPILER_TYPE} == gcc +USE_GCC= yes +CONFIGURE_ARGS+= --disable-warnings-as-errors \ + --disable-dtrace \ + --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT} -L/usr/local/lib/gcc${GCC_DEFAULT}" \ + --with-extra-cflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" \ + --with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}" +.else +MAKE_ENV+= USE_CLANG=true +.endif + .if empty(ICONV_LIB) ICONV_CFLAGS= -DLIBICONV_PLUG .else |