bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LT_LIB_M and gcc


From: The Wizard
Subject: LT_LIB_M and gcc
Date: Wed, 23 Dec 2009 07:06:36 -0800 (PST)

Hello!

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
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "---"
| #define PACKAGE_TARNAME "---"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "--- 1.0"
| #define PACKAGE_BUGREPORT "---"
| #define PACKAGE_URL ""
| #define PACKAGE "---"
| #define VERSION "1.0"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
|
| /* 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.

Regards,
W


reply via email to

[Prev in Thread] Current Thread [Next in Thread]