pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: openjdk7 not compiling with clang



On Wed, 12 Feb 2014 15:48:56 +0100
Thomas Klausner <tk%giga.or.at@localhost> wrote:

> Hi!
> 
> openjdk7 doesn't compile for me on 6.99.31/amd64 with clang from the
> base system.
> 
> g++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/share/vm/prims
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/share/vm
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/os/bsd/vm
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/os/posix/vm
> -I/scratch/lang/openjdk7/work/openjdk/hotspot/src/share/vm/adlc
> -I../generated -DASSERT -O2 -I/usr/include -I/usr/pkg/include
> -I/usr/pkg/include/freetype2 -I/usr/include/krb5
> -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64
> -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64
> -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1  -fno-rtti
> -fno-exceptions -pthread -fcheck-new -m64 -pipe
> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_OS_FAMILY_bsd
> -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86
> -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2
> -DCOMPILER1  -fno-rtti -fno-exceptions -pthread -fcheck-new -m64
> -pipe -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Werror -g -c
> -o ../generated/adfiles/adlparse.o 
> /scratch/lang/openjdk7/work/openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
> clang: error: unknown argument: '-fcheck-new' clang: error: unknown
> argument: '-fcheck-new' clang: error: unknown argument: '-fcheck-new'
> clang: error: unknown argument: '-fcheck-new' clang: error: unknown
> argument: '-fcheck-new' clang: error: unknown argument:
> '-fcheck-new' ...
> 
> Suggestions?
>  Thomas

Clang doesn't seem to have -fcheck-new, I tried to
add "BUILDLINK_TRANSFORM+=rm:-fcheck-new" to Makefile 
in the ".if !empty(PKGSRC_COMPILER:Mclang)" section.
Clang then finds a bug.
http://hg.openjdk.java.net/jdk8/tl/jdk/rev/eb441933f6fe
Adding these changes makes openjdk compile with Clang on my system.
NetBSD 6.1.2 clang 3.3 from pkgsrc 2013Q4.

You can try to do the same and see what result you get.

/Niclas Rosenvik







Home | Main Index | Thread Index | Old Index