[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LT_LIB_M and gcc
From: |
Ralf Wildenhues |
Subject: |
Re: LT_LIB_M and gcc |
Date: |
Thu, 7 Jan 2010 21:39:31 +0100 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
Hello W,
* The Wizard wrote on Wed, Dec 23, 2009 at 04:06:36PM CET:
>
> I am wondering if it is a known issue (or my misunderstanding how to
> make things work) that LT_LIB_M (from libtool 2.2.6) and gcc (4.4.1)
> do not get together when option -Werror is used as a flag (configure
> CFLAGS="-Wall -Werror").
>
> The issue seems to be that gcc does not like (due to the -Werror flag)
> the program generated by AC_CHECK_LIB (called by LT_LIB_M). Here is
> the relevant section of config.log:
>
> configure:14335: checking for cos in -lm
> configure:14360: gcc -o conftest -g -Wall -Werror conftest.c -lm >&5
> cc1: warnings being treated as errors
> conftest.c:30: error: conflicting types for built-in function 'cos'
> configure:14360: $? = 1
[...]
> | /* Override any GCC internal prototype to avoid an error.
> | Use char because int might match the return type of a GCC
> | builtin and then its argument prototype would still apply. */
> | #ifdef __cplusplus
> | extern "C"
> | #endif
> | char cos ();
> | int
> | main ()
> | {
> | return cos ();
> | ;
> | return 0;
> | }
> configure:14369: result: no
>
> Removing the -Werror flag from configure solves the problem, however
> it bothers me that one needs to allow for non-standard compliant code
> to make this work. I am using autoconf 2.64 and automake 1.11.
>
> I do not submit bug reports (or just suspected bugs) often, so I am
> not sure what the right course of action here is and would appreciate
> any recommendations.
It is unfortunately not possible to make all configure tests clean for
-Wall -Werror, or more generally, all kinds of -W* flags in combination
with -Werror. AC_CHECK_LIB is such an example. We recommend that you
configure without -Werror. You could still override, say, CFLAGS or a
custom warning flag variable, at 'make' time, or by the configure
script, much as the gnulib module 'warnings' does.
Hope that helps.
Cheers,
Ralf
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: LT_LIB_M and gcc,
Ralf Wildenhues <=