Summary: | dev-lang/ruby: configure.in implicitly uses AC_LANG_WERROR | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Robin Johnson <robbat2> |
Component: | [OLD] Development | Assignee: | Gentoo Ruby Team <ruby> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | arfrever.fta, floppym |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Robin Johnson
2016-04-10 20:33:28 UTC
The current autoconf manual has AC_TRY_LINK listed as an obsolete macro. http://www.gnu.org/software/autoconf/manual/autoconf.html#Obsolete-Macros Actually AC_TRY_LINK ignores warnings by default. AC_LANG_WERROR macro sets ac_${language}_werror_flag=yes variable: $ grep -A3 AC_LANG_WERROR /usr/share/autoconf-2.69/autoconf/lang.m4 # AC_LANG_WERROR # -------------- # Treat warnings from the current language's preprocessor, compiler, and # linker as fatal errors. AC_DEFUN([AC_LANG_WERROR], [m4_divert_text([DEFAULTS], [ac_[]_AC_LANG_ABBREV[]_werror_flag=]) ac_[]_AC_LANG_ABBREV[]_werror_flag=yes])# AC_LANG_WERROR $ configure.in of dev-lang/ruby sets ac_c_werror_flag=yes which behaves as if AC_LANG_WERROR was used for C language. $ cat configure.ac AC_INIT AC_PROG_CC AC_MSG_CHECKING([whether LDFLAGS is valid]) AC_TRY_LINK([], [], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_MSG_ERROR([something wrong with LDFLAGS])]) AC_OUTPUT $ autoconf $ LDFLAGS="-Wl,--warn-section-align" ./configure checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether LDFLAGS is valid... yes configure: creating ./config.status $ LDFLAGS="-Wl,--warn-section-align" ac_c_werror_flag="yes" ./configure checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether LDFLAGS is valid... no configure: error: something wrong with LDFLAGS $ (In reply to Robin Johnson from comment #0) > dev-lang/ruby-2.1.10/config.log snippet: > configure:7102: checking whether LDFLAGS is valid > configure:7115: x86_64-pc-linux-gnu-gcc -o conftest -march=native -O2 -pipe > -frecord-gcc-switches -fno-lto -fno-strict-aliasing -Wl,--hash-style=gnu > -Wl, > -O1 -Wl,--as-needed -Wl,--build-id -fno-lto conftest.c >&5 > /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ > ld: warning: Cannot create .note.gnu.build-id section, --build-id ignored. I'm trying to reproduce this, but with these LDFLAGS ruby configures fine and I don't see this warning in the log. Is there a way to trigger the --build-id warning? (In reply to Mike Gilbert from comment #1) > The current autoconf manual has AC_TRY_LINK listed as an obsolete macro. > > http://www.gnu.org/software/autoconf/manual/autoconf.html#Obsolete-Macros Yes, but the documentation refers to use AC_LINK_IFELSE. In autoconf 2.69 AC_TRY_LINK is just syntactic sugar for AC_LINK_IFELSE, so the problem is actually with AC_LINK_IFELSE then. |