From owner-freebsd-java@FreeBSD.ORG Sun Sep 15 06:07:11 2013 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3F882A9F; Sun, 15 Sep 2013 06:07:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D04922004; Sun, 15 Sep 2013 06:07:10 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r8F676wG053358; Sun, 15 Sep 2013 09:07:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r8F676wG053358 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r8F676p5053357; Sun, 15 Sep 2013 09:07:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 15 Sep 2013 09:07:06 +0300 From: Konstantin Belousov To: Dimitry Andric Subject: Re: Building java/openjdk7 with clang Message-ID: <20130915060706.GH41229@kib.kiev.ua> References: <108F3771-64B3-40E9-91FA-04C160442608@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mDTzbtJQQC4mO8fU" Content-Disposition: inline In-Reply-To: <108F3771-64B3-40E9-91FA-04C160442608@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: java@FreeBSD.org, Baptiste Daroussin , Greg Lewis X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 06:07:11 -0000 --mDTzbtJQQC4mO8fU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 15, 2013 at 01:45:19AM +0200, Dimitry Andric wrote: > Hi, >=20 > I took some time to figure out how to build java/openjdk7 with clang. > There are a few items I changed: >=20 > - Change a few instances of "ifneq ($(COMPILER_WARNINGS_FATAL),false)" > to "ifeq ($(COMPILER_WARNINGS_FATAL),true)", to make sure -Werror is > *not* used. There are zillions of warnings in openjdk, and I don't > think it is worth the trouble to fix them all (even if that is > possible :). > - Remove -fcheck-new from CFLAGS, since clang does not support it, and > it does not make sense anyway. This is the only one that is not > strictly needed; if -Werror is not enabled, clang will just print a > warning that the option is unused, but it won't be fatal. > - Change the $(CC) -dumpspecs hack in one of the Makefiles to something > more portable. The -dumpspecs is done to figure out if the compiler > uses --hash-style=3Dgnu when linking, and if it does, it changes the > option to --hash-style=3Dboth. On FreeBSD, this is basically a no-op, Compiler ? Do you reference the ELF hash there ? Why do you think this is nop ? > so it could also be commented out entirely. > - In jdk/src/solaris/native/java/net/net_util_md.c, change two > instances of CHECK_NULL() to CHECK_NULL_RETURN(), since the function > they are in is supposed to return a value. I chose to return 0, > since that is what the function seems to use as a default value. >=20 > With these fixes, openjdk7 builds and runs fine for me. I tried to run > "gmake test" in the work directory, but that didn't do much, so I am > not sure if a full test suite will survive anything. It would be nice > if anybody knows a good way to test the produced binaries more > thoroughly. >=20 > -Dimitry >=20 >=20 --mDTzbtJQQC4mO8fU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQIcBAEBAgAGBQJSNU6JAAoJEJDCuSvBvK1BC8IP/A6Cd4anXv/w1o0gEN2r9tpn NR+QzRhrN7ej7Q6FwLvmG40ue6IJhst7qbL4x80Fs6o87NjuUOWyXNRpWQMWkGxU SH+KoxiU9fx3zQLZ8q0jF8671UM4lSKNKcEV0wJdvA4F16H8vO+ufRnfRF0SkQVQ mLxOLJoSIM/nqT0VDFaDwI+LXwv/EvAs+KjFqpoq30cnjJe79owzSCJK4+5tNnLS JyLDt3q1ZxjeAcq1k+2DPE4ghLkPeYhZ801sXG1aos6ziMz+e2TPbzvODLJsld3+ FlFHOx2MG6cQOdJiBPn3VdALazKuZNENf3GqftNo5y4hMOIgsEJZA5+GBBloM44X +VIN4nHa5e9qOA9E0EKpUGoezGMqLmHuNysrPeCZdiCGVDGq45h/x7oEJvKwcu1I VWdwUP+xlviK8NKZnUGmwjPpqXny1A8tlEMTZ/JnE7UHerTgJ9Bq0UZmMIGa5v2Y nsDQeRplKEhyoWF51gkjiHFoeFQqON9B35F1GIxad4RLDGb5ZPlyYPvJMRwBswBM nDTMslyi/zfhObVLQmynjxqo0GFjyS03fDIJqcZt1ahBmLEu+a57vx/S07109BsC mOSLh+eIh1jazaLbzLh+YK7bNow4oW/ZVZuKBvZQps2kgPQmlW9Xb6Q0m8lYgA6F LJ3v+aiel7+O/yDCR8R6 =L6xc -----END PGP SIGNATURE----- --mDTzbtJQQC4mO8fU--