From owner-freebsd-arm@FreeBSD.ORG Tue Jun 25 03:08:03 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B9AB3CE2 for ; Tue, 25 Jun 2013 03:08:03 +0000 (UTC) (envelope-from alie@affle.com) Received: from mail-qe0-x22e.google.com (mail-qe0-x22e.google.com [IPv6:2607:f8b0:400d:c02::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7991F54 for ; Tue, 25 Jun 2013 03:08:03 +0000 (UTC) Received: by mail-qe0-f46.google.com with SMTP id nd7so459389qeb.5 for ; Mon, 24 Jun 2013 20:08:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=P9u6yFvNNN5tumflv+Pa1ECeIezMSOdShuiLRXugxIk=; b=X1UVPUl5uLBdOeTDjikWWXLb3nXitLQhWRLSBwXjo6evjzge5Vn/Jbr6UPctHDBSRl tExd0Dupqny0bm7BXWGSE0kVOa2OFzG6uf6wBRfogxhuO9s8JlBoZ05/ihYZKE4VKcZy hL9PSMgXmf2PzK2nHfZKLjiSKsGL7zZn9gMpQTc3mTdKIKUVZEIXzFpH14sue2tFg+vI outwytmPHRcJHuyerPFWoz4tFTVkGC+74s+cZVaHr2V8VM2+TT6J9EwDnv+G2TmadafI V3EWKu3Pad7LmmKCng6BiDZ+TvOU+XRU4sCP1p9UWtvjO4aXdFgoBD3lA7m2vsfRjGNO GI/w== MIME-Version: 1.0 X-Received: by 10.224.59.200 with SMTP id m8mr29961618qah.43.1372129683025; Mon, 24 Jun 2013 20:08:03 -0700 (PDT) Received: by 10.49.84.168 with HTTP; Mon, 24 Jun 2013 20:08:02 -0700 (PDT) In-Reply-To: <9312A37D-E708-4369-9702-53BB9B6636C8@vt.edu> References: <800732D1-B06A-40AE-AE69-F6170662B2AA@turbofuzz.com> <3B1B1A39-13AF-4718-A9D6-757D6FEFC27F@bsdimp.com> <9312A37D-E708-4369-9702-53BB9B6636C8@vt.edu> Date: Tue, 25 Jun 2013 11:08:02 +0800 Message-ID: Subject: Re: Raspberry pi not ready to self-host yet? From: Alie Tan To: Paul Mather X-Gm-Message-State: ALoCoQmuujKsHwqc6Y01sdTrggMFj4A0YTk84JPDl5RyoNDab0PugSVVoHbtqnfsY4VbkS0VW3iQ Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "Jordan K. Hubbard" , "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 03:08:03 -0000 On Mon, Jun 24, 2013 at 11:18 PM, Paul Mather wrote: > On Jun 24, 2013, at 11:01 AM, Warner Losh wrote: > > > > > On Jun 24, 2013, at 8:55 AM, Jordan K. Hubbard wrote: > > > >> Hi folks, > >> > >> I followed the instructions in the repo at > https://github.com/daveish/freebsd-arm-tools.git and was able to create a > bootable SD image for my 512Mb PI in no time with very little hassle - nice > job there! > >> > >> What I can't seem to manage, however, is to self-host after that. I > see someone has already filed > http://www.freebsd.org/cgi/query-pr.cgi?pr=178495 covering the failure > during buildworld, You see the same compilation error in basic_string.tcc > in various ports, like apr: > >> > >> 0. Program arguments: /usr/bin/c++ -cc1 -triple > armv6-unknown-freebsd10.0 -S -disable-free -main-file-name cxx_db.cpp > -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -mconstructor-aliases > -target-abi apcs-gnu -target-cpu arm1136jf-s -msoft-float -mfloat-abi soft > -target-feature +soft-float -target-feature +soft-float-abi -target-feature > -neon -coverage-file /tmp/cxx_db-5qpGsC.s -resource-dir > /usr/bin/../lib/clang/3.3 -D _THREAD_SAFE -D PIC -I . -I ./../dist/.. -O2 > -fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir > /a/ports/databases/db42/work/db-4.2.52/build_unix -ferror-limit 19 > -fmessage-length 144 -mstackrealign -fno-signed-char -fobjc-runtime=gnustep > -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions > -fsjlj-exceptions -fdiagnostics-show-option -fcolor-diagnostics > -backend-option -vectorize-loops -o /tmp/cxx_db-5qpGsC.s -x c++ > ./../dist/../cxx/cxx_db.cpp > >> 1. /usr/include/c++/4.2/bits/basic_string.tcc:978:43: current parser > token ';' > >> 2. /usr/include/c++/4.2/bits/basic_string.tcc:48:1 > : parsing namespace > 'std' > >> c++: error: unable to execute command: Segmentation fault (core dumped) > >> c++: error: clang frontend command failed due to signal (use -v to see > invocation) > > > > do you have enough swap? Clang is a memory pig dog... > > > >> In the kernel, there seems to be something weird with the atomics > because linking always fails: > >> > >> kern_event.o: In function `filt_timerattach': > >> /a/src/sys/kern/kern_event.c:555: undefined reference to > `__atomic_load_4' > >> /a/src/sys/kern/kern_event.c:559: undefined reference to > `__atomic_compare_exchange_4' > >> kern_event.o: In function `filt_timerdetach': > >> /a/src/sys/kern/kern_event.c:584: undefined reference to > `__atomic_fetch_sub_4' > > > > Now that's odd. I'll look into that... > > > >> I do appreciate that it's a heck of a lot easier to cross-compile for > these things, and great work getting things to this point, but self-hosting > is still one of the magical milestones you always hope an embedded target > will get to someday, assuming it actually has enough grunt to do so (and I > think the PI does). :) > > > > I've self-hosted FreeBSD on an Atmel AT91SAM9620 recently (arm v5 > board)... Seems odd that cross compile and native built give different > results. Will look into it. Btw, whats uname -p say for you? > > I have only ever managed successfully to self-host on the Raspberry Pi > when using GCC, not Clang, to build as the default compiler. I think until > PR arm/178495 is resolved (which appears to rely on the LLVM folks fixing > it), it won't be possible to buildworld using Clang. > > Maybe the default compiler should be flipped back to GCC on arm, as it > appears Clang is not yet suitable for prime time there? > Using GCC to compile ARMV6 causing some of compilation issues > > Whatever alignment bug is affecting clang on arm doesn't appear to affect > clang on amd64, which is why I can happily cross-build a clang-based arm > image for my Raspberry Pi using crochet. > > Cheers, > > Paul. > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >