Message ID | Pine.LNX.4.64.1012021634520.26340@digraph.polyomino.org.uk |
---|---|
State | New |
Headers | show |
On Thu, Dec 2, 2010 at 5:35 PM, Joseph S. Myers <joseph@codesourcery.com> wrote: > There are some specs that treat -ftraditional like -traditional and > -traditional-cpp. But the option will be passed to cc1, which rejects > it even when preprocessing, so these specs are useless. It appears > that actual support for -ftraditional as an alias of -traditional was > removed in 3.3 along with the support for -traditional compilation (as > opposed to preprocessing). I don't think it's now useful to restore > the alias; instead, this patch removes the useless specs. Reviewed. The gcc.c changes are ok, the objc changes I consider obvious. Thanks, Richard. > 2010-12-02 Joseph Myers <joseph@codesourcery.com> > > * gcc.c (trad_capable_cpp, default_compilers): Don't handle > -ftraditional. > > objc: > 2010-12-02 Joseph Myers <joseph@codesourcery.com> > > * lang-specs.h: Don't handle -ftraditional. > > diff -rupN --exclude=.svn gcc-mainline-3/gcc/gcc.c gcc-mainline/gcc/gcc.c > --- gcc-mainline-3/gcc/gcc.c 2010-12-01 16:45:23.000000000 -0800 > +++ gcc-mainline/gcc/gcc.c 2010-12-01 17:01:57.000000000 -0800 > @@ -709,7 +709,7 @@ static const char *sysroot_hdrs_suffix_s > call cc1 (or cc1obj in objc/lang-specs.h) from the main specs so > that we default the front end language better. */ > static const char *trad_capable_cpp = > -"cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}"; > +"cc1 -E %{traditional|traditional-cpp:-traditional-cpp}"; > > /* We don't wrap .d files in %W{} since a missing .d file, and > therefore no dependency entry, confuses make into thinking a .o > @@ -903,7 +903,7 @@ static const struct compiler default_com > external preprocessor if -save-temps is given. */ > "%{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)}\ > %{!E:%{!M:%{!MM:\ > - %{traditional|ftraditional:\ > + %{traditional:\ > %eGNU C no longer supports -traditional without -E}\ > %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ > %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ > diff -rupN --exclude=.svn gcc-mainline-3/gcc/objc/lang-specs.h gcc-mainline/gcc/objc/lang-specs.h > --- gcc-mainline-3/gcc/objc/lang-specs.h 2010-11-23 04:47:58.000000000 -0800 > +++ gcc-mainline/gcc/objc/lang-specs.h 2010-12-01 17:02:18.000000000 -0800 > @@ -1,5 +1,5 @@ > /* Definitions for specs for Objective-C. > - Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007 > + Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007, 2010 > Free Software Foundation, Inc. > > This file is part of GCC. > @@ -24,10 +24,10 @@ along with GCC; see the file COPYING3. > > {".m", "@objective-c", 0, 0, 0}, > {"@objective-c", > - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ > + "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ > %(cpp_options) %(cpp_debug_options)}\ > %{!E:%{!M:%{!MM:\ > - %{traditional|ftraditional|traditional-cpp:\ > + %{traditional|traditional-cpp:\ > %eGNU Objective C no longer supports traditional compilation}\ > %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ > cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ > @@ -35,10 +35,10 @@ along with GCC; see the file COPYING3. > cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ > %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, > {"@objective-c-header", > - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ > + "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ > %(cpp_options) %(cpp_debug_options)}\ > %{!E:%{!M:%{!MM:\ > - %{traditional|ftraditional|traditional-cpp:\ > + %{traditional|traditional-cpp:\ > %eGNU Objective C no longer supports traditional compilation}\ > %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ > cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ > > -- > Joseph S. Myers > joseph@codesourcery.com >
On Dec 2, 2010, at 8:40 AM, Richard Guenther wrote: > Reviewed. The gcc.c changes are ok, the objc changes I consider > obvious. Thanks for the review, I concur.
diff -rupN --exclude=.svn gcc-mainline-3/gcc/gcc.c gcc-mainline/gcc/gcc.c --- gcc-mainline-3/gcc/gcc.c 2010-12-01 16:45:23.000000000 -0800 +++ gcc-mainline/gcc/gcc.c 2010-12-01 17:01:57.000000000 -0800 @@ -709,7 +709,7 @@ static const char *sysroot_hdrs_suffix_s call cc1 (or cc1obj in objc/lang-specs.h) from the main specs so that we default the front end language better. */ static const char *trad_capable_cpp = -"cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}"; +"cc1 -E %{traditional|traditional-cpp:-traditional-cpp}"; /* We don't wrap .d files in %W{} since a missing .d file, and therefore no dependency entry, confuses make into thinking a .o @@ -903,7 +903,7 @@ static const struct compiler default_com external preprocessor if -save-temps is given. */ "%{E|M|MM:%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ - %{traditional|ftraditional:\ + %{traditional:\ %eGNU C no longer supports -traditional without -E}\ %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ diff -rupN --exclude=.svn gcc-mainline-3/gcc/objc/lang-specs.h gcc-mainline/gcc/objc/lang-specs.h --- gcc-mainline-3/gcc/objc/lang-specs.h 2010-11-23 04:47:58.000000000 -0800 +++ gcc-mainline/gcc/objc/lang-specs.h 2010-12-01 17:02:18.000000000 -0800 @@ -1,5 +1,5 @@ /* Definitions for specs for Objective-C. - Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007 + Copyright (C) 1998, 1999, 2002, 2002, 2003, 2005, 2007, 2010 Free Software Foundation, Inc. This file is part of GCC. @@ -24,10 +24,10 @@ along with GCC; see the file COPYING3. {".m", "@objective-c", 0, 0, 0}, {"@objective-c", - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ + "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ - %{traditional|ftraditional|traditional-cpp:\ + %{traditional|traditional-cpp:\ %eGNU Objective C no longer supports traditional compilation}\ %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ @@ -35,10 +35,10 @@ along with GCC; see the file COPYING3. cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ + "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ - %{traditional|ftraditional|traditional-cpp:\ + %{traditional|traditional-cpp:\ %eGNU Objective C no longer supports traditional compilation}\ %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\