Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 20 Mar 2023 00:05:07 -0400
From: Jeffrey Walton <noloader@...il.com>
To: musl@...ts.openwall.com
Cc: Rich Felker <dalias@...c.org>
Subject: Re: mcm native compile and llvm.

On Sun, Mar 19, 2023 at 8:32 PM Rob Landley <rob@...dley.net> wrote:
>
> 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...)

Maybe

   -arm*) ARCH=arm ;;
   -aarch64*) ARCH=aarch64 ;;
   +arm64*|aarch64*) ARCH=aarch64 ;;
   +thumb*|arm*) ARCH=arm ;;

To ensure 'arm64' does not match 'arm*'.

Jeff

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.