[LLVMdev] llvm-gcc linux build broken

Török Edwin edwintorok at gmail.com
Wed Oct 1 10:45:29 PDT 2008


On 2008-10-01 19:51, Török Edwin wrote:
> On 2008-10-01 18:55, Duncan Sands wrote:
>   
>>> This means that I don't have a working llvm-gcc with TOT either.
>>>     
>>>       
>> I get the same thing on x86-32.
>>
>> Ciao,
>>
>> Duncan.
>>   
>>     
>
> HAVE_STDLIB_H is not defined, which causes a 'char* malloc()' definition
> in cplus-dem.c.
>
> From config.log:
> configure:8421: checking for stdlib.h
> configure:8461: result: no
>   

This is caused by -Wformat-security, which is enabled by default
incorrectly:

configure:3691: checking for stdlib.h
configure:3704:  /home/edwin/llvm-svn/objnew/./prev-gcc/xgcc
-B/home/edwin/llvm-svn/objnew/./prev-gcc/ -B/ho
me/edwin/llvm-svn/obj42/../install/x86_64-unknown-linux-gnu/bin/ -E 
conftest.c
cc1: warning: -Wformat-security ignored without -Wformat
configure:3710: $? = 0
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| #include <stdlib.h>
configure:3731: result: no

This was likely introduced by revision 55675

Here is a patch that works for me in a clean directory (it probably
needs an LLVM local marker), does it work for you?

Index: gcc/c.opt
===================================================================
--- gcc/c.opt   (revision 56922)
+++ gcc/c.opt   (working copy)
@@ -225,7 +225,7 @@
 Warn if testing floating point numbers for equality

 Wformat
-C ObjC C++ ObjC++
+C ObjC C++ ObjC++ Var(warn_format) Init(1)
 Warn about printf/scanf/strftime/strfmon format string anomalies

 Wformat-extra-args








More information about the llvm-dev mailing list