* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc1NZNxEPLonrHD++QPTYgq90Bwz0B16CLXiJrEAf-zNJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-13 13:21 ` Felix Janda via cfe-commits 2016-06-13 13:50 ` Lei Zhang 0 siblings, 1 reply; 23+ messages in thread From: Felix Janda via cfe-commits @ 2016-06-13 13:21 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits-NBbBogny7ofFcdTEL8lfRQ, cfe-commits-NBbBogny7ofFcdTEL8lfRQ [Added CC to the musl list] Lei Zhang wrote: > 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <joerg@bec.de>: > > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits wrote: > >> Hi, > >> > >> I'm replying to this thread; sorry I wasn't subscribed to the list, > >> thus cannot reply to it directly. > >> > >> http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html > >> > >> Joerg, thanks for your reply. Could you please tell me what kind of > >> test cases I should prepare? > > > > The target/triple parser has a unit test in > > unittests/ADT/TripleTest.cpp. The rest should get output validation in > > clang's test/Driver directory. Not sure which one is the primary > > GNU/Linux test. > > Thanks for the pointer :) > > The patches are re-attached with test cases included. Do they look sane enough? > --- lib/Driver/ToolChains.cpp (revision 272546) > +++ lib/Driver/ToolChains.cpp (working copy) > @@ -4152,6 +4152,8 @@ > > if (Triple.isAndroid()) > return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; > + else if (Triple.getEnvironment() == llvm::Triple::Musl) > + return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1"; It does not seem to me that the dynamic linker name detection will work on most archs not in the test cases. For example, the arm gentoo musl stage3's have the target triple armv7a-hardfloat-linux-musleabi and the dynamic linker name /lib/ld-musl-armhf.so.1 Generally, the dynamic linker name takes the form "/lib/ld-musl-$ARCH$SUBARCH.so.1", where the definite source for the values of $ARCH and $SUBARCH is musl's configure script. It seems difficult to get all cases right and some of them might not be very interesting, but it would be nice to have a more intelligent patch. See for example http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch Felix _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux 2016-06-13 13:21 ` [gentoo-musl] Re: Add support for musl-libc on Linux Felix Janda via cfe-commits @ 2016-06-13 13:50 ` Lei Zhang [not found] ` <CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Lei Zhang @ 2016-06-13 13:50 UTC (permalink / raw) To: Lei Zhang, llvm-commits, cfe-commits cfe, gentoo-musl, musl 2016-06-13 21:21 GMT+08:00 Felix Janda <felix.janda@posteo.de>: > [Added CC to the musl list] > > Lei Zhang wrote: >> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <joerg@bec.de>: >> > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits wrote: >> >> Hi, >> >> >> >> I'm replying to this thread; sorry I wasn't subscribed to the list, >> >> thus cannot reply to it directly. >> >> >> >> http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html >> >> >> >> Joerg, thanks for your reply. Could you please tell me what kind of >> >> test cases I should prepare? >> > >> > The target/triple parser has a unit test in >> > unittests/ADT/TripleTest.cpp. The rest should get output validation in >> > clang's test/Driver directory. Not sure which one is the primary >> > GNU/Linux test. >> >> Thanks for the pointer :) >> >> The patches are re-attached with test cases included. Do they look sane enough? > >> --- lib/Driver/ToolChains.cpp (revision 272546) >> +++ lib/Driver/ToolChains.cpp (working copy) >> @@ -4152,6 +4152,8 @@ >> >> if (Triple.isAndroid()) >> return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; >> + else if (Triple.getEnvironment() == llvm::Triple::Musl) >> + return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1"; > > It does not seem to me that the dynamic linker name detection will work > on most archs not in the test cases. For example, the arm gentoo musl > stage3's have the target triple You're right. Frankly I've only had x86 platforms on my mind so far; but I agree with Rafael that we could extend this to other archs in the future. > It seems difficult to get all cases right and some of them might not be > very interesting, but it would be nice to have a more intelligent patch. > See for example > > http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch This looks neat :) Lei ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-13 21:00 ` Rafael Espíndola via llvm-commits [not found] ` <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-14 8:47 ` Szabolcs Nagy 0 siblings, 2 replies; 23+ messages in thread From: Rafael Espíndola via llvm-commits @ 2016-06-13 21:00 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, cfe-commits cfe [-- Attachment #1.1: Type: text/plain, Size: 2466 bytes --] Do you need someone to commit it for you? On Jun 13, 2016 9:50 AM, "Lei Zhang via cfe-commits" < cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org> wrote: > 2016-06-13 21:21 GMT+08:00 Felix Janda <felix.janda-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>: > > [Added CC to the musl list] > > > > Lei Zhang wrote: > >> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger <joerg-DE4+3rq1sLY@public.gmane.org>: > >> > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits > wrote: > >> >> Hi, > >> >> > >> >> I'm replying to this thread; sorry I wasn't subscribed to the list, > >> >> thus cannot reply to it directly. > >> >> > >> >> > http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html > >> >> > >> >> Joerg, thanks for your reply. Could you please tell me what kind of > >> >> test cases I should prepare? > >> > > >> > The target/triple parser has a unit test in > >> > unittests/ADT/TripleTest.cpp. The rest should get output validation in > >> > clang's test/Driver directory. Not sure which one is the primary > >> > GNU/Linux test. > >> > >> Thanks for the pointer :) > >> > >> The patches are re-attached with test cases included. Do they look sane > enough? > > > >> --- lib/Driver/ToolChains.cpp (revision 272546) > >> +++ lib/Driver/ToolChains.cpp (working copy) > >> @@ -4152,6 +4152,8 @@ > >> > >> if (Triple.isAndroid()) > >> return Triple.isArch64Bit() ? "/system/bin/linker64" : > "/system/bin/linker"; > >> + else if (Triple.getEnvironment() == llvm::Triple::Musl) > >> + return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1"; > > > > It does not seem to me that the dynamic linker name detection will work > > on most archs not in the test cases. For example, the arm gentoo musl > > stage3's have the target triple > > You're right. Frankly I've only had x86 platforms on my mind so far; > but I agree with Rafael that we could extend this to other archs in > the future. > > > It seems difficult to get all cases right and some of them might not be > > very interesting, but it would be nice to have a more intelligent patch. > > See for example > > > > > http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch > > This looks neat :) > > > Lei > _______________________________________________ > cfe-commits mailing list > cfe-commits-NBbBogny7ofFcdTEL8lfRQ@public.gmane.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > [-- Attachment #1.2: Type: text/html, Size: 3832 bytes --] [-- Attachment #2: Type: text/plain, Size: 162 bytes --] _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-14 1:07 ` Lei Zhang via llvm-commits [not found] ` <CAOYuCc3gtPz8XhGyAsDcsCjvZPLDwSAGOXwXeu=urXmwck61mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Lei Zhang via llvm-commits @ 2016-06-14 1:07 UTC (permalink / raw) To: Rafael Espíndola Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, cfe-commits cfe 2016-06-14 5:00 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: > Do you need someone to commit it for you? Yes, please :) Lei _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc3gtPz8XhGyAsDcsCjvZPLDwSAGOXwXeu=urXmwck61mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc3gtPz8XhGyAsDcsCjvZPLDwSAGOXwXeu=urXmwck61mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-14 12:55 ` Rafael Espíndola via cfe-commits 2016-06-15 8:28 ` Lei Zhang via cfe-commits 0 siblings, 1 reply; 23+ messages in thread From: Rafael Espíndola via cfe-commits @ 2016-06-14 12:55 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, cfe-commits cfe On 13 June 2016 at 21:07, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-14 5:00 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: >> Do you need someone to commit it for you? > > Yes, please :) Committed. Cheers, Rafael _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux 2016-06-14 12:55 ` Rafael Espíndola via cfe-commits @ 2016-06-15 8:28 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc125C-5QjqWhK-QuU4zZvTqb+OsZhxQjowJidZaYBYY4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Lei Zhang via cfe-commits @ 2016-06-15 8:28 UTC (permalink / raw) To: Rafael Espíndola Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, cfe-commits cfe [-- Attachment #1: Type: text/plain, Size: 592 bytes --] 2016-06-14 20:55 GMT+08:00 Rafael Espíndola <rafael.espindola-Re5JQEeQqe8@public.gmane.orgm>: > On 13 June 2016 at 21:07, Lei Zhang <zhanglei.april-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> 2016-06-14 5:00 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: >>> Do you need someone to commit it for you? >> >> Yes, please :) > > Committed. Thanks! Here's another patch including test cases for various non-x86 archs, which should just work with my previous patches. ARM is left out purposely since it involves extra complexity. I'll work on it later. Lei [-- Attachment #2: musl-test.patch --] [-- Type: application/octet-stream, Size: 2180 bytes --] Index: test/Driver/linux-ld.c =================================================================== --- test/Driver/linux-ld.c (revision 272764) +++ test/Driver/linux-ld.c (working copy) @@ -1575,9 +1575,33 @@ // Check dynamic-linker for musl-libc // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=i386-pc-linux-musl \ -// RUN: | FileCheck --check-prefix=CHECK-MUSL32 %s +// RUN: | FileCheck --check-prefix=CHECK-MUSL-X86 %s // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=x86_64-pc-linux-musl \ -// RUN: | FileCheck --check-prefix=CHECK-MUSL64 %s -// CHECK-MUSL32: "-dynamic-linker" "/lib/ld-musl-i386.so.1" -// CHECK-MUSL64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" +// RUN: | FileCheck --check-prefix=CHECK-MUSL-X86_64 %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=mips-pc-linux-musl \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPS %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=mipsel-pc-linux-musl \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPSEL %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=mips64-pc-linux-musl \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPS64 %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=mips64el-pc-linux-musl \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-MIPS64EL %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=powerpc-pc-linux-musl \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=powerpc64-pc-linux-musl \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC64 %s +// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" +// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" +// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" +// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" +// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" +// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" +// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" +// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" [-- Attachment #3: Type: text/plain, Size: 159 bytes --] _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc125C-5QjqWhK-QuU4zZvTqb+OsZhxQjowJidZaYBYY4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc125C-5QjqWhK-QuU4zZvTqb+OsZhxQjowJidZaYBYY4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-15 20:09 ` Rafael Espíndola via cfe-commits 2016-06-17 9:50 ` Lei Zhang via cfe-commits 1 sibling, 0 replies; 23+ messages in thread From: Rafael Espíndola via cfe-commits @ 2016-06-15 20:09 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, cfe-commits cfe r272825, Thanks, Rafael On 15 June 2016 at 04:28, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-14 20:55 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: >> On 13 June 2016 at 21:07, Lei Zhang <zhanglei.april@gmail.com> wrote: >>> 2016-06-14 5:00 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: >>>> Do you need someone to commit it for you? >>> >>> Yes, please :) >> >> Committed. > > Thanks! > > Here's another patch including test cases for various non-x86 archs, > which should just work with my previous patches. ARM is left out > purposely since it involves extra complexity. I'll work on it later. > > > Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc125C-5QjqWhK-QuU4zZvTqb+OsZhxQjowJidZaYBYY4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-15 20:09 ` Rafael Espíndola via cfe-commits @ 2016-06-17 9:50 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc3C27jqG8uyCOkDgcOAcgaFXEz7k9O8+Tqyjv9WYH2M1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 23+ messages in thread From: Lei Zhang via cfe-commits @ 2016-06-17 9:50 UTC (permalink / raw) To: Rafael Espíndola, llvm-commits Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, cfe-commits cfe [-- Attachment #1: Type: text/plain, Size: 528 bytes --] 2016-06-15 16:28 GMT+08:00 Lei Zhang <zhanglei.april-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > Here's another patch including test cases for various non-x86 archs, > which should just work with my previous patches. ARM is left out > purposely since it involves extra complexity. I'll work on it later. Hi, Here are another two patches which add support for ARM, with some test cases included. They're a lot bigger than previous patches, and I'm not 100% sure if I missed anything. Any comments are utterly welcome :) Lei [-- Attachment #2: llvm-musl-arm.patch --] [-- Type: application/octet-stream, Size: 2548 bytes --] Index: include/llvm/ADT/Triple.h =================================================================== --- include/llvm/ADT/Triple.h (revision 272991) +++ include/llvm/ADT/Triple.h (working copy) @@ -180,6 +180,8 @@ EABIHF, Android, Musl, + MuslEABI, + MuslEABIHF, MSVC, Itanium, @@ -565,6 +567,13 @@ /// Tests whether the target is Android bool isAndroid() const { return getEnvironment() == Triple::Android; } + /// Tests whether the environment is musl-libc + bool isMusl() const { + return getEnvironment() == Triple::Musl || + getEnvironment() == Triple::MuslEABI || + getEnvironment() == Triple::MuslEABIHF; + } + /// Tests whether the target is NVPTX (32- or 64-bit). bool isNVPTX() const { return getArch() == Triple::nvptx || getArch() == Triple::nvptx64; Index: lib/Support/Triple.cpp =================================================================== --- lib/Support/Triple.cpp (revision 272991) +++ lib/Support/Triple.cpp (working copy) @@ -206,6 +206,8 @@ case EABIHF: return "eabihf"; case Android: return "android"; case Musl: return "musl"; + case MuslEABI: return "musleabi"; + case MuslEABIHF: return "musleabihf"; case MSVC: return "msvc"; case Itanium: return "itanium"; case Cygnus: return "cygnus"; @@ -465,6 +467,8 @@ .StartsWith("code16", Triple::CODE16) .StartsWith("gnu", Triple::GNU) .StartsWith("android", Triple::Android) + .StartsWith("musleabihf", Triple::MuslEABIHF) + .StartsWith("musleabi", Triple::MuslEABI) .StartsWith("musl", Triple::Musl) .StartsWith("msvc", Triple::MSVC) .StartsWith("itanium", Triple::Itanium) Index: unittests/ADT/TripleTest.cpp =================================================================== --- unittests/ADT/TripleTest.cpp (revision 272991) +++ unittests/ADT/TripleTest.cpp (working copy) @@ -99,6 +99,18 @@ EXPECT_EQ(Triple::Linux, T.getOS()); EXPECT_EQ(Triple::Musl, T.getEnvironment()); + T = Triple("arm-pc-linux-musleabi"); + EXPECT_EQ(Triple::arm, T.getArch()); + EXPECT_EQ(Triple::PC, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::MuslEABI, T.getEnvironment()); + + T = Triple("arm-pc-linux-musleabihf"); + EXPECT_EQ(Triple::arm, T.getArch()); + EXPECT_EQ(Triple::PC, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::MuslEABIHF, T.getEnvironment()); + T = Triple("powerpc-bgp-linux"); EXPECT_EQ(Triple::ppc, T.getArch()); EXPECT_EQ(Triple::BGP, T.getVendor()); [-- Attachment #3: clang-musl-arm.patch --] [-- Type: application/octet-stream, Size: 7965 bytes --] Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp (revision 272991) +++ lib/Basic/Targets.cpp (working copy) @@ -4863,6 +4863,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: setABI("aapcs-linux"); break; case llvm::Triple::EABIHF: Index: lib/CodeGen/TargetInfo.cpp =================================================================== --- lib/CodeGen/TargetInfo.cpp (revision 272991) +++ lib/CodeGen/TargetInfo.cpp (working copy) @@ -4962,6 +4962,8 @@ case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: return true; default: return false; @@ -4972,6 +4974,7 @@ switch (getTarget().getTriple().getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: return true; default: return false; @@ -7922,6 +7925,7 @@ else if (CodeGenOpts.FloatABI == "hard" || (CodeGenOpts.FloatABI != "soft" && (Triple.getEnvironment() == llvm::Triple::GNUEABIHF || + Triple.getEnvironment() == llvm::Triple::MuslEABIHF || Triple.getEnvironment() == llvm::Triple::EABIHF))) Kind = ARMABIInfo::AAPCS_VFP; Index: lib/Driver/ToolChains.cpp =================================================================== --- lib/Driver/ToolChains.cpp (revision 272991) +++ lib/Driver/ToolChains.cpp (working copy) @@ -4158,9 +4158,24 @@ if (Triple.isAndroid()) return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; - else if (Triple.getEnvironment() == llvm::Triple::Musl) - return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1"; + else if (Triple.isMusl()) { + std::string ArchName; + switch (Arch) { + case llvm::Triple::thumb: + ArchName = "arm"; + break; + case llvm::Triple::thumbeb: + ArchName = "armeb"; + break; + default: + ArchName = Triple.getArchName().str(); + } + if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF) + ArchName += "hf"; + return "/lib/ld-musl-" + ArchName + ".so.1"; + } + std::string LibDir; std::string Loader; Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp (revision 272991) +++ lib/Driver/Tools.cpp (working copy) @@ -796,10 +796,12 @@ default: switch (Triple.getEnvironment()) { case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: ABI = FloatABI::Hard; break; case llvm::Triple::GNUEABI: + case llvm::Triple::MuslEABI: case llvm::Triple::EABI: // EABI is always AAPCS, and if it was not marked 'hard', it's softfp ABI = FloatABI::SoftFP; @@ -1045,6 +1047,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: ABIName = "aapcs-linux"; break; case llvm::Triple::EABIHF: Index: test/Driver/arm-abi.c =================================================================== --- test/Driver/arm-abi.c (revision 272991) +++ test/Driver/arm-abi.c (working copy) @@ -28,7 +28,7 @@ // RUN: %clang -target arm--netbsd-eabihf %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s -// Otherwise, ABI is celected based on environment +// Otherwise, ABI is selected based on environment // RUN: %clang -target arm---android %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---gnueabi %s -### -o %t.o 2>&1 \ @@ -35,6 +35,10 @@ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---gnueabihf %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s +// RUN: %clang -target arm---musleabi %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s +// RUN: %clang -target arm---musleabihf %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---eabi %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // RUN: %clang -target arm---eabihf %s -### -o %t.o 2>&1 \ Index: test/Driver/linux-ld.c =================================================================== --- test/Driver/linux-ld.c (revision 272991) +++ test/Driver/linux-ld.c (working copy) @@ -1597,11 +1597,47 @@ // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=powerpc64-pc-linux-musl \ // RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC64 %s -// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" -// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" -// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" -// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" -// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" -// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" -// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" -// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumbeb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumbeb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=arm-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=arm-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armeb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armeb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64_be-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64_BE %s +// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" +// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" +// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" +// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" +// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" +// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" +// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" +// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" +// CHECK-MUSL-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1" +// CHECK-MUSL-ARMHF: "-dynamic-linker" "/lib/ld-musl-armhf.so.1" +// CHECK-MUSL-ARMEB: "-dynamic-linker" "/lib/ld-musl-armeb.so.1" +// CHECK-MUSL-ARMEBHF: "-dynamic-linker" "/lib/ld-musl-armebhf.so.1" +// CHECK-MUSL-AARCH64: "-dynamic-linker" "/lib/ld-musl-aarch64.so.1" +// CHECK-MUSL-AARCH64_BE: "-dynamic-linker" "/lib/ld-musl-aarch64_be.so.1" [-- Attachment #4: Type: text/plain, Size: 159 bytes --] _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc3C27jqG8uyCOkDgcOAcgaFXEz7k9O8+Tqyjv9WYH2M1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc3C27jqG8uyCOkDgcOAcgaFXEz7k9O8+Tqyjv9WYH2M1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-18 0:52 ` Rafael Espíndola via cfe-commits [not found] ` <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Rafael Espíndola via cfe-commits @ 2016-06-18 0:52 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, cfe-commits cfe There are probably a few more places that need to be patched. In particular, take a look at lib/Target/ARM. There are things like computeTargetABI and isTargetHardFloat that probably need to be updated (and tested). CCing Peter for an arm opinion. Cheers, Rafael On 17 June 2016 at 05:50, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-15 16:28 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>: >> Here's another patch including test cases for various non-x86 archs, >> which should just work with my previous patches. ARM is left out >> purposely since it involves extra complexity. I'll work on it later. > > Hi, > > Here are another two patches which add support for ARM, with some test > cases included. > > They're a lot bigger than previous patches, and I'm not 100% sure if I > missed anything. Any comments are utterly welcome :) > > > Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-20 9:37 ` Peter Smith via llvm-commits [not found] ` <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-20 11:05 ` Lei Zhang via llvm-commits 1 sibling, 1 reply; 23+ messages in thread From: Peter Smith via llvm-commits @ 2016-06-20 9:37 UTC (permalink / raw) To: Rafael Espíndola Cc: cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ Hello Lei, I agree with Rafael that this is currently missing a few critical things right now, especially in the llvm patch. My (limited) understanding of musl is that it intends to support the same interface as GNUEABI and GNUEABIHF, but it is obviously a different implementation. This is what I could find with a basic grep for GNUAEABI and working out from there. Clang patch I'm assuming you are only intending to support Musl on linux, and not BSD. ToolChains.cpp - getDynamicLinker() There is a Triple.getEnvironment() == llvm::triple::GNUEABIHF which selects between ld-linux-armhf.so.3 or ld-linux.so.3. I think you'll need ld-linux-armhf.so.3 for MUSLHF here as well. LLVM patch ARMSubtarget.h - isTargetGNUAEABI() I think you'll need to check all the callsites of this function, and check what you want isTargetMusl() to do. At present I think you'll want them to do the same thing in all cases except finding the implementation. There looks to be a trade off between adding MUSCL and MUSCLHF to isTargetGNUAEABI(), adding something like isTargetGNUAEABIInterface() and adding isTargetMusl() to all the callsites. - isTargetEHABICompatible() I'm making the assumption that musl supports the ARM exceptions EHABI, if so you'll want to add MUSL and MUSLHF here. - isTargetHardFloat() You'll want to add MUSLHF here. ARMTargetMachine.cpp - computeTargetABI() You'll want to add MUSL and MUSLHF alongside GNUEABI and GNUEABIHF in the switch. Hope this helps Peter On 18 June 2016 at 01:52, Rafael Espíndola <rafael.espindola@gmail.com> wrote: > There are probably a few more places that need to be patched. > > In particular, take a look at lib/Target/ARM. There are things like > computeTargetABI and isTargetHardFloat that probably need to be > updated (and tested). > > CCing Peter for an arm opinion. > > Cheers, > Rafael > > > On 17 June 2016 at 05:50, Lei Zhang <zhanglei.april@gmail.com> wrote: >> 2016-06-15 16:28 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>: >>> Here's another patch including test cases for various non-x86 archs, >>> which should just work with my previous patches. ARM is left out >>> purposely since it involves extra complexity. I'll work on it later. >> >> Hi, >> >> Here are another two patches which add support for ARM, with some test >> cases included. >> >> They're a lot bigger than previous patches, and I'm not 100% sure if I >> missed anything. Any comments are utterly welcome :) >> >> >> Lei _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-20 10:59 ` Lei Zhang via cfe-commits 2016-06-20 11:28 ` Szabolcs Nagy [not found] ` <CAOYuCc2yxgYFSzDjJP0SJho5Hs=zb635ysinwbg=SZ=CZJt9_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 2 replies; 23+ messages in thread From: Lei Zhang via cfe-commits @ 2016-06-20 10:59 UTC (permalink / raw) To: Peter Smith Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits 2016-06-20 17:37 GMT+08:00 Peter Smith <peter.smith@linaro.org>: > Hello Lei, Hi, thanks for your reply! > I agree with Rafael that this is currently missing a few critical > things right now, especially in the llvm patch. > > My (limited) understanding of musl is that it intends to support the > same interface as GNUEABI and GNUEABIHF, but it is obviously a > different implementation. > > This is what I could find with a basic grep for GNUAEABI and working > out from there. > > Clang patch > I'm assuming you are only intending to support Musl on linux, and not BSD. Yes. > ToolChains.cpp > - getDynamicLinker() > There is a Triple.getEnvironment() == llvm::triple::GNUEABIHF which > selects between ld-linux-armhf.so.3 or ld-linux.so.3. I think you'll > need ld-linux-armhf.so.3 for MUSLHF here as well. Actually musl's dynamic linker has a different naming scheme from glibc's, which is handled by an extra chunk of code in the patch. The code you mentioned won't be reached when musl is present, and thus need no change. > LLVM patch > ARMSubtarget.h > - isTargetGNUAEABI() > I think you'll need to check all the callsites of this function, and > check what you want isTargetMusl() to do. At present I think you'll > want them to do the same thing in all cases except finding the > implementation. There looks to be a trade off between adding MUSCL and > MUSCLHF to isTargetGNUAEABI(), adding something like > isTargetGNUAEABIInterface() and adding isTargetMusl() to all the > callsites. > > - isTargetEHABICompatible() > I'm making the assumption that musl supports the ARM exceptions EHABI, > if so you'll want to add MUSL and MUSLHF here. I'm not 100% sure about this. Could some insider from musl confirm this? > - isTargetHardFloat() > You'll want to add MUSLHF here. > > ARMTargetMachine.cpp > - computeTargetABI() > You'll want to add MUSL and MUSLHF alongside GNUEABI and GNUEABIHF in > the switch. > > Hope this helps In addition to what you mentioned, perhaps I should also add "Musl" as a new EABI type in TargetOptions.h (in LLVM), just side by side with "GNU", and change relevant bits in LLVM and clang accordingly. Thanks again, Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Re: [gentoo-musl] Re: Add support for musl-libc on Linux 2016-06-20 10:59 ` Lei Zhang via cfe-commits @ 2016-06-20 11:28 ` Szabolcs Nagy [not found] ` <CAOYuCc2yxgYFSzDjJP0SJho5Hs=zb635ysinwbg=SZ=CZJt9_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 0 replies; 23+ messages in thread From: Szabolcs Nagy @ 2016-06-20 11:28 UTC (permalink / raw) To: musl Cc: Peter Smith, Rafael Esp?ndola, llvm-commits, gentoo-musl, cfe-commits cfe * Lei Zhang <zhanglei.april@gmail.com> [2016-06-20 18:59:20 +0800]: > 2016-06-20 17:37 GMT+08:00 Peter Smith <peter.smith@linaro.org>: > > - isTargetEHABICompatible() > > I'm making the assumption that musl supports the ARM exceptions EHABI, > > if so you'll want to add MUSL and MUSLHF here. > > I'm not 100% sure about this. Could some insider from musl confirm this? musl is ehabi agnostic. ehabi and libc should be independent. throwing exceptions across libc boundary is undefined behaviour, all ehabi support is in the compiler runtime. ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc2yxgYFSzDjJP0SJho5Hs=zb635ysinwbg=SZ=CZJt9_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc2yxgYFSzDjJP0SJho5Hs=zb635ysinwbg=SZ=CZJt9_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-20 11:44 ` Peter Smith via cfe-commits [not found] ` <CAEt-8LCQ5H2vE_PXPxs+Gr2=roBT9BuT487w2at3UAKhFqqYxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Peter Smith via cfe-commits @ 2016-06-20 11:44 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits From what I can see, the EABI type is used to decide if certain __aeabi_ prefixed functions such as __aeabi_idiv are available. If Musl differs in function availability from the GNU library here I think you'll need a Musl EABI type. However if there is no difference you should be able to use the EABI::GNU type for Musl. You might find http://reviews.llvm.org/D12413 helpful here (introduction of -meabi option). Peter On 20 June 2016 at 11:59, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-20 17:37 GMT+08:00 Peter Smith <peter.smith@linaro.org>: >> Hello Lei, > > Hi, thanks for your reply! > >> I agree with Rafael that this is currently missing a few critical >> things right now, especially in the llvm patch. >> >> My (limited) understanding of musl is that it intends to support the >> same interface as GNUEABI and GNUEABIHF, but it is obviously a >> different implementation. >> >> This is what I could find with a basic grep for GNUAEABI and working >> out from there. >> >> Clang patch >> I'm assuming you are only intending to support Musl on linux, and not BSD. > > Yes. > >> ToolChains.cpp >> - getDynamicLinker() >> There is a Triple.getEnvironment() == llvm::triple::GNUEABIHF which >> selects between ld-linux-armhf.so.3 or ld-linux.so.3. I think you'll >> need ld-linux-armhf.so.3 for MUSLHF here as well. > > Actually musl's dynamic linker has a different naming scheme from > glibc's, which is handled by an extra chunk of code in the patch. The > code you mentioned won't be reached when musl is present, and thus > need no change. > >> LLVM patch >> ARMSubtarget.h >> - isTargetGNUAEABI() >> I think you'll need to check all the callsites of this function, and >> check what you want isTargetMusl() to do. At present I think you'll >> want them to do the same thing in all cases except finding the >> implementation. There looks to be a trade off between adding MUSCL and >> MUSCLHF to isTargetGNUAEABI(), adding something like >> isTargetGNUAEABIInterface() and adding isTargetMusl() to all the >> callsites. >> >> - isTargetEHABICompatible() >> I'm making the assumption that musl supports the ARM exceptions EHABI, >> if so you'll want to add MUSL and MUSLHF here. > > I'm not 100% sure about this. Could some insider from musl confirm this? > >> - isTargetHardFloat() >> You'll want to add MUSLHF here. >> >> ARMTargetMachine.cpp >> - computeTargetABI() >> You'll want to add MUSL and MUSLHF alongside GNUEABI and GNUEABIHF in >> the switch. >> >> Hope this helps > > In addition to what you mentioned, perhaps I should also add "Musl" as > a new EABI type in TargetOptions.h (in LLVM), just side by side with > "GNU", and change relevant bits in LLVM and clang accordingly. > > > Thanks again, > Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAEt-8LCQ5H2vE_PXPxs+Gr2=roBT9BuT487w2at3UAKhFqqYxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAEt-8LCQ5H2vE_PXPxs+Gr2=roBT9BuT487w2at3UAKhFqqYxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-20 13:09 ` Lei Zhang via llvm-commits 0 siblings, 0 replies; 23+ messages in thread From: Lei Zhang via llvm-commits @ 2016-06-20 13:09 UTC (permalink / raw) To: Peter Smith Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits 2016-06-20 19:44 GMT+08:00 Peter Smith <peter.smith@linaro.org>: > From what I can see, the EABI type is used to decide if certain > __aeabi_ prefixed functions such as __aeabi_idiv are available. If > Musl differs in function availability from the GNU library here I > think you'll need a Musl EABI type. However if there is no difference > you should be able to use the EABI::GNU type for Musl. I think musl and glibc is compatible on this; I'm just a little concerned that using EABI::GNU for both GNUEABI* and MuslEABI* might cause some confusion. > You might find http://reviews.llvm.org/D12413 helpful here > (introduction of -meabi option). It seems clang's -meabi option is incompatible with gcc's. Lei _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-20 9:37 ` Peter Smith via llvm-commits @ 2016-06-20 11:05 ` Lei Zhang via llvm-commits [not found] ` <CAOYuCc1+_xKLK2FOvCKNpKO4BZO07hd2Cbft8p_YO3chSR41UA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 23+ messages in thread From: Lei Zhang via llvm-commits @ 2016-06-20 11:05 UTC (permalink / raw) To: Rafael Espíndola Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, cfe-commits cfe 2016-06-18 8:52 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: > There are probably a few more places that need to be patched. > > In particular, take a look at lib/Target/ARM. There are things like > computeTargetABI and isTargetHardFloat that probably need to be > updated (and tested). Any hints how to test the new changes? I guess merely checking clang's output like the previous test cases won't suffice this time. Thanks, Lei _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc1+_xKLK2FOvCKNpKO4BZO07hd2Cbft8p_YO3chSR41UA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc1+_xKLK2FOvCKNpKO4BZO07hd2Cbft8p_YO3chSR41UA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-21 13:36 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc1_5a15MZ4tEQZAn84rf3Y7dzugzX1TTpSgACQ+d_k3Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Lei Zhang via cfe-commits @ 2016-06-21 13:36 UTC (permalink / raw) To: Rafael Espíndola Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits, cfe-commits cfe [-- Attachment #1: Type: text/plain, Size: 653 bytes --] 2016-06-20 19:05 GMT+08:00 Lei Zhang <zhanglei.april-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > 2016-06-18 8:52 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: >> There are probably a few more places that need to be patched. >> >> In particular, take a look at lib/Target/ARM. There are things like >> computeTargetABI and isTargetHardFloat that probably need to be >> updated (and tested). > > Any hints how to test the new changes? I guess merely checking clang's > output like the previous test cases won't suffice this time. Here're the refined patches. Please let me know if the test cases aren't complete. Thanks, Lei [-- Attachment #2: clang-musl-arm-v2.patch --] [-- Type: application/octet-stream, Size: 8964 bytes --] Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp (revision 273258) +++ lib/Basic/Targets.cpp (working copy) @@ -4876,6 +4876,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: setABI("aapcs-linux"); break; case llvm::Triple::EABIHF: Index: lib/CodeGen/TargetInfo.cpp =================================================================== --- lib/CodeGen/TargetInfo.cpp (revision 273258) +++ lib/CodeGen/TargetInfo.cpp (working copy) @@ -4962,6 +4962,8 @@ case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: return true; default: return false; @@ -4972,6 +4974,7 @@ switch (getTarget().getTriple().getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: return true; default: return false; @@ -7922,6 +7925,7 @@ else if (CodeGenOpts.FloatABI == "hard" || (CodeGenOpts.FloatABI != "soft" && (Triple.getEnvironment() == llvm::Triple::GNUEABIHF || + Triple.getEnvironment() == llvm::Triple::MuslEABIHF || Triple.getEnvironment() == llvm::Triple::EABIHF))) Kind = ARMABIInfo::AAPCS_VFP; Index: lib/Driver/ToolChains.cpp =================================================================== --- lib/Driver/ToolChains.cpp (revision 273258) +++ lib/Driver/ToolChains.cpp (working copy) @@ -4161,9 +4161,24 @@ if (Triple.isAndroid()) return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; - else if (Triple.getEnvironment() == llvm::Triple::Musl) - return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1"; + else if (Triple.isMusl()) { + std::string ArchName; + switch (Arch) { + case llvm::Triple::thumb: + ArchName = "arm"; + break; + case llvm::Triple::thumbeb: + ArchName = "armeb"; + break; + default: + ArchName = Triple.getArchName().str(); + } + if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF) + ArchName += "hf"; + return "/lib/ld-musl-" + ArchName + ".so.1"; + } + std::string LibDir; std::string Loader; Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp (revision 273258) +++ lib/Driver/Tools.cpp (working copy) @@ -803,10 +803,12 @@ default: switch (Triple.getEnvironment()) { case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: ABI = FloatABI::Hard; break; case llvm::Triple::GNUEABI: + case llvm::Triple::MuslEABI: case llvm::Triple::EABI: // EABI is always AAPCS, and if it was not marked 'hard', it's softfp ABI = FloatABI::SoftFP; @@ -1052,6 +1054,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: ABIName = "aapcs-linux"; break; case llvm::Triple::EABIHF: Index: test/CodeGen/arm-eabi.c =================================================================== --- test/CodeGen/arm-eabi.c (revision 273258) +++ test/CodeGen/arm-eabi.c (working copy) @@ -7,6 +7,14 @@ // RUN: %clang -target arm-none-gnueabi -S -meabi 5 -o - %s | FileCheck -check-prefix=CHECK-EABI %s // RUN: %clang -target arm-none-gnueabihf -S -o - %s | FileCheck -check-prefix=CHECK-GNUEABI %s // RUN: %clang -target arm-none-gnueabihf -S -meabi 5 -o - %s | FileCheck -check-prefix=CHECK-EABI %s +// RUN: %clang -target arm-none-musleabi -S -o - %s \ +// RUN: | FileCheck -check-prefix=CHECK-GNUEABI %s +// RUN: %clang -target arm-none-musleabi -S -o - %s -meabi 5 \ +// RUN: | FileCheck -check-prefix=CHECK-EABI %s +// RUN: %clang -target arm-none-musleabihf -S -o - %s \ +// RUN: | FileCheck -check-prefix=CHECK-GNUEABI %s +// RUN: %clang -target arm-none-musleabihf -S -o - %s -meabi 5 \ +// RUN: | FileCheck -check-prefix=CHECK-EABI %s struct my_s { unsigned long a[18]; Index: test/Driver/arm-abi.c =================================================================== --- test/Driver/arm-abi.c (revision 273258) +++ test/Driver/arm-abi.c (working copy) @@ -28,7 +28,7 @@ // RUN: %clang -target arm--netbsd-eabihf %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s -// Otherwise, ABI is celected based on environment +// Otherwise, ABI is selected based on environment // RUN: %clang -target arm---android %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---gnueabi %s -### -o %t.o 2>&1 \ @@ -35,6 +35,10 @@ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---gnueabihf %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s +// RUN: %clang -target arm---musleabi %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s +// RUN: %clang -target arm---musleabihf %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---eabi %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // RUN: %clang -target arm---eabihf %s -### -o %t.o 2>&1 \ Index: test/Driver/linux-ld.c =================================================================== --- test/Driver/linux-ld.c (revision 273258) +++ test/Driver/linux-ld.c (working copy) @@ -1606,11 +1606,47 @@ // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=powerpc64-pc-linux-musl \ // RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC64 %s -// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" -// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" -// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" -// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" -// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" -// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" -// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" -// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumbeb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumbeb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=arm-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=arm-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armeb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armeb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64_be-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64_BE %s +// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" +// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" +// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" +// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" +// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" +// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" +// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" +// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" +// CHECK-MUSL-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1" +// CHECK-MUSL-ARMHF: "-dynamic-linker" "/lib/ld-musl-armhf.so.1" +// CHECK-MUSL-ARMEB: "-dynamic-linker" "/lib/ld-musl-armeb.so.1" +// CHECK-MUSL-ARMEBHF: "-dynamic-linker" "/lib/ld-musl-armebhf.so.1" +// CHECK-MUSL-AARCH64: "-dynamic-linker" "/lib/ld-musl-aarch64.so.1" +// CHECK-MUSL-AARCH64_BE: "-dynamic-linker" "/lib/ld-musl-aarch64_be.so.1" [-- Attachment #3: llvm-musl-arm-v2.patch --] [-- Type: application/octet-stream, Size: 7227 bytes --] Index: include/llvm/ADT/Triple.h =================================================================== --- include/llvm/ADT/Triple.h (revision 273258) +++ include/llvm/ADT/Triple.h (working copy) @@ -180,6 +180,8 @@ EABIHF, Android, Musl, + MuslEABI, + MuslEABIHF, MSVC, Itanium, @@ -565,6 +567,13 @@ /// Tests whether the target is Android bool isAndroid() const { return getEnvironment() == Triple::Android; } + /// Tests whether the environment is musl-libc + bool isMusl() const { + return getEnvironment() == Triple::Musl || + getEnvironment() == Triple::MuslEABI || + getEnvironment() == Triple::MuslEABIHF; + } + /// Tests whether the target is NVPTX (32- or 64-bit). bool isNVPTX() const { return getArch() == Triple::nvptx || getArch() == Triple::nvptx64; Index: lib/Support/Triple.cpp =================================================================== --- lib/Support/Triple.cpp (revision 273258) +++ lib/Support/Triple.cpp (working copy) @@ -206,6 +206,8 @@ case EABIHF: return "eabihf"; case Android: return "android"; case Musl: return "musl"; + case MuslEABI: return "musleabi"; + case MuslEABIHF: return "musleabihf"; case MSVC: return "msvc"; case Itanium: return "itanium"; case Cygnus: return "cygnus"; @@ -465,6 +467,8 @@ .StartsWith("code16", Triple::CODE16) .StartsWith("gnu", Triple::GNU) .StartsWith("android", Triple::Android) + .StartsWith("musleabihf", Triple::MuslEABIHF) + .StartsWith("musleabi", Triple::MuslEABI) .StartsWith("musl", Triple::Musl) .StartsWith("msvc", Triple::MSVC) .StartsWith("itanium", Triple::Itanium) @@ -1454,6 +1458,7 @@ switch (getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: return "arm1176jzf-s"; default: return "arm7tdmi"; Index: lib/Target/ARM/ARMAsmPrinter.cpp =================================================================== --- lib/Target/ARM/ARMAsmPrinter.cpp (revision 273258) +++ lib/Target/ARM/ARMAsmPrinter.cpp (working copy) @@ -562,7 +562,8 @@ ARMTargetStreamer &ATS = static_cast<ARMTargetStreamer &>(TS); if (OptimizationGoals > 0 && - (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI())) + (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI() || + Subtarget->isTargetMuslAEABI())) ATS.emitAttribute(ARMBuildAttrs::ABI_optimization_goals, OptimizationGoals); OptimizationGoals = -1; Index: lib/Target/ARM/ARMISelLowering.cpp =================================================================== --- lib/Target/ARM/ARMISelLowering.cpp (revision 273258) +++ lib/Target/ARM/ARMISelLowering.cpp (working copy) @@ -255,7 +255,7 @@ // RTLIB if (Subtarget->isAAPCS_ABI() && (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI() || - Subtarget->isTargetAndroid())) { + Subtarget->isTargetMuslAEABI() || Subtarget->isTargetAndroid())) { static const struct { const RTLIB::Libcall Op; const char * const Name; @@ -791,7 +791,7 @@ setOperationAction(ISD::UREM, MVT::i32, Expand); // Register based DivRem for AEABI (RTABI 4.2) if (Subtarget->isTargetAEABI() || Subtarget->isTargetAndroid() || - Subtarget->isTargetGNUAEABI()) { + Subtarget->isTargetGNUAEABI() || Subtarget->isTargetMuslAEABI()) { setOperationAction(ISD::SREM, MVT::i64, Custom); setOperationAction(ISD::UREM, MVT::i64, Custom); @@ -11914,7 +11914,7 @@ SDValue ARMTargetLowering::LowerDivRem(SDValue Op, SelectionDAG &DAG) const { assert((Subtarget->isTargetAEABI() || Subtarget->isTargetAndroid() || - Subtarget->isTargetGNUAEABI()) && + Subtarget->isTargetGNUAEABI() || Subtarget->isTargetMuslAEABI()) && "Register-based DivRem lowering only"); unsigned Opcode = Op->getOpcode(); assert((Opcode == ISD::SDIVREM || Opcode == ISD::UDIVREM) && Index: lib/Target/ARM/ARMSubtarget.h =================================================================== --- lib/Target/ARM/ARMSubtarget.h (revision 273258) +++ lib/Target/ARM/ARMSubtarget.h (working copy) @@ -422,6 +422,11 @@ TargetTriple.getEnvironment() == Triple::GNUEABIHF) && !isTargetDarwin() && !isTargetWindows(); } + bool isTargetMuslAEABI() const { + return (TargetTriple.getEnvironment() == Triple::MuslEABI || + TargetTriple.getEnvironment() == Triple::MuslEABIHF) && + !isTargetDarwin() && !isTargetWindows(); + } // ARM Targets that support EHABI exception handling standard // Darwin uses SjLj. Other targets might need more checks. @@ -428,8 +433,10 @@ bool isTargetEHABICompatible() const { return (TargetTriple.getEnvironment() == Triple::EABI || TargetTriple.getEnvironment() == Triple::GNUEABI || + TargetTriple.getEnvironment() == Triple::MuslEABI || TargetTriple.getEnvironment() == Triple::EABIHF || TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::MuslEABIHF || isTargetAndroid()) && !isTargetDarwin() && !isTargetWindows(); } @@ -437,6 +444,7 @@ bool isTargetHardFloat() const { // FIXME: this is invalid for WindowsCE return TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::MuslEABIHF || TargetTriple.getEnvironment() == Triple::EABIHF || isTargetWindows() || isAAPCS16_ABI(); } Index: lib/Target/ARM/ARMTargetMachine.cpp =================================================================== --- lib/Target/ARM/ARMTargetMachine.cpp (revision 273258) +++ lib/Target/ARM/ARMTargetMachine.cpp (working copy) @@ -100,6 +100,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: case llvm::Triple::EABI: TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS; @@ -208,7 +210,8 @@ // Default to triple-appropriate EABI if (Options.EABIVersion == EABI::Default || Options.EABIVersion == EABI::Unknown) { - if (Subtarget.isTargetGNUAEABI()) + // musl is compatible with glibc with regard to EABI version + if (Subtarget.isTargetGNUAEABI() || Subtarget.isTargetMuslAEABI()) this->Options.EABIVersion = EABI::GNU; else this->Options.EABIVersion = EABI::EABI5; Index: unittests/ADT/TripleTest.cpp =================================================================== --- unittests/ADT/TripleTest.cpp (revision 273258) +++ unittests/ADT/TripleTest.cpp (working copy) @@ -141,6 +141,12 @@ EXPECT_EQ(Triple::UnknownOS, T.getOS()); EXPECT_EQ(Triple::EABI, T.getEnvironment()); + T = Triple("arm-none-linux-musleabi"); + EXPECT_EQ(Triple::arm, T.getArch()); + EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::MuslEABI, T.getEnvironment()); + T = Triple("armv6hl-none-linux-gnueabi"); EXPECT_EQ(Triple::arm, T.getArch()); EXPECT_EQ(Triple::Linux, T.getOS()); [-- Attachment #4: Type: text/plain, Size: 159 bytes --] _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc1_5a15MZ4tEQZAn84rf3Y7dzugzX1TTpSgACQ+d_k3Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc1_5a15MZ4tEQZAn84rf3Y7dzugzX1TTpSgACQ+d_k3Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-21 15:07 ` Peter Smith via cfe-commits [not found] ` <CAEt-8LCXdLMPyo+d9B5SjR5xQKbSNT_sjXvyffjeMH1V_22csw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Peter Smith via cfe-commits @ 2016-06-21 15:07 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits Hello Lei, The changes to llvm and clang look ok to me. I've got some suggestions for testing. For the clang patch, it looks like there isn't a test to check that musleabihf implies hard floating point. It looks like Driver/arm-mfpu.c CHECK-HF might be a good candidate to add a test. For the llvm patch I think you should be able to find a test that checks the behaviour of GNUEABI and GNUEABIHF for each of the properties that you've added Subtarget->isTargetMuslAEABI() to or equivalent. It would be useful to add a test case for MUSLEABI and/or MUSLEABIHF. For example in the RTLIB case there are a large number of tests that check whether the correct __aeabi_ function is called. Some files I came across (there are many more) that might be a good place to check that musleabi and musleabihf behaves like gnueabi and gnueabihf: CodeGen/ARM/memfunc.ll CodeGen/Thumb2/float-ops.ll CodeGen/ARM/divmod-eabi.ll CodeGen/ARM/fp16.ll (hard-float for HF) MC/ARM/eh-directives-personalityindex.s Peter On 21 June 2016 at 14:36, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-20 19:05 GMT+08:00 Lei Zhang <zhanglei.april@gmail.com>: >> 2016-06-18 8:52 GMT+08:00 Rafael Espíndola <rafael.espindola@gmail.com>: >>> There are probably a few more places that need to be patched. >>> >>> In particular, take a look at lib/Target/ARM. There are things like >>> computeTargetABI and isTargetHardFloat that probably need to be >>> updated (and tested). >> >> Any hints how to test the new changes? I guess merely checking clang's >> output like the previous test cases won't suffice this time. > > Here're the refined patches. Please let me know if the test cases > aren't complete. > > Thanks, > Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAEt-8LCXdLMPyo+d9B5SjR5xQKbSNT_sjXvyffjeMH1V_22csw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAEt-8LCXdLMPyo+d9B5SjR5xQKbSNT_sjXvyffjeMH1V_22csw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-22 8:03 ` Lei Zhang via llvm-commits [not found] ` <CAOYuCc3A-tf1LUVHtuUjAfjphRvrJfAbQUaC_bVPEyNTP=LQQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Lei Zhang via llvm-commits @ 2016-06-22 8:03 UTC (permalink / raw) To: Peter Smith Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits [-- Attachment #1: Type: text/plain, Size: 1403 bytes --] 2016-06-21 23:07 GMT+08:00 Peter Smith <peter.smith-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>: > Hello Lei, > > The changes to llvm and clang look ok to me. I've got some suggestions > for testing. > > For the clang patch, it looks like there isn't a test to check that > musleabihf implies hard floating point. It looks like > Driver/arm-mfpu.c CHECK-HF might be a good candidate to add a test. > > For the llvm patch > > I think you should be able to find a test that checks the behaviour of > GNUEABI and GNUEABIHF for each of the properties that you've added > Subtarget->isTargetMuslAEABI() to or equivalent. It would be useful to > add a test case for MUSLEABI and/or MUSLEABIHF. For example in the > RTLIB case there are a large number of tests that check whether the > correct __aeabi_ function is called. > > Some files I came across (there are many more) that might be a good > place to check that musleabi and musleabihf behaves like gnueabi and > gnueabihf: > CodeGen/ARM/memfunc.ll > CodeGen/Thumb2/float-ops.ll > CodeGen/ARM/divmod-eabi.ll > CodeGen/ARM/fp16.ll (hard-float for HF) > MC/ARM/eh-directives-personalityindex.s Thanks for the pointers! Please see the refined (again) patches. As a side note, there's no "gnueabi" in float-ops.ll or eh-directive-personalityindex.s, so I skipped them. In addition, I found a few other relevant test files to patch thanks to your advice. Lei [-- Attachment #2: llvm-musl-arm-v3.patch --] [-- Type: application/octet-stream, Size: 15590 bytes --] Index: include/llvm/ADT/Triple.h =================================================================== --- include/llvm/ADT/Triple.h (revision 273371) +++ include/llvm/ADT/Triple.h (working copy) @@ -180,6 +180,8 @@ EABIHF, Android, Musl, + MuslEABI, + MuslEABIHF, MSVC, Itanium, @@ -571,6 +573,13 @@ /// Tests whether the target is Android bool isAndroid() const { return getEnvironment() == Triple::Android; } + /// Tests whether the environment is musl-libc + bool isMusl() const { + return getEnvironment() == Triple::Musl || + getEnvironment() == Triple::MuslEABI || + getEnvironment() == Triple::MuslEABIHF; + } + /// Tests whether the target is NVPTX (32- or 64-bit). bool isNVPTX() const { return getArch() == Triple::nvptx || getArch() == Triple::nvptx64; Index: lib/Support/Triple.cpp =================================================================== --- lib/Support/Triple.cpp (revision 273371) +++ lib/Support/Triple.cpp (working copy) @@ -206,6 +206,8 @@ case EABIHF: return "eabihf"; case Android: return "android"; case Musl: return "musl"; + case MuslEABI: return "musleabi"; + case MuslEABIHF: return "musleabihf"; case MSVC: return "msvc"; case Itanium: return "itanium"; case Cygnus: return "cygnus"; @@ -465,6 +467,8 @@ .StartsWith("code16", Triple::CODE16) .StartsWith("gnu", Triple::GNU) .StartsWith("android", Triple::Android) + .StartsWith("musleabihf", Triple::MuslEABIHF) + .StartsWith("musleabi", Triple::MuslEABI) .StartsWith("musl", Triple::Musl) .StartsWith("msvc", Triple::MSVC) .StartsWith("itanium", Triple::Itanium) @@ -1454,6 +1458,7 @@ switch (getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: return "arm1176jzf-s"; default: return "arm7tdmi"; Index: lib/Target/ARM/ARMAsmPrinter.cpp =================================================================== --- lib/Target/ARM/ARMAsmPrinter.cpp (revision 273371) +++ lib/Target/ARM/ARMAsmPrinter.cpp (working copy) @@ -562,7 +562,8 @@ ARMTargetStreamer &ATS = static_cast<ARMTargetStreamer &>(TS); if (OptimizationGoals > 0 && - (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI())) + (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI() || + Subtarget->isTargetMuslAEABI())) ATS.emitAttribute(ARMBuildAttrs::ABI_optimization_goals, OptimizationGoals); OptimizationGoals = -1; Index: lib/Target/ARM/ARMISelLowering.cpp =================================================================== --- lib/Target/ARM/ARMISelLowering.cpp (revision 273371) +++ lib/Target/ARM/ARMISelLowering.cpp (working copy) @@ -255,7 +255,7 @@ // RTLIB if (Subtarget->isAAPCS_ABI() && (Subtarget->isTargetAEABI() || Subtarget->isTargetGNUAEABI() || - Subtarget->isTargetAndroid())) { + Subtarget->isTargetMuslAEABI() || Subtarget->isTargetAndroid())) { static const struct { const RTLIB::Libcall Op; const char * const Name; @@ -791,7 +791,7 @@ setOperationAction(ISD::UREM, MVT::i32, Expand); // Register based DivRem for AEABI (RTABI 4.2) if (Subtarget->isTargetAEABI() || Subtarget->isTargetAndroid() || - Subtarget->isTargetGNUAEABI()) { + Subtarget->isTargetGNUAEABI() || Subtarget->isTargetMuslAEABI()) { setOperationAction(ISD::SREM, MVT::i64, Custom); setOperationAction(ISD::UREM, MVT::i64, Custom); @@ -11914,7 +11914,7 @@ SDValue ARMTargetLowering::LowerDivRem(SDValue Op, SelectionDAG &DAG) const { assert((Subtarget->isTargetAEABI() || Subtarget->isTargetAndroid() || - Subtarget->isTargetGNUAEABI()) && + Subtarget->isTargetGNUAEABI() || Subtarget->isTargetMuslAEABI()) && "Register-based DivRem lowering only"); unsigned Opcode = Op->getOpcode(); assert((Opcode == ISD::SDIVREM || Opcode == ISD::UDIVREM) && Index: lib/Target/ARM/ARMSubtarget.h =================================================================== --- lib/Target/ARM/ARMSubtarget.h (revision 273371) +++ lib/Target/ARM/ARMSubtarget.h (working copy) @@ -422,6 +422,11 @@ TargetTriple.getEnvironment() == Triple::GNUEABIHF) && !isTargetDarwin() && !isTargetWindows(); } + bool isTargetMuslAEABI() const { + return (TargetTriple.getEnvironment() == Triple::MuslEABI || + TargetTriple.getEnvironment() == Triple::MuslEABIHF) && + !isTargetDarwin() && !isTargetWindows(); + } // ARM Targets that support EHABI exception handling standard // Darwin uses SjLj. Other targets might need more checks. @@ -428,8 +433,10 @@ bool isTargetEHABICompatible() const { return (TargetTriple.getEnvironment() == Triple::EABI || TargetTriple.getEnvironment() == Triple::GNUEABI || + TargetTriple.getEnvironment() == Triple::MuslEABI || TargetTriple.getEnvironment() == Triple::EABIHF || TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::MuslEABIHF || isTargetAndroid()) && !isTargetDarwin() && !isTargetWindows(); } @@ -437,6 +444,7 @@ bool isTargetHardFloat() const { // FIXME: this is invalid for WindowsCE return TargetTriple.getEnvironment() == Triple::GNUEABIHF || + TargetTriple.getEnvironment() == Triple::MuslEABIHF || TargetTriple.getEnvironment() == Triple::EABIHF || isTargetWindows() || isAAPCS16_ABI(); } Index: lib/Target/ARM/ARMTargetMachine.cpp =================================================================== --- lib/Target/ARM/ARMTargetMachine.cpp (revision 273371) +++ lib/Target/ARM/ARMTargetMachine.cpp (working copy) @@ -100,6 +100,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: case llvm::Triple::EABI: TargetABI = ARMBaseTargetMachine::ARM_ABI_AAPCS; @@ -208,7 +210,8 @@ // Default to triple-appropriate EABI if (Options.EABIVersion == EABI::Default || Options.EABIVersion == EABI::Unknown) { - if (Subtarget.isTargetGNUAEABI()) + // musl is compatible with glibc with regard to EABI version + if (Subtarget.isTargetGNUAEABI() || Subtarget.isTargetMuslAEABI()) this->Options.EABIVersion = EABI::GNU; else this->Options.EABIVersion = EABI::EABI5; Index: test/CodeGen/ARM/arm-eabi.ll =================================================================== --- test/CodeGen/ARM/arm-eabi.ll (revision 273371) +++ test/CodeGen/ARM/arm-eabi.ll (working copy) @@ -3,21 +3,29 @@ ; RUN: llc < %s -mtriple=arm-none-androideabi -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-gnueabi -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-gnueabihf -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI +; RUN: llc < %s -mtriple=arm-none-musleabi -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI +; RUN: llc < %s -mtriple=arm-none-musleabihf -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-eabi -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-eabihf -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-androideabi -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-gnueabi -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-gnueabihf -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI +; RUN: llc < %s -mtriple=arm-none-musleabi -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI +; RUN: llc < %s -mtriple=arm-none-musleabihf -meabi=gnu -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI ; RUN: llc < %s -mtriple=arm-none-eabi -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-eabihf -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-androideabi -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-gnueabi -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-gnueabihf -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI +; RUN: llc < %s -mtriple=arm-none-musleabi -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI +; RUN: llc < %s -mtriple=arm-none-musleabihf -meabi=4 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-eabi -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-eabihf -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-androideabi -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-gnueabi -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI ; RUN: llc < %s -mtriple=arm-none-gnueabihf -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI +; RUN: llc < %s -mtriple=arm-none-musleabi -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI +; RUN: llc < %s -mtriple=arm-none-musleabihf -meabi=5 -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI %struct.my_s = type { [18 x i32] } Index: test/CodeGen/ARM/default-float-abi.ll =================================================================== --- test/CodeGen/ARM/default-float-abi.ll (revision 273371) +++ test/CodeGen/ARM/default-float-abi.ll (working copy) @@ -1,7 +1,10 @@ ; RUN: llc -mtriple=armv7-linux-gnueabihf %s -o - | FileCheck %s --check-prefix=CHECK-HARD +; RUN: llc -mtriple=armv7-linux-musleabihf %s -o - | FileCheck %s --check-prefix=CHECK-HARD ; RUN: llc -mtriple=armv7-linux-eabihf %s -o - | FileCheck %s --check-prefix=CHECK-HARD ; RUN: llc -mtriple=armv7-linux-gnueabihf -float-abi=soft %s -o - | FileCheck %s --check-prefix=CHECK-SOFT +; RUN: llc -mtriple=armv7-linux-musleabihf -float-abi=soft %s -o - | FileCheck %s --check-prefix=CHECK-SOFT ; RUN: llc -mtriple=armv7-linux-gnueabi %s -o - | FileCheck %s --check-prefix=CHECK-SOFT +; RUN: llc -mtriple=armv7-linux-musleabi %s -o - | FileCheck %s --check-prefix=CHECK-SOFT ; RUN: llc -mtriple=armv7-linux-eabi -float-abi=hard %s -o - | FileCheck %s --check-prefix=CHECK-HARD ; RUN: llc -mtriple=thumbv7-apple-ios6.0 %s -o - | FileCheck %s --check-prefix=CHECK-SOFT Index: test/CodeGen/ARM/divmod-eabi.ll =================================================================== --- test/CodeGen/ARM/divmod-eabi.ll (revision 273371) +++ test/CodeGen/ARM/divmod-eabi.ll (working copy) @@ -3,6 +3,7 @@ ; All "eabi" (Bare, GNU and Android) must lower SREM/UREM to __aeabi_{u,i}divmod ; RUN: llc -mtriple armv7-linux-androideabi %s -o - | FileCheck %s --check-prefix=EABI ; RUN: llc -mtriple armv7-linux-gnueabi %s -o - | FileCheck %s --check-prefix=EABI +; RUN: llc -mtriple armv7-linux-musleabi %s -o - | FileCheck %s --check-prefix=EABI ; RUN: llc -mtriple armv7-apple-darwin %s -o - | FileCheck %s --check-prefix=DARWIN ; FIXME: long-term, we will use "-apple-macho" and won't need this exception: ; RUN: llc -mtriple armv7-apple-darwin-eabi %s -o - | FileCheck %s --check-prefix=DARWIN Index: test/CodeGen/ARM/ehabi.ll =================================================================== --- test/CodeGen/ARM/ehabi.ll (revision 273371) +++ test/CodeGen/ARM/ehabi.ll (working copy) @@ -34,6 +34,22 @@ ; RUN: -filetype=asm -o - %s \ ; RUN: | FileCheck %s --check-prefix=CHECK-V7-FP-ELIM +; RUN: llc -mtriple arm-unknown-linux-musleabi \ +; RUN: -disable-fp-elim -filetype=asm -o - %s \ +; RUN: | FileCheck %s --check-prefix=CHECK-FP + +; RUN: llc -mtriple arm-unknown-linux-musleabi \ +; RUN: -filetype=asm -o - %s \ +; RUN: | FileCheck %s --check-prefix=CHECK-FP-ELIM + +; RUN: llc -mtriple armv7-unknown-linux-musleabi \ +; RUN: -disable-fp-elim -filetype=asm -o - %s \ +; RUN: | FileCheck %s --check-prefix=CHECK-V7-FP + +; RUN: llc -mtriple armv7-unknown-linux-musleabi \ +; RUN: -filetype=asm -o - %s \ +; RUN: | FileCheck %s --check-prefix=CHECK-V7-FP-ELIM + ; RUN: llc -mtriple arm-unknown-linux-androideabi \ ; RUN: -disable-fp-elim -filetype=asm -o - %s \ ; RUN: | FileCheck %s --check-prefix=CHECK-FP Index: test/CodeGen/ARM/fp16.ll =================================================================== --- test/CodeGen/ARM/fp16.ll (revision 273371) +++ test/CodeGen/ARM/fp16.ll (working copy) @@ -1,8 +1,10 @@ ; RUN: llc -mtriple=armv7a--none-eabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HARDFLOAT-EABI %s ; RUN: llc -mtriple=armv7a--none-gnueabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HARDFLOAT-GNU %s +; RUN: llc -mtriple=armv7a--none-musleabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-HARDFLOAT-GNU %s ; RUN: llc -mtriple=armv8-eabihf < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-ARMV8 %s ; RUN: llc -mtriple=thumbv7m-eabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-EABI %s ; RUN: llc -mtriple=thumbv7m-gnueabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-GNU %s +; RUN: llc -mtriple=thumbv7m-musleabi < %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-SOFTFLOAT-GNU %s ;; +fp16 is special: it has f32->f16 (unlike v7), but not f64->f16 (unlike v8). ;; This exposes unsafe-fp-math optimization opportunities; test that. Index: test/CodeGen/ARM/memfunc.ll =================================================================== --- test/CodeGen/ARM/memfunc.ll (revision 273371) +++ test/CodeGen/ARM/memfunc.ll (working copy) @@ -5,6 +5,8 @@ ; RUN: llc < %s -mtriple=arm-none-androideabi -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-EABI --check-prefix=CHECK ; RUN: llc < %s -mtriple=arm-none-gnueabi -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI --check-prefix=CHECK ; RUN: llc < %s -mtriple=arm-none-gnueabihf -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI --check-prefix=CHECK +; RUN: llc < %s -mtriple=arm-none-musleabi -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI --check-prefix=CHECK +; RUN: llc < %s -mtriple=arm-none-musleabihf -disable-post-ra -o - | FileCheck %s --check-prefix=CHECK-GNUEABI --check-prefix=CHECK define void @f1(i8* %dest, i8* %src) { entry: Index: unittests/ADT/TripleTest.cpp =================================================================== --- unittests/ADT/TripleTest.cpp (revision 273371) +++ unittests/ADT/TripleTest.cpp (working copy) @@ -141,6 +141,12 @@ EXPECT_EQ(Triple::UnknownOS, T.getOS()); EXPECT_EQ(Triple::EABI, T.getEnvironment()); + T = Triple("arm-none-linux-musleabi"); + EXPECT_EQ(Triple::arm, T.getArch()); + EXPECT_EQ(Triple::UnknownVendor, T.getVendor()); + EXPECT_EQ(Triple::Linux, T.getOS()); + EXPECT_EQ(Triple::MuslEABI, T.getEnvironment()); + T = Triple("armv6hl-none-linux-gnueabi"); EXPECT_EQ(Triple::arm, T.getArch()); EXPECT_EQ(Triple::Linux, T.getOS()); [-- Attachment #3: clang-musl-arm-v3.patch --] [-- Type: application/octet-stream, Size: 10517 bytes --] Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp (revision 273371) +++ lib/Basic/Targets.cpp (working copy) @@ -4876,6 +4876,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: setABI("aapcs-linux"); break; case llvm::Triple::EABIHF: Index: lib/CodeGen/TargetInfo.cpp =================================================================== --- lib/CodeGen/TargetInfo.cpp (revision 273371) +++ lib/CodeGen/TargetInfo.cpp (working copy) @@ -4962,6 +4962,8 @@ case llvm::Triple::EABIHF: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: return true; default: return false; @@ -4972,6 +4974,7 @@ switch (getTarget().getTriple().getEnvironment()) { case llvm::Triple::EABIHF: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: return true; default: return false; @@ -7922,6 +7925,7 @@ else if (CodeGenOpts.FloatABI == "hard" || (CodeGenOpts.FloatABI != "soft" && (Triple.getEnvironment() == llvm::Triple::GNUEABIHF || + Triple.getEnvironment() == llvm::Triple::MuslEABIHF || Triple.getEnvironment() == llvm::Triple::EABIHF))) Kind = ARMABIInfo::AAPCS_VFP; Index: lib/Driver/ToolChains.cpp =================================================================== --- lib/Driver/ToolChains.cpp (revision 273371) +++ lib/Driver/ToolChains.cpp (working copy) @@ -4161,9 +4161,24 @@ if (Triple.isAndroid()) return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; - else if (Triple.getEnvironment() == llvm::Triple::Musl) - return "/lib/ld-musl-" + Triple.getArchName().str() + ".so.1"; + else if (Triple.isMusl()) { + std::string ArchName; + switch (Arch) { + case llvm::Triple::thumb: + ArchName = "arm"; + break; + case llvm::Triple::thumbeb: + ArchName = "armeb"; + break; + default: + ArchName = Triple.getArchName().str(); + } + if (Triple.getEnvironment() == llvm::Triple::MuslEABIHF) + ArchName += "hf"; + return "/lib/ld-musl-" + ArchName + ".so.1"; + } + std::string LibDir; std::string Loader; Index: lib/Driver/Tools.cpp =================================================================== --- lib/Driver/Tools.cpp (revision 273371) +++ lib/Driver/Tools.cpp (working copy) @@ -803,10 +803,12 @@ default: switch (Triple.getEnvironment()) { case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABIHF: case llvm::Triple::EABIHF: ABI = FloatABI::Hard; break; case llvm::Triple::GNUEABI: + case llvm::Triple::MuslEABI: case llvm::Triple::EABI: // EABI is always AAPCS, and if it was not marked 'hard', it's softfp ABI = FloatABI::SoftFP; @@ -1052,6 +1054,8 @@ case llvm::Triple::Android: case llvm::Triple::GNUEABI: case llvm::Triple::GNUEABIHF: + case llvm::Triple::MuslEABI: + case llvm::Triple::MuslEABIHF: ABIName = "aapcs-linux"; break; case llvm::Triple::EABIHF: Index: test/CodeGen/arm-cc.c =================================================================== --- test/CodeGen/arm-cc.c (revision 273371) +++ test/CodeGen/arm-cc.c (working copy) @@ -3,6 +3,8 @@ // RUN: %clang_cc1 -triple armv7-apple-darwin9 -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=DARWIN-AAPCS %s // RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-APCS %s // RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-AAPCS %s +// RUN: %clang_cc1 -triple arm-none-linux-musleabi -target-abi apcs-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-APCS %s +// RUN: %clang_cc1 -triple arm-none-linux-musleabi -target-abi aapcs -emit-llvm -w -o - %s | FileCheck -check-prefix=LINUX-AAPCS %s // RUN: %clang_cc1 -triple armv7-none-eabihf -target-abi aapcs-vfp -emit-llvm -w -o - %s | FileCheck -check-prefix=BAREMETAL-AAPCS_VFP %s Index: test/CodeGen/arm-eabi.c =================================================================== --- test/CodeGen/arm-eabi.c (revision 273371) +++ test/CodeGen/arm-eabi.c (working copy) @@ -7,6 +7,14 @@ // RUN: %clang -target arm-none-gnueabi -S -meabi 5 -o - %s | FileCheck -check-prefix=CHECK-EABI %s // RUN: %clang -target arm-none-gnueabihf -S -o - %s | FileCheck -check-prefix=CHECK-GNUEABI %s // RUN: %clang -target arm-none-gnueabihf -S -meabi 5 -o - %s | FileCheck -check-prefix=CHECK-EABI %s +// RUN: %clang -target arm-none-musleabi -S -o - %s \ +// RUN: | FileCheck -check-prefix=CHECK-GNUEABI %s +// RUN: %clang -target arm-none-musleabi -S -o - %s -meabi 5 \ +// RUN: | FileCheck -check-prefix=CHECK-EABI %s +// RUN: %clang -target arm-none-musleabihf -S -o - %s \ +// RUN: | FileCheck -check-prefix=CHECK-GNUEABI %s +// RUN: %clang -target arm-none-musleabihf -S -o - %s -meabi 5 \ +// RUN: | FileCheck -check-prefix=CHECK-EABI %s struct my_s { unsigned long a[18]; Index: test/Driver/arm-abi.c =================================================================== --- test/Driver/arm-abi.c (revision 273371) +++ test/Driver/arm-abi.c (working copy) @@ -28,7 +28,7 @@ // RUN: %clang -target arm--netbsd-eabihf %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s -// Otherwise, ABI is celected based on environment +// Otherwise, ABI is selected based on environment // RUN: %clang -target arm---android %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---gnueabi %s -### -o %t.o 2>&1 \ @@ -35,6 +35,10 @@ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---gnueabihf %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s +// RUN: %clang -target arm---musleabi %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s +// RUN: %clang -target arm---musleabihf %s -### -o %t.o 2>&1 \ +// RUN: | FileCheck -check-prefix=CHECK-AAPCS-LINUX %s // RUN: %clang -target arm---eabi %s -### -o %t.o 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-AAPCS %s // RUN: %clang -target arm---eabihf %s -### -o %t.o 2>&1 \ Index: test/Driver/arm-mfpu.c =================================================================== --- test/Driver/arm-mfpu.c (revision 273371) +++ test/Driver/arm-mfpu.c (working copy) @@ -207,6 +207,8 @@ // RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-HF %s +// RUN: %clang -target arm-linux-musleabihf %s -### 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-HF %s // CHECK-HF: "-target-cpu" "arm1176jzf-s" // RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \ Index: test/Driver/linux-ld.c =================================================================== --- test/Driver/linux-ld.c (revision 273371) +++ test/Driver/linux-ld.c (working copy) @@ -1606,11 +1606,47 @@ // RUN: %clang %s -### -o %t.o 2>&1 \ // RUN: --target=powerpc64-pc-linux-musl \ // RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC64 %s -// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" -// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" -// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" -// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" -// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" -// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" -// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" -// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumbeb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=thumbeb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=arm-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=arm-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armeb-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEB %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=armeb-pc-linux-musleabihf \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARMEBHF %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64 %s +// RUN: %clang %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64_be-pc-linux-musleabi \ +// RUN: | FileCheck --check-prefix=CHECK-MUSL-AARCH64_BE %s +// CHECK-MUSL-X86: "-dynamic-linker" "/lib/ld-musl-i386.so.1" +// CHECK-MUSL-X86_64: "-dynamic-linker" "/lib/ld-musl-x86_64.so.1" +// CHECK-MUSL-MIPS: "-dynamic-linker" "/lib/ld-musl-mips.so.1" +// CHECK-MUSL-MIPSEL: "-dynamic-linker" "/lib/ld-musl-mipsel.so.1" +// CHECK-MUSL-MIPS64: "-dynamic-linker" "/lib/ld-musl-mips64.so.1" +// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1" +// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1" +// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1" +// CHECK-MUSL-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1" +// CHECK-MUSL-ARMHF: "-dynamic-linker" "/lib/ld-musl-armhf.so.1" +// CHECK-MUSL-ARMEB: "-dynamic-linker" "/lib/ld-musl-armeb.so.1" +// CHECK-MUSL-ARMEBHF: "-dynamic-linker" "/lib/ld-musl-armebhf.so.1" +// CHECK-MUSL-AARCH64: "-dynamic-linker" "/lib/ld-musl-aarch64.so.1" +// CHECK-MUSL-AARCH64_BE: "-dynamic-linker" "/lib/ld-musl-aarch64_be.so.1" [-- Attachment #4: Type: text/plain, Size: 162 bytes --] _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc3A-tf1LUVHtuUjAfjphRvrJfAbQUaC_bVPEyNTP=LQQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc3A-tf1LUVHtuUjAfjphRvrJfAbQUaC_bVPEyNTP=LQQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-22 8:55 ` Peter Smith via llvm-commits [not found] ` <CAEt-8LA2nA1XXgwiH1Z72vm903V8PH-fsitS_QVAgXkjkzThvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Peter Smith via llvm-commits @ 2016-06-22 8:55 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits Hello Lei, Thanks for all the updates. That looks good to me from an ARM perspective. Peter On 22 June 2016 at 09:03, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-21 23:07 GMT+08:00 Peter Smith <peter.smith@linaro.org>: >> Hello Lei, >> >> The changes to llvm and clang look ok to me. I've got some suggestions >> for testing. >> >> For the clang patch, it looks like there isn't a test to check that >> musleabihf implies hard floating point. It looks like >> Driver/arm-mfpu.c CHECK-HF might be a good candidate to add a test. >> >> For the llvm patch >> >> I think you should be able to find a test that checks the behaviour of >> GNUEABI and GNUEABIHF for each of the properties that you've added >> Subtarget->isTargetMuslAEABI() to or equivalent. It would be useful to >> add a test case for MUSLEABI and/or MUSLEABIHF. For example in the >> RTLIB case there are a large number of tests that check whether the >> correct __aeabi_ function is called. >> >> Some files I came across (there are many more) that might be a good >> place to check that musleabi and musleabihf behaves like gnueabi and >> gnueabihf: >> CodeGen/ARM/memfunc.ll >> CodeGen/Thumb2/float-ops.ll >> CodeGen/ARM/divmod-eabi.ll >> CodeGen/ARM/fp16.ll (hard-float for HF) >> MC/ARM/eh-directives-personalityindex.s > > Thanks for the pointers! Please see the refined (again) patches. > > As a side note, there's no "gnueabi" in float-ops.ll or > eh-directive-personalityindex.s, so I skipped them. In addition, I > found a few other relevant test files to patch thanks to your advice. > > > Lei _______________________________________________ llvm-commits mailing list llvm-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAEt-8LA2nA1XXgwiH1Z72vm903V8PH-fsitS_QVAgXkjkzThvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAEt-8LA2nA1XXgwiH1Z72vm903V8PH-fsitS_QVAgXkjkzThvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-24 3:25 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc3h1LvG4Ky8u8EqC6x12jg_c3XLUjo3BLuOQkQphVJUSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Lei Zhang via cfe-commits @ 2016-06-24 3:25 UTC (permalink / raw) To: Peter Smith Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits 2016-06-22 16:55 GMT+08:00 Peter Smith <peter.smith@linaro.org>: > Hello Lei, > > Thanks for all the updates. That looks good to me from an ARM perspective. Ping. Are the patches good enough to be committed? Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAOYuCc3h1LvG4Ky8u8EqC6x12jg_c3XLUjo3BLuOQkQphVJUSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAOYuCc3h1LvG4Ky8u8EqC6x12jg_c3XLUjo3BLuOQkQphVJUSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-24 8:02 ` Peter Smith via cfe-commits [not found] ` <CAEt-8LBNJ+hn_Ws086H_xZxSK+btFou_e02OCaJ-MxVsXV__wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 23+ messages in thread From: Peter Smith via cfe-commits @ 2016-06-24 8:02 UTC (permalink / raw) To: Lei Zhang Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits Hello Lei, They look good enough for me. Unless anyone else has any objections I think you are good to go. Peter On 24 June 2016 at 04:25, Lei Zhang <zhanglei.april@gmail.com> wrote: > 2016-06-22 16:55 GMT+08:00 Peter Smith <peter.smith@linaro.org>: >> Hello Lei, >> >> Thanks for all the updates. That looks good to me from an ARM perspective. > > Ping. > > Are the patches good enough to be committed? > > > Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
[parent not found: <CAEt-8LBNJ+hn_Ws086H_xZxSK+btFou_e02OCaJ-MxVsXV__wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [gentoo-musl] Re: Add support for musl-libc on Linux [not found] ` <CAEt-8LBNJ+hn_Ws086H_xZxSK+btFou_e02OCaJ-MxVsXV__wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-25 2:18 ` Lei Zhang via cfe-commits 0 siblings, 0 replies; 23+ messages in thread From: Lei Zhang via cfe-commits @ 2016-06-25 2:18 UTC (permalink / raw) To: Peter Smith Cc: gentoo-musl-cnFmAm88PdgLnqt3yJz4RQ, cfe-commits cfe, musl-ZwoEplunGu1jrUoiu81ncdBPR1lH4CV8, llvm-commits 2016-06-24 16:02 GMT+08:00 Peter Smith <peter.smith@linaro.org>: > Hello Lei, > > They look good enough for me. Unless anyone else has any objections I > think you are good to go. I just see them committed by r273735 in clang and r273726 in LLVM. Peter, thank you for the comments; and Rafael, thank you for committing the patches :) Lei _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: Re: [gentoo-musl] Re: Add support for musl-libc on Linux 2016-06-13 21:00 ` Rafael Espíndola via llvm-commits [not found] ` <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-06-14 8:47 ` Szabolcs Nagy 1 sibling, 0 replies; 23+ messages in thread From: Szabolcs Nagy @ 2016-06-14 8:47 UTC (permalink / raw) To: musl; +Cc: Lei Zhang, llvm-commits, gentoo-musl, cfe-commits cfe * Rafael Esp?ndola <rafael.espindola@gmail.com> [2016-06-13 17:00:17 -0400]: > Do you need someone to commit it for you? > On Jun 13, 2016 9:50 AM, "Lei Zhang via cfe-commits" < > > http://git.alpinelinux.org/cgit/aports/plain/main/clang/clang-0004-Add-musl-targets-and-dynamic-linker.patch > > > > This looks neat :) the dynamic linker names need to be updated (ppc64*, mips64* mips*-sf are missing) and it defaults to x86_64 which can be bad. there is some musl setting already for mips in the driver which should probably be fixed. ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2016-06-25 2:18 UTC | newest] Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CAOYuCc1atr0QjQud-nxdj3rPN0Hj16u__kAs5LRmU+Ff6shtBA@mail.gmail.com> [not found] ` <20160612190745.GA21691@britannica.bec.de> [not found] ` <CAOYuCc1NZNxEPLonrHD++QPTYgq90Bwz0B16CLXiJrEAf-zNJQ@mail.gmail.com> [not found] ` <CAOYuCc1NZNxEPLonrHD++QPTYgq90Bwz0B16CLXiJrEAf-zNJQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-13 13:21 ` [gentoo-musl] Re: Add support for musl-libc on Linux Felix Janda via cfe-commits 2016-06-13 13:50 ` Lei Zhang [not found] ` <CAOYuCc0t_eyGoOm0oozYmj55eA3Jvb48h7tGOtiMBjGWtDT1RQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-13 21:00 ` Rafael Espíndola via llvm-commits [not found] ` <CAG3jReK_cUOGaOHwQT1gzTBWRVsFuArywZuoXD==m5n-_ZEXKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-14 1:07 ` Lei Zhang via llvm-commits [not found] ` <CAOYuCc3gtPz8XhGyAsDcsCjvZPLDwSAGOXwXeu=urXmwck61mQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-14 12:55 ` Rafael Espíndola via cfe-commits 2016-06-15 8:28 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc125C-5QjqWhK-QuU4zZvTqb+OsZhxQjowJidZaYBYY4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-15 20:09 ` Rafael Espíndola via cfe-commits 2016-06-17 9:50 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc3C27jqG8uyCOkDgcOAcgaFXEz7k9O8+Tqyjv9WYH2M1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-18 0:52 ` Rafael Espíndola via cfe-commits [not found] ` <CAG3jReKcdL3Hn5L0sOAAM34CKoUn=J-pusOV+CRyfYRLnvnp4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-20 9:37 ` Peter Smith via llvm-commits [not found] ` <CAEt-8LBteTKKdYDa2GUveGNbQu12c3gBgTEeiU5p1ONsTu_VaQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-20 10:59 ` Lei Zhang via cfe-commits 2016-06-20 11:28 ` Szabolcs Nagy [not found] ` <CAOYuCc2yxgYFSzDjJP0SJho5Hs=zb635ysinwbg=SZ=CZJt9_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-20 11:44 ` Peter Smith via cfe-commits [not found] ` <CAEt-8LCQ5H2vE_PXPxs+Gr2=roBT9BuT487w2at3UAKhFqqYxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-20 13:09 ` Lei Zhang via llvm-commits 2016-06-20 11:05 ` Lei Zhang via llvm-commits [not found] ` <CAOYuCc1+_xKLK2FOvCKNpKO4BZO07hd2Cbft8p_YO3chSR41UA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-21 13:36 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc1_5a15MZ4tEQZAn84rf3Y7dzugzX1TTpSgACQ+d_k3Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-21 15:07 ` Peter Smith via cfe-commits [not found] ` <CAEt-8LCXdLMPyo+d9B5SjR5xQKbSNT_sjXvyffjeMH1V_22csw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-22 8:03 ` Lei Zhang via llvm-commits [not found] ` <CAOYuCc3A-tf1LUVHtuUjAfjphRvrJfAbQUaC_bVPEyNTP=LQQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-22 8:55 ` Peter Smith via llvm-commits [not found] ` <CAEt-8LA2nA1XXgwiH1Z72vm903V8PH-fsitS_QVAgXkjkzThvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-24 3:25 ` Lei Zhang via cfe-commits [not found] ` <CAOYuCc3h1LvG4Ky8u8EqC6x12jg_c3XLUjo3BLuOQkQphVJUSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-24 8:02 ` Peter Smith via cfe-commits [not found] ` <CAEt-8LBNJ+hn_Ws086H_xZxSK+btFou_e02OCaJ-MxVsXV__wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-06-25 2:18 ` Lei Zhang via cfe-commits 2016-06-14 8:47 ` Szabolcs Nagy
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/musl/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).