From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4DD7213829C for ; Mon, 13 Jun 2016 13:50:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7034AE0986; Mon, 13 Jun 2016 13:50:18 +0000 (UTC) Received: from mail-oi0-f66.google.com (mail-oi0-f66.google.com [209.85.218.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 03AD3E0986 for ; Mon, 13 Jun 2016 13:50:17 +0000 (UTC) Received: by mail-oi0-f66.google.com with SMTP id e205so19514033oig.0 for ; Mon, 13 Jun 2016 06:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Qk03nwOmtAOIRAjTK2YKKNcLc3FlBk19k84wk7Wjl5w=; b=KQNwLMsCG9ChBcvr3nBCNFC9Z86gSMZWr72PRUg+gXMP9KunQ+v4BwnIifa4Y2fVqq a4Nrc3JbFwCMknKao9sAXhfDL9koAnczDu8Er/DyDCDBpseCkhc+13dX66LLW0KX06NU RRL3ufvNZC0hG/ULBLfJ2MS+K+LAr7XcUCzOYPqZO8DsQ/6XBN6J/Eibzn5OaYPQCWrE n0wn/Qnk7Kchhp7AK4s/Cb5p5xgwMaQypML+TXCiOkuyvLqqaDZJp782D6QaM1Sw2RIq 21TIcgHkz4sTmA4IDzJdvTeZC1ZdF0lGvAvMYKM/xBA7v2Tpr2LdPcE6XJZdpap6GidE I2qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Qk03nwOmtAOIRAjTK2YKKNcLc3FlBk19k84wk7Wjl5w=; b=IoqObl7HhKnGNA2x8zwXR450JPYGr42ZX1tX2nJWnkp/GL4kcOT8RFmAuKbxb7CKdk it6TlBLDh9CTDHLVIf/PwOtNXSL1Kn8NYFmAknzhhRoAl/B8Vj2g5qAP2zwOayW25POp qS4AY+/LhUhVZRqwIW3KXcIjQTdzwWyArMHCsjDs1hrmMLpwZsqE75Voq/eDNPwaJZyg gyn2Z56E9eqmZcV5pynWYfvnAqv5r5+wGrQtbabFl2O79WfVhnPDw1X4DlAkq7O1NAwC qcKQe29jr9wAVSNk2FAlTM2d2hzxYQbOorLgaJOnRt7DTiTM63ePApcION3twdBSArVE B+vw== X-Gm-Message-State: ALyK8tLKx9muW1l8+4lI1m6LKJGYJA1JBN+TNlSf9qEFgTmjmcE49EDDIojy62Etu4kE2Ipnpet5Kt1t/x0xNg== X-Received: by 10.157.12.72 with SMTP id 66mr7811865otr.192.1465825817125; Mon, 13 Jun 2016 06:50:17 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo musl list X-BeenThere: gentoo-musl@gentoo.org X-BeenThere: gentoo-musl@lists.gentoo.org MIME-Version: 1.0 Received: by 10.202.63.212 with HTTP; Mon, 13 Jun 2016 06:50:16 -0700 (PDT) In-Reply-To: <20160613132155.GA31934@nyan> References: <20160612190745.GA21691@britannica.bec.de> <20160613132155.GA31934@nyan> From: Lei Zhang Date: Mon, 13 Jun 2016 21:50:16 +0800 Message-ID: Subject: Re: [gentoo-musl] Re: Add support for musl-libc on Linux To: Lei Zhang , llvm-commits , cfe-commits cfe , gentoo-musl@lists.gentoo.org, musl@lists.openwall.com Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: e3bc791a-d011-4a8f-b09e-6d961feda6e4 X-Archives-Hash: 1fe04b13b3fed75b77def269e2ac8d54 2016-06-13 21:21 GMT+08:00 Felix Janda : > [Added CC to the musl list] > > Lei Zhang wrote: >> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger : >> > 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