[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Weechat-dev] [patch #6977] Compilation can fail/error due to bad CFLAGS
From: |
bazerka |
Subject: |
[Weechat-dev] [patch #6977] Compilation can fail/error due to bad CFLAGS manipulation in configure.in |
Date: |
Thu, 12 Nov 2009 17:35:27 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) |
URL:
<http://savannah.nongnu.org/patch/?6977>
Summary: Compilation can fail/error due to bad CFLAGS
manipulation in configure.in
Project: WeeChat
Submitted by: bazerka
Submitted on: Thu 12 Nov 2009 05:35:25 PM GMT
Category: compilation
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
IRC nick: Bazerka
_______________________________________________________
Details:
In environments which pass in -g to CFLAGS, compilation can fail or error due
to the following line in configure.in
CFLAGS=`echo $CFLAGS | sed 's/ -g //g'`
For example:
cc -DHAVE_CONFIG_H -I. -I../.. -DLOCALEDIR=\"/usr/local/share/locale\"
-I/usr/local/include -D_THREAD_SAFE -Wall -W
-Werror-implicit-function-declaration -pipe -pipe-I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -g -O0
-I/usr/local/include -D_THREAD_SAFE -DWEECHAT_VERSION=\"0.3.0\" -MT
wee-infolist.o -MD -MP -MF .deps/wee-infolist.Tpo -c -o wee-infolist.o
wee-infolist.c
cc: unrecognized option '-pipe-I/usr/local/include'
and
cc -DHAVE_CONFIG_H -I. -I../.. -DLOCALEDIR=\"/usr/local/share/locale\"
-I/usr/local/include -I/usr/local/include -D_THREAD_SAFE -Wall -W
-Werror-implicit-function-declaration -pipe -pipe
-march=nocona-I/usr/local/include -DHAVE_GNUTLS -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -g -O0 -pthread
-I/usr/local/include -D_THREAD_SAFE -DWEECHAT_VERSION=\"0.3.0\" -MT weechat.o
-MD -MP -MF .deps/weechat.Tpo -c -o weechat.o weechat.c
weechat.c:1: error: bad value (nocona-I/usr/local/include) for -march=
switch
weechat.c:1: error: bad value (nocona-I/usr/local/include) for -mtune=
switch
*** Error code 1
The problem is that it removes a space before and after any occurance of "-g"
along with the "-g" itself. This will cause any CFLAGS arguments immediately
prior and following the " -g " to get concatenated. In the examples above,
this produces "-pipe-I/usr/local/include" and
"-march=nocona-I/usr/local/include".
The attached patch will replace " -g " with " ", thereby not concatenating
the prior and following CFLAGS arguments.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 12 Nov 2009 05:35:25 PM GMT Name: configure-patch-cflags.diff
Size: 366B By: bazerka
<http://savannah.nongnu.org/patch/download.php?file_id=19036>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6977>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [Weechat-dev] [patch #6977] Compilation can fail/error due to bad CFLAGS manipulation in configure.in,
bazerka <=