On 4/8/21 6:08 am, toybox-requ...@lists.landley.net wrote:
---------------------------------------------------------------------- Message: 1 Date: Tue, 3 Aug 2021 04:26:55 -0500 From: Rob Landley <r...@landley.net> To: toybox <toybox@lists.landley.net> Subject: [Toybox] scripts/llvm-buildall.sh? Message-ID: <236ec4a2-c915-854c-8913-61d3291af...@landley.net> Content-Type: text/plain; charset=utf-8 In https://landley.net/toybox/faq.html#cross there are three build options listed: 1) using your linux distro's host toolchain (probably glibc based) 2) using the Android NDK 3) using the musl+gcc toolchain I supply a scripts/mcm-buildall.sh to build (Except for #3 I won't post binaries of because GPLv3 is too toxic for me to mess with without a corporate legal department providing cover, which has admittedly been a limiting factor.) Recently I've been poking at adding Qualcomm Hexagon support to the https://landley.net/toybox/downloads/binaries/mkroot/latest/ target list, and hexagon only has upstream support in llvm, not in vanilla gcc. (Which is probably my fault actually; long story, related to https://landley.net/notes-2012.html#24-02-2012.) I started down this path because I found out last month that qemu had an llvm build script checked into its test suite, and I went down a longish rathole to make that work for me (starting at https://lists.nongnu.org/archive/html/qemu-devel/2021-07/msg02992.html and https://landley.net/notes-2021.html#12-07-2021 and eventually coming up with a working script at https://www.openwall.com/lists/musl/2021/07/25/2). Then I tried to genericize it to build more llvm targets and the "clang-rt" package (their libgcc replacement) is, um... extremely brittle. (https://landley.net/notes-2021.html#28-07-2021) What I'd LIKE to do is create a scripts/llvm-buildall.sh that builds all the supported musl+llvm targets the way mcm-buildall.sh does for musl+gcc. And getting llvm-project itself to do that was pretty straightforward (it builds them all by default). But clang-rt depends on the target libc headers being there first (...why?) and then the invocation is... yeah. I'm currently reading https://llvm.org/docs/HowToCrossCompileBuiltinsOnArm.html but the OTHER llvm toolchain I've been using is the Android NDK, and THAT successfully builds clang-rt for multiple architectures already: android-ndk-r21d$ find . -name 'libclang_rt.*.so' | wc 22 22 2375 android-ndk-r21d$ find . -name 'libclang_rt.*.a' | wc 68 68 7284 Plus it's building bionic from source, which would be nice to know how to do. So I looked at: https://android.googlesource.com/platform/manifest/+/master-ndk/ And, um... huh. Well, clang-rt is part of llvm-project so... https://android.googlesource.com/toolchain/llvm-project/+/refs/heads/master Last updated in 2019? Am I looking in the wrong place?
do you mean https://compiler-rt.llvm.org/ and https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.1 ? or do you need to look under https://android.googlesource.com/toolchain/llvm-project/+/refs/heads/main and not master regards scsijon
Confused, Rob ------------------------------
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net