Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 30 Dec 2019 11:54:08 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: gnu autoconf AC_CANONICAL_BUILD returns linux-gnu
 build_os on Alpine Linux 3.10.3

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.