mailing list of musl libc
 help / color / mirror / code / Atom feed
* gnu autoconf AC_CANONICAL_BUILD returns linux-gnu build_os on Alpine Linux 3.10.3
@ 2019-12-30 11:24 Scherbatiy Alexander
  2019-12-30 16:54 ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Scherbatiy Alexander @ 2019-12-30 11:24 UTC (permalink / raw)
  To: musl

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?

Thanks,
Alexander.

Simple project:

--- configure.ac ---
AC_INIT([amhello], [1.0], [bug-automake@gnu.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])

# Environment
AC_CANONICAL_BUILD
AC_MSG_NOTICE([build_os=$build_os])

AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
 Makefile
])
AC_OUTPUT

--- Makefile.am ---
bin_PROGRAMS = hello
hello_SOURCES = main.c

--- Makefile.am ---
bin_PROGRAMS = hello
hello_SOURCES = main.c
/tmp/sample/autoconf-sample # cat main.c 
#include <config.h>
#include <stdio.h>

int main (void)
{
  printf("Hello World!\n");
  return 0;
}

----------------
autoreconf -i
./configure



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-10 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30 11:24 gnu autoconf AC_CANONICAL_BUILD returns linux-gnu build_os on Alpine Linux 3.10.3 Scherbatiy Alexander
2019-12-30 16:54 ` Rich Felker
2020-01-10 12:34   ` Alexander Scherbatiy

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).