From owner-freebsd-bugs@freebsd.org Mon Feb 29 19:59:13 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74D8BAB8C76 for ; Mon, 29 Feb 2016 19:59:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 592CF1175 for ; Mon, 29 Feb 2016 19:59:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u1TJxDl0015073 for ; Mon, 29 Feb 2016 19:59:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207599] kernel built with clang fails to boot on ppc64 qemu Date: Mon, 29 Feb 2016 19:59:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kennethsalerno@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Feb 2016 19:59:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207599 Bug ID: 207599 Summary: kernel built with clang fails to boot on ppc64 qemu Product: Base System Version: 11.0-CURRENT Hardware: ppc OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: kennethsalerno@yahoo.com Created attachment 167575 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D167575&action= =3Dedit Patches to build for ppc64 with clang Used the attached modifications to build ppc64 kernel with clang (building world only required a small kludge with bfd ld but otherwise works fine).=20 Same kernel was tested building with CC:=3D gcc and COMPILER_TYPE:=3D gcc in sys/conf/Makefile.powerpc64 and that kernel boot just fine. I would like to= get the kernel built by clang work though... make.conf used: NO_WERROR =3D WERROR =3D WITH_CLANG =3D yes WITH_CLANG_BOOTSTRAP =3D yes WITH_CLANG_FULL =3D yes WITH_CLANG_IS_CC =3D yes WITH_GCC =3D yes WITH_GCC_BOOTSTRAP =3D yes WITHOUT_GNUCXX =3D yes When booting, hangs here: Kernel entry at 0x100160 ... objdump says that 0x100160 is a good address in /boot/kernel/kernel pointin= g to __start like it should: 0000000000100160 <.__start>: 100160: 48 00 00 08 b 100168 <.__start+0x8> 100164: 60 00 00 00 nop 100168: 60 00 00 00 nop 10016c: 48 00 00 0d bl 100178 <.__start+0x18> 100170: 00 00 00 00 .long 0x0 100174: 00 4b be 90 .long 0x4bbe90 100178: 7c 48 02 a6 mflr r2 10017c: e8 22 00 00 ld r1,0(r2) 100180: 7c 41 12 14 add r2,r1,r2 100184: eb e2 80 00 ld r31,-32768(r2) 100188: 7f ff 10 50 subf r31,r31,r2 10018c: e8 22 00 00 ld r1,0(r2) 100190: 38 21 3f a0 addi r1,r1,16288 100194: 7c 21 fa 14 add r1,r1,r31 100198: f8 61 00 30 std r3,48(r1) 10019c: f8 81 00 38 std r4,56(r1) 1001a0: f8 a1 00 40 std r5,64(r1) Contents of CPU registers: (qemu) info registers=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 NIP 000000007dbe0780 LR 000000007dbe0308 CTR 000000007dbe0210 XER 000000000000 MSR 0000000000000010 HID0 0000000000000000 HF 0000000000000000 idx 1=20=20= =20=20=20=20=20=20=20=20=20 TB 00000003 16089762103 DECR 1090107081=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 GPR00 000000007dbe0780 000000007e45e0f0 000000007dbff728 0000000000000003 GPR04 0000000000000380 0000000000003950 000000007dc3f728 0000000000000fe0 GPR08 0000000000000080 000000000073ed10 0000000000000000 0000000000000000 GPR12 0000000000743900 0000000000708f50 0000000000000000 0000000000000000 GPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20 0000000000000000 0000000001801bc0 00000000005bc000 0000000000009001 GPR24 00000000005bc000 0000000000743900 0000000000708f50 000000000073ee20 GPR28 0000000000002000 ffffffffffffffff 0000000000003d98 0000000000003a20 CR 84400028 [ L G G - - - E L ] RES ffffffffffffffff FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000 FPSCR 0000000000000000 SRR0 000000007dbe0780 SRR1 0000000000000010 PVR 00000000004d0100 VRSAVE 000 SPRG0 000000007dbe0308 SPRG1 000000007e45e0f0 SPRG2 000000007dbe0210 SPRG3 008 SPRG4 0000000000000000 SPRG5 0000000000000000 SPRG6 0000000000000000 SPRG7 000 CFAR 000000007dbe033c SDR1 0000000043230007 DAR 000000007dc41000 DSISR 0000000000000000 Any help on where to begin troubleshooting where the execution is stopping would be appreciated. Which source file for the kernel contains the first s= et of instructions when control is handed over from the boot loader? Thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=