From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/15075 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: gnu autoconf AC_CANONICAL_BUILD returns linux-gnu build_os on Alpine Linux 3.10.3 Date: Mon, 30 Dec 2019 11:54:08 -0500 Message-ID: <20191230165408.GF30412@brightrain.aerifal.cx> References: <1504261577705096@sas1-0ef7a84b6a92.qloud-c.yandex.net> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="74287"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-15091-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 30 17:54:24 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 1ilyJD-000JEB-NF for gllmg-musl@m.gmane.org; Mon, 30 Dec 2019 17:54:23 +0100 Original-Received: (qmail 7834 invoked by uid 550); 30 Dec 2019 16:54:21 -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 7816 invoked from network); 30 Dec 2019 16:54:20 -0000 Content-Disposition: inline In-Reply-To: <1504261577705096@sas1-0ef7a84b6a92.qloud-c.yandex.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:15075 Archived-At: On Mon, Dec 30, 2019 at 02:24:56PM +0300, Scherbatiy Alexander wrote: > Hello, > > gnu autoconf AC_CANONICAL_BUILD returns linux-gnu build_os variable on Alpine Linux 3.10.3. > > Here is a snippet from the configure.ac file which I tested in docker alpine:3.10.3 > ---------------- > AC_CANONICAL_BUILD > AC_MSG_NOTICE([build_os=$build_os]) > ---------------- > Output: > ---------------- > checking build system type... x86_64-pc-linux-gnu > configure: build_os=linux-gnu > ---------------- > > The same code on Alpine 3.8.4 (docker alpine:3.8 ) returns: > ---------------- > checking build system type... x86_64-pc-linux-musl > configure: build_os=linux-musl > ---------------- > > Is it expected that build_os is detected as linux-gnu instead of linux-musl on Alpine 3.0.3? Where was autoconf run to generate the configure script? Production of linux-musl tuples is a new behavior in recent autoconf, and whether it happens depends on what version of autoconf was used to build the configure script, not what versions of software are present where the configure script runs. Use of this result is almost certainly a bug/misuse of configure. Run a configure test for whatever property you're depending on, not whether the name is linux-musl vs linux-gnu. Rich