From owner-freebsd-arm@freebsd.org Mon Jan 16 14:20:53 2017 Return-Path: Delivered-To: freebsd-arm@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 53EE2CB1630 for ; Mon, 16 Jan 2017 14:20:53 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5A2F1279 for ; Mon, 16 Jan 2017 14:20:52 +0000 (UTC) (envelope-from rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1484576449; l=3360; s=domk; d=obsigna.com; h=In-Reply-To:To:References:Date:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From; bh=3AGEn6COOZt6MSrcT1qLs7ocGsxhK3ai5yZyM0P6zaQ=; b=sKceAuP1rY5fxdpfdc14EC11txo0PGHGVbKbOdPXoz3G+bRy+ehvp6xn68/rk1msRC LOuczgoII4OSLV61Yoo4yuOoy66vXQYlJwxYeeucNpNVydT5eOzeghFu73i0S7AAvUPN JDA4YTg5z1cLDF97oabMNk5wBfm4A2zTPaGxY= X-RZG-AUTH: :O2kGeEG7b/pS1EK7WHa0hxqKZr4lnx6UhT0M0o35iAdWtoM07Gt3wQHFGh0i99HgKKA= X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com (bb02b584.virtua.com.br [187.2.181.132]) by smtp.strato.de (RZmta 39.11 DYNA|AUTH) with ESMTPSA id j090f4t0GEKnmXu (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Mon, 16 Jan 2017 15:20:49 +0100 (CET) Received: from rolf.projectworld.net (rolf.projectworld.net [192.168.222.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 613317506D97 for ; Mon, 16 Jan 2017 12:20:46 -0200 (BRST) From: "Dr. Rolf Jansen" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: lldb on BeagleBone Black Date: Mon, 16 Jan 2017 12:20:45 -0200 References: <3DA2368D-AE7B-4D69-A634-2861D2EFA9AE@obsigna.com> <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com> <0ee18ae6-7588-97c9-bc04-3ad83b0c33b3@freebsd.org> <34EB351A-3BA9-4D38-AF1C-96B065564C42@obsigna.com> To: freebsd-arm@freebsd.org In-Reply-To: <34EB351A-3BA9-4D38-AF1C-96B065564C42@obsigna.com> Message-Id: <06672183-F0A6-47C9-AC53-091515CBEBC3@obsigna.com> X-Mailer: Apple Mail (2.3259) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 14:20:53 -0000 > Am 13.01.2017 um 21:48 schrieb Dr. Rolf Jansen : >> Am 11.01.2017 um 14:43 schrieb Michal Meloun = : >> On 11.01.2017 14:20, Dr. Rolf Jansen wrote: >>>> Am 09.01.2017 um 00:59 schrieb Dr. Rolf Jansen : >>>>=20 >>>> I am running FreeBSD 12.0-CURRENT (BEAGLEBONE) #0 r311461: Fri Jan = 6 03:13:01 UTC 2017 >>>>=20 >>>> Does any of the llvm ports build on the BBB? I am looking for a = working lldb, and pre-build packages are not available, and I fear there = is a certain reason why not -- perhaps build failures? >>>>=20 >>>> Therefore, is it actually possible to obtain a working lldb (with = gui option) for armv6 by building e.g. devel/llvm-devel on my BeagleBone = Black? >>>>=20 >>>> Which of the llvm-ports would be most promising? >>>=20 >>> I tried building devel/llvm-devel having the ports tree attached on = a fast USB disk. After 36 h of building it bailed out because of some = obscure error in the AArch64 code generator. >>>=20 >>> Finally, I don't think that building any LLVM port is viable on the = BBB, first because building takes forever. The BBB needs 1 minute for = compiling a C++ file which got only 20 lines of code. Of course this = comes because the C++ experts tend for some ingenious reasons to hide = all the implementations into the headers which need then to be compiled = again and again. Second, it doesn't make sense at all to build LLVM for = all the possible targets on a machine which I will never ever use for = cross-development. >>>=20 >>> I will now try a non-ports build of LLVM 3.91 for the armv6 target = only. >>>=20 >>> Best regards >>>=20 >>> Rolf >>=20 >> Latest buildable llvm is 37. Any newer fails with overflow for >> R_ARM_CALL relocation. >> Michal >=20 > Michal, thank you very much for your hint. >=20 > I started with the non-ports build of LLVM 3.91 for the ARM target = already once I received your message, and for the sake of satisfying my = curiosity I let it go. As a matter of fact, building and installing = completed successfully, only it took apprx. 48 h. >=20 > cmake .. -DLLVM_TARGETS_TO_BUILD=3D"ARM" -DCMAKE_BUILD_TYPE=3DRelease = -G Ninja > ninja lldb install >=20 > However, the resulting lldb fails to run any target, even the simplest = hello-world one crashes. >=20 > # lldb -- hello > (lldb) target create "hello" > Current executable set to 'hello' (arm). > (lldb) run > Process 592 launching > Process 592 launched: '/root/install/hello' (arm) > Process 592 stopped > * thread #1: tid =3D 100089, 0x000083a8 hello, stop reason =3D = signal SIGILL: illegal instruction > frame #0: 0x000083a8 hello > hello`: > -> 0x83a8 <+0>: mov r5, r2 > 0x83ac <+4>: mov r4, r1 > 0x83b0 <+8>: mov r3, r0 > 0x83b4 <+12>: ldr r0, [sp] >=20 >=20 > I am now building LLVM 37 from the ports on the BeagleBone Black = running FreeBSD 12.0-CURRENT. I will let you now the results. Building and installation of devel/llvm37 from the ports went well = without problems, however, lldb37 is only of minor usefulness since = stepping-into/over lines of code does not work. I can set breakpoint, = and execution stops fine on breakpoints, however, when I hit 'n' or 's', = the program simply continues execution in a normal fashion until end. Best regards Rolf