mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
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	[thread overview]
Message-ID: <20191230165408.GF30412@brightrain.aerifal.cx> (raw)
In-Reply-To: <1504261577705096@sas1-0ef7a84b6a92.qloud-c.yandex.net>

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


  reply	other threads:[~2019-12-30 16:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 11:24 Scherbatiy Alexander
2019-12-30 16:54 ` Rich Felker [this message]
2020-01-10 12:34   ` Alexander Scherbatiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191230165408.GF30412@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).