From owner-freebsd-sparc64@FreeBSD.ORG Sat Sep 13 16:02:52 2014 Return-Path: Delivered-To: freebsd-sparc64@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 ESMTPS id C700F551 for ; Sat, 13 Sep 2014 16:02:52 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A4A295B for ; Sat, 13 Sep 2014 16:02:49 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XSpmh-0002XS-DX for freebsd-sparc64@FreeBSD.org; Sat, 13 Sep 2014 18:02:47 +0200 Message-ID: <54146A9E.4070800@FreeBSD.org> Date: Sat, 13 Sep 2014 18:02:38 +0200 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: freebsd-sparc64@FreeBSD.org Subject: Playing with HEAD/sparc64 and clang Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nP200oMqFDB8GrsMSkWffnOKalITIOnRC" X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 16:02:53 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nP200oMqFDB8GrsMSkWffnOKalITIOnRC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! With the help of Roman Divacky, I started to play with clang on sparc64. The build of the kernel and world completes (though, I use a patch to pcpu.h provided by Roman). However, the loader fail to load the kernel, and I'm not sure the world binaries are correct. =3D=3D Compilation =3D=3D First, I cross-build kernel and world on an amd64 computer. The source tree is at r271475. Here are the variables I set in the environment: export MAKEOBJDIRPREFIX=3D$(pwd) export TARGET=3Dsparc64 export TARGET_ARCH=3Dsparc64 export WITH_CLANG_BOOTSTRAP=3Dy export WITH_CLANG=3Dy export WITH_CLANG_IS_CC=3Dy export WITH_LIBCPLUSPLUS=3Dy Compared to mail sent by Dimitry Andric in last February [1], I added WITH_CLANG_BOOTSTRAP. Otherwise, clang isn't build early enough and the host compiler is used (producing amd64 binaries). =3D=3D Kernel =3D=3D When I boot the kernel built with clang, I get: jumping to kernel entry at 0xc00a8000 Data Access Exception Then, I'm left at the OpenBoot prompt. =3D=3D World =3D=3D I install world in an alternate directory. When I run bin/sh from that directory, it works. When I set LD_LIBRARY_PATH to point to $directory/lib and run bin/sh, it works. When I run "chroot $directory /bin/sh", I get: Illegal instruction The computer is a Sun Ultra60 with dual UltraSPARC II 450 MHz. Its dmesg is here: https://people.freebsd.org/~dumbbell/sparc64/freebsd-ultra60-dmesg.txt I'm ready to provide any information required and test patches :) [1] https://lists.freebsd.org/pipermail/freebsd-sparc64/2014-February/009233.= html --=20 Jean-S=C3=A9bastien P=C3=A9dron --nP200oMqFDB8GrsMSkWffnOKalITIOnRC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUFGqnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMnikQAMiPv83O2F/j4q3qTTMj6PD7 paXHaPYayYCaVJp/FqiDHLI5xszryv+MzTR0WkvE2dTEcmPjGd9lMYme/mbrPmgb BnMh9EIqrZSgwhXNkc3sHFkYmzcErbOCxc9xeGZmmeyIchBD53WVD56ln8NKRH/F udO9Vd1Z+lWg3lMw54jk+hJXOIH41RwLbBqO4m+hmVedCZFwDVuoTbUuSrbL0JKy aYBdziQ9uxc/tMrxIdKt+XUoZSv07f4sOUW4m5ikcRxI15abF7rW/+6SHgTn1S9h JJK+hR/oMmP03tVfyzbaTYNiErPoGBkuSVhmdzQxQxxoKvXVGV7u/3e0sO3duiLh pMoWamoVjyk55fBxJJ70HQol6L88JiNXeckoKh4gU7XiHZAHGuabezq9+Pa8cxgr RgsOYWWNSOuPVJKba2cn2bytEzil8mfnM+vvlC5RKlGam9T/4ctCWSmulBZ7zqLk kxDUOY5wyBHgw1fgzLhTK/iCGpxEaciC8VcJQc0DPXgz71C1ggavY1cLqTvNBUSk aXYlZ9VQWWmJ7ygVwFqGyqrl5dqAk63sWhr1HsXFsirE8UctzbK13kp5YuHWbkgH El5U5fVbZfAKHhJEXP+r9gEoz3YoiEZFl19GeK6M8UJ19nOMQmto315WqZKbI7ST ofhBppPDW+QzUUYLFgqS =c7Jx -----END PGP SIGNATURE----- --nP200oMqFDB8GrsMSkWffnOKalITIOnRC-- From owner-freebsd-sparc64@FreeBSD.ORG Sat Sep 13 19:05:21 2014 Return-Path: Delivered-To: freebsd-sparc64@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69BD1859; Sat, 13 Sep 2014 19:05:21 +0000 (UTC) Received: from darkthrone.kvedulv.de (darkthrone.kvedulv.de [IPv6:2001:1578:400:101::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "darkthrone.kvedulv.de", Issuer "Gandi Standard SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 214DAD23; Sat, 13 Sep 2014 19:05:21 +0000 (UTC) Received: by darkthrone.kvedulv.de (Postfix, from userid 666) id 95501191F; Sat, 13 Sep 2014 21:05:16 +0200 (CEST) Date: Sat, 13 Sep 2014 21:05:16 +0200 From: Michael Moll To: =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= Subject: Re: Playing with HEAD/sparc64 and clang Message-ID: <20140913190516.GB96075@darkthrone.kvedulv.de> References: <54146A9E.4070800@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54146A9E.4070800@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-sparc64@FreeBSD.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 19:05:21 -0000 Hi, On Sat, Sep 13, 2014 at 06:02:38PM +0200, Jean-Sébastien Pédron wrote: > When I boot the kernel built with clang, I get: > jumping to kernel entry at 0xc00a8000 > Data Access Exception > > Then, I'm left at the OpenBoot prompt. To my knowledge, the last communication about that topic has been around February/March 2014, but no working patch turned up. Regards -- Michael Moll