From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13138 Path: news.gmane.org!.POSTED!not-for-mail From: Andre McCurdy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] fix build failure on arm because of missing clz instruction Date: Fri, 24 Aug 2018 15:50:10 -0700 Message-ID: References: <20180824193052.GD4418@port70.net> <20180824220523.GF4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1535152498 25795 195.159.176.226 (24 Aug 2018 23:14:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2018 23:14:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13156-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 25 01:14:54 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1ftLI5-0006aI-P2 for gllmg-musl@m.gmane.org; Sat, 25 Aug 2018 01:14:53 +0200 Original-Received: (qmail 5534 invoked by uid 550); 24 Aug 2018 22:50:23 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 5515 invoked from network); 24 Aug 2018 22:50:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=mZqD5XzU+n9S/+NHa+td7AwnDCBFRSTiuMQfa+s3GNY=; b=jdFOPLRkN/7mJEEBw0sMaWiJOmgW+FgJx58RtYN3KUxCmy2aKOZfFPiEn80ioBFHT3 OGB4yM0w2oB7maVMUc891z+ChNhdqL6Mi19mD8zvZczANuxJjT2ToEdrMF0Ux1EKCv6q DGuK/1hIaN+C+Hjun/xDdVCHVKwTUkbNVaZpOKJDYGiWgYD2KJu2m7/Di5djLQSp1tnO GWjW9o8/5xP8VL7dBgUSU+IWPHoInibMcC4AZGZwxtOCTIKiefxwVvARsU/d6nYs03TW K4LC8BpbQAmOugoGbxBYT/tLZd22Tfk5P8/RjDA0NwgeFilzozdMAm9rwJAh8lA/4pdM CQXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=mZqD5XzU+n9S/+NHa+td7AwnDCBFRSTiuMQfa+s3GNY=; b=g7HDa4BlI8A7UfO2XlF5vcIurfUuysvlWGgQ7evhHOKASLHvSIwG3Jj/jtOZiyOp9k ogcmfOeIue/03UH6JC5phWk5WQn+nLJLtafJMtAhtXp65Q9pXvmkX5vJRyDIUJmM/Ix7 5SfI1AGRlirQvPevb8HjTklodSV6mPcuzevpA36VDiT+M026NoVtYJ3u8hw3V2e3wnfc iyD3V8mRpS1ztD4zbuPODu3KZykXNjvU6AgKGISmMcC3ORYI94sKEqaaJKs/Fd4EMtUR Vh52KqEA/KpOpJaMw/YDISTWipsbIz8yw/M6xkgbB+tmFJUOC25y+8HWJvmoABwxxZbl KSCQ== X-Gm-Message-State: APzg51B+tycUE4zx2cWX9DfPmWU2JEv/71iY8Nav7wLra78yNlsqFjwb rxELjHF9Up3A+JM9D9g9+xwdycTYM1UHw8JOsAYlvzns X-Google-Smtp-Source: ANB0Vdb4tr22QDt/BlyqGlvbnSyPLPochz1w4vNQXsRpdsgBho9Rx9ui83V3K2x3vN1a0gj/8S/bpcuh8Tjfxzf7Kbo= X-Received: by 2002:ab0:5f21:: with SMTP id p33-v6mr2483704uah.172.1535151010600; Fri, 24 Aug 2018 15:50:10 -0700 (PDT) In-Reply-To: <20180824220523.GF4418@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:13138 Archived-At: On Fri, Aug 24, 2018 at 3:05 PM, Szabolcs Nagy wrote: > * Andre McCurdy [2018-08-24 14:58:04 -0700]: >> On Fri, Aug 24, 2018 at 12:30 PM, Szabolcs Nagy wrote: >> > another arm patch, clz usage (in fma) was broken with -mthumb -march=armv5t. >> >> That conditional was originally written under the assumption that musl >> doesn't support thumb1 (so -mthumb -march=armv5t is not a supported >> configuration). >> >> Was that assumption wrong? > > the asm code in musl does not support thumb1, > but you can compile everything else with thumb1 > (the compiler does not pass -mthumb to the assembler > by default so all asm code will be in arm mode) > > so with the changed condition the build succeeds > with -mthumb -march=armv5t, but the resulting libc > will not be competely thumb code, i think that's > an improvement. Yes, I agree it's an improvement. Mostly thumb1 with a little ARM is still useful for a lot of use cases. As an aside, it seems that glibc unconditionally includes some thumb2 when targeting ARMv7, so there's precedent for mixing ARM and thumb[12] in libc. https://sourceware.org/bugzilla/show_bug.cgi?id=23031#c15