From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14339 Path: news.gmane.org!.POSTED.blaine.gmane.org!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: Mon, 1 Jul 2019 14:09:05 -0700 Message-ID: References: <20180824193052.GD4418@port70.net> <20180824232027.GO1878@brightrain.aerifal.cx> <20190629041924.GI1506@brightrain.aerifal.cx> <20190701200952.GX1506@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="233982"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14355-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 01 23:09:33 2019 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.89) (envelope-from ) id 1hi3YK-000ylE-FF for gllmg-musl@m.gmane.org; Mon, 01 Jul 2019 23:09:32 +0200 Original-Received: (qmail 17988 invoked by uid 550); 1 Jul 2019 21:09:29 -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 17968 invoked from network); 1 Jul 2019 21:09:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=DrayEs2YrKNI4UDOGbopQL+fbBtsuoHP8a7M98uUIMk=; b=GOX2LmWP9UzR0X81DLdW0UH7RSW3/0MDncWh4HCV/hdU+EXRrV6RZr08y8pRq7RSAl ZW/I/WYOK5AGOkUz0Cj/SM+NYZFPHHL/0AYJFsjHeM5fwacdOW5Y0q+d0XFsvqUtm+CX 0WfjgqQPVv6vZ6OmTYsaflxNOiwhmzhTGIPBXSlzCHXn4yFvLieGRO2u4uUSnnltkiTD 1r82BgsPoemNfVJ6y2jNM+ORxT709wf25Tgal1OY/5Cgytbr0xhffgcbFmneW9wBOD4f ZxGan7PIPBbU5Y4tvGOml0nhr5jRUxIuOJydIkAujxifX23OlqVxfykKfNEJ0644Hilm tS/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=DrayEs2YrKNI4UDOGbopQL+fbBtsuoHP8a7M98uUIMk=; b=H+4ANCfc8oF/atOf7DIgPCFzShsvNllC3qaCReJGQAkL8Mb0ZTsB0HkgRekjpK0Wtz CuVB4r+Io5tqnbh4fRCXvIKbSfWEKwWePyhAOjluOxRVeS8Cpka0RnlFEZfVsO38/q8g EUe3dqyOGnMoUKikKbPkVzvPKLf0TXIVtlPTPGINzUv8MSHpFfKBvJiORvHNI4bJpgPR 2Lj67XdMx7ppgeKhXm1ueNnRUUPo1AoSVcjatdjJdFiLY5+R3Z/WhUb6hxPT4ym3Jvhs Q7hMnST4Z8Ni3om500CpVsQT4ai3DZpD5OVa2mhTgIvD4l8dSbhzwc93vdIUi2SvOx5J 0UvA== X-Gm-Message-State: APjAAAURzPnurb6rlCT+TIbdBYq5jZA315pDtdihw+cN6uRR5LSmFa9V 2oosNHsXgQwIczJPQdthn1w2HcXXYtV0DxbtzZ7tOA== X-Google-Smtp-Source: APXvYqyU1l1YRs7ylGOT28SZgCKMfqs32KIoS5yRVeaU6KLYv6pQjbEp4IY3K7GXhblwFjWDt6/I9Pd7MoiGEdKOMao= X-Received: by 2002:a67:ea49:: with SMTP id r9mr15814271vso.223.1562015357069; Mon, 01 Jul 2019 14:09:17 -0700 (PDT) In-Reply-To: <20190701200952.GX1506@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14339 Archived-At: On Mon, Jul 1, 2019 at 1:10 PM Rich Felker wrote: > On Mon, Jul 01, 2019 at 12:09:26PM -0700, Andre McCurdy wrote: > > On Fri, Jun 28, 2019 at 9:19 PM Rich Felker wrote: > > > On Fri, Jun 28, 2019 at 03:55:56PM -0700, Andre McCurdy wrote: > > > > On Fri, Aug 24, 2018 at 4:20 PM Rich Felker wrote: > > > > > musl does not support being pure-thumb1 code, because some of the asm > > > > > source files are not thumb-compatible, but I think the C code can be > > > > > compiled as thumb1. -mthumb is only passed to the assembler for asm > > > > > source files if __thumb2__ is defined. > > > > > > > > Sorry to resurrect such an old thread, but it seems this patch was > > > > never applied? > > > > > > > > Without it, -mthumb -march=armv5t still fails to build due to clz > > > > getting into C code via inline assembler. > > > > > > Thanks for reviving this thread. I'll commit it or something similar. > > > I wonder if _ARM_ARCH>=5 && __thumb__!=1 would be a better test. > > > > __thumb__ is either 1 (for both Thumb1 and Thumb2) or undefined (for > > ARM). The above might misleadingly suggest that it's sometimes defined > > with a value other than 1? > > Oh, sorry. I meant _ARM_ARCH>=5 && (!__thumb__ || __thumb2__). I was > wrongly thinking __thumb__ was defined as 1/2 rather than having a > separate __thumb2__ macro. I think that version looks OK. Note that __ARM_ARCH has two leading underscores.