[LLVMdev] gfortran link failure in current llvm svn

Devang Patel dpatel at apple.com
Fri Oct 31 09:44:36 PDT 2008


On Oct 30, 2008, at 11:02 PM, Chris Lattner wrote:

> On Oct 30, 2008, at 5:23 PM, Jack Howarth wrote:
>> ps We do have one oddity left in llvm-gfortran from current llvm
>> svn. I find everytime I compile something with llvm-gfortran that
>> I get a series of warning messages...
>>
>> f951: warning: command line option "-Wformat" is valid for C/C++/
>> ObjC/ObjC++ but not for Fortran
>> f951: warning: command line option "-Wformat-security" is valid for
>> C/C++/ObjC/ObjC++ but not for Fortran
>> f951: warning: command line option "-Wno-format-extra-args" is valid
>> for C/C++/ObjC/ObjC++ but not for Fortran
>> f951: warning: command line option "-Wno-format-zero-length" is
>> valid for C/C++/ObjC/ObjC++ but not for Fortran
>> f951: warning: command line option "-Wno-nonnull" is valid for C/C++/
>> ObjC/ObjC++ but not for Fortran
>>
>> Is this something we can suppress easily for the 2.4 release?


Jack,

Try this not so elegant and untested patch.
-
Devang


Index: lang-specs.h
===================================================================
--- lang-specs.h	(revision 57986)
+++ lang-specs.h	(working copy)
@@ -14,7 +14,9 @@
    "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN % 
(cpp_options) \
        %{E|M|MM:%(cpp_debug_options)}\
        %{!M:%{!MM:%{!E: -o %|.f |\n\
-    f951 %|.f %{!ffree-form:-ffixed-form} %(cc1_options) %{J*} %{I*}\
+    f951 %|.f %{!ffree-form:-ffixed-form} %(cc1_options) \
+    %<Wformat %<Wformat-security %<Wno-format-extra-args %<Wno-format- 
zero-length %<Wno-nonull \
+    %{J*} %{I*}\
        "/* LLVM LOCAL */" \
        %(llvm_options) \
        -fpreprocessed %{!nostdinc:-I finclude%s} %{!fsyntax-only:% 
(invoke_as)}}}}", 0, 0, 0},
@@ -25,21 +27,27 @@
    "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN % 
(cpp_options) \
        %{E|M|MM:%(cpp_debug_options)}\
        %{!M:%{!MM:%{!E: -o %|.f95 |\n\
-    f951 %|.f95 %{!ffixed-form:-ffree-form} %(cc1_options) %{J*} %{I*}\
+    f951 %|.f95 %{!ffixed-form:-ffree-form} %(cc1_options) \
+    %<Wformat %<Wformat-security %<Wno-format-extra-args %<Wno-format- 
zero-length %<Wno-nonull \
+    %{J*} %{I*}\
        "/* LLVM LOCAL */" \
        %(llvm_options) \
        -fpreprocessed %{!nostdinc:-I finclude%s} %{!fsyntax-only:% 
(invoke_as)}}}}", 0, 0, 0},
  {".f90", "@f95", 0, 0, 0},
  {".f95", "@f95", 0, 0, 0},
  {".f03", "@f95", 0, 0, 0},
-{"@f95", "%{!E:f951 %i %(cc1_options) %{J*} %{I*}\
+{"@f95", "%{!E:f951 %i %(cc1_options) \
+         %<Wformat %<Wformat-security %<Wno-format-extra-args %<Wno- 
format-zero-length %<Wno-nonull \
+         %{J*} %{I*}\
           "/* LLVM LOCAL */" \
           %(llvm_options) \
           %{!nostdinc:-I finclude%s} %{!fsyntax-only:%(invoke_as)}}",  
0, 0, 0},
  {".f",   "@f77", 0, 0, 0},
  {".for", "@f77", 0, 0, 0},
  {".FOR", "@f77", 0, 0, 0},
-{"@f77", "%{!E:f951 %i %{!ffree-form:-ffixed-form} %(cc1_options) % 
{J*} %{I*}\
+{"@f77", "%{!E:f951 %i %{!ffree-form:-ffixed-form} %(cc1_options) \
+         %<Wformat %<Wformat-security %<Wno-format-extra-args %<Wno- 
format-zero-length %<Wno-nonull \
+         %{J*} %{I*}\
           "/* LLVM LOCAL */" \
           %(llvm_options) \
           %{!nostdinc:-I finclude%s} %{!fsyntax-only:%(invoke_as)}}",  
0, 0, 0},





More information about the llvm-dev mailing list