From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14335 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 12:09:26 -0700 Message-ID: References: <20180824193052.GD4418@port70.net> <20180824232027.GO1878@brightrain.aerifal.cx> <20190629041924.GI1506@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="263968"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-14351-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 01 21:09:52 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 1hi1gW-0016aV-FW for gllmg-musl@m.gmane.org; Mon, 01 Jul 2019 21:09:52 +0200 Original-Received: (qmail 7547 invoked by uid 550); 1 Jul 2019 19:09:50 -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 7526 invoked from network); 1 Jul 2019 19:09:50 -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=3YgAJf1I2DpzloW9WQimdnwPLliyelqTvYT7ZHH4huU=; b=d2Dw0k0mthNKZh1r3nrWQs7UtoiRnaIQN5OmIbJadV34xR4XvCpVAboqPTKs3Wjm6F lfAujvMmhCGynyqF8H1aUUl79UWUGt5gGpX+jrNalMgJRH6UA1vTIdc/AiHrU+2tZIxD Z+nLWGsDDf7Xo/NUnGPJDse08gqdhQD28I/Z7I77L5aAoSmmLYG1oKbrLrH7GFhHjG8w 0UE88SuFUWsOmPbvqHeesL+nC1GPTHdJuwfHEp6fYbZ1b8lIXSnhrQjTGa7UPphbXqcq d8czxGL0m0YvXu2XClVI3qm4HPaT8gFQAx09rS8FujugORHvXVLBgMYxmfdVDkXdruy2 nmUQ== 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=3YgAJf1I2DpzloW9WQimdnwPLliyelqTvYT7ZHH4huU=; b=Ks1KrQZM4do4RwLxeApu3xMwV9B5LljY1yExBo/+3CiLQGDgs00B7rTzpY0sHoO7p0 x6tbvftqUH32eFImitv8yGd9NLYk0KMz7QaT4GBv0huhlwf9QAWKWsrUZEnwIAkrXTpt J373vJgfAb+b/FQB1mWFxMQsxpzee/J45RJiITBStpHvq4ikYQdDKRDJwtb/TGeg3mqI L2bCAZln3WC2rh5VThGy1D++h1oODB3hxMQrtyfUOYoFI3CP8L1GJq2zdUTG4DKwVbKT ff4agPyo7SMmdSLosgekTEMD42PGBrqPYJJvMltKhqWJt2IypISEoUZZK1J62ddDiSib 2luA== X-Gm-Message-State: APjAAAUvFuR0wFKD/lDpQ+2v1uWem7bTn8bu7q1qv6yyqBRQSwL64w3G GxLSArJFUsbP2AGl+Z7h1/XMJczDxAsZ5hSS34lT7g== X-Google-Smtp-Source: APXvYqxXYjWCHYo61svJOdSYOKbziFGB2cWGtG7ra8bsOZG6JGoGmXbzb42fGCWpGHgWfT3c3etEIwxQYRmITtjrdVs= X-Received: by 2002:a67:cd09:: with SMTP id u9mr4453985vsl.222.1562008177851; Mon, 01 Jul 2019 12:09:37 -0700 (PDT) In-Reply-To: <20190629041924.GI1506@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:14335 Archived-At: 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?