|
Message-ID: <58d9cdc5-db60-be97-ebf4-2ad43029b8bf@landley.net>
Date: Sun, 19 Mar 2023 19:46:34 -0500
From: Rob Landley <rob@...dley.net>
To: Rich Felker <dalias@...c.org>, musl <musl@...ts.openwall.com>
Subject: mcm native compile and llvm.
1) In case you missed the #musl irc backscroll, building current mcm tip of tree
works but building native compilers with the results fails unless you add
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80196#c13 to patches/gcc-11.2.0
list, which is the exact same fix they applied upstream:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=4fde88e5dd152fe866a97b12e0f8229970d15cb3
So it's basically a backport. Attached is the one I used, which Worked For Me.
(P.S. Apparently gcc 11.2.0 build breaks configuring libstdc++ on a machine that
hasn't got floating point support, so even the _cross_ armv7r toolchain doesn't
build anymore. Possibly I need to beat soft float out of it in the config
somewhere? Oh well...)
2) I have an old blog entry: https://landley.net/notes-2021.html#28-07-2021
Where I was building clang/llvm compilers, which resulted in this patch against
musl (ported to current git):
diff --git a/configure b/configure
index 853bf05e..61471d61 100755
--- a/configure
+++ b/configure
@@ -321,8 +321,8 @@ printf "%s\n" "$target"
#
case "$target" in
# Catch these early to simplify matching for 32-bit archs
-arm*) ARCH=arm ;;
-aarch64*) ARCH=aarch64 ;;
+thumb*|arm*) ARCH=arm ;;
+arm64*|aarch64*) ARCH=aarch64 ;;
i?86-nt32*) ARCH=nt32 ;;
i?86*) ARCH=i386 ;;
x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
@@ -337,7 +337,7 @@ powerpc64*|ppc64*) ARCH=powerpc64 ;;
powerpc*|ppc*) ARCH=powerpc ;;
riscv64*) ARCH=riscv64 ;;
sh[1-9bel-]*|sh|superh*) ARCH=sh ;;
-s390x*) ARCH=s390x ;;
+s390x*|systemz*) ARCH=s390x ;;
unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;
*) fail "$0: unknown or unsupported target \"$target\"" ;;
esac
Because llvm uses different tuple names from the gnu/dammit stuff and it might
be nice to support both? (Is anybody else out there building musl clang
toolchains? I fished a hexagon build out of qemu's test infrastructure, and I
got pointed at google fuchsia doing x86 and arm, but that's 3 architectures
total and the hexagon build broke when I pulled a newer llvm...)
Rob
View attachment "0006-native.diff" of type "text/x-patch" (871 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.