This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.4 PATCH: Pass multilib flags to libobjc
Zack Weinberg writes:
> Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> writes:
>
> > A quick look at gcc.c, c.opt and c-opts.c revealed that all other
> > -print-* options are handled by the driver proper. One probably
> > needs to add -Wc, (like -Wa, and -Wp,) to be able to pass flags to
> > cc1 (or cc1obj in this case) specifically. As the option handling
> > maintainer, Neil should comment on this issue.
>
> Try just adding %{print-objc-runtime-info} to objc/lang-specs.h.
> I think, right before each instance of %{gen-decls}.
Worked for me and survived a bootstrap on mips-sgi-irix6.5 (all three
ABIs).
Ok for mainline?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Wed Oct 22 01:26:44 2003 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
libobjc:
* Makefile.in (runtime-info.h): Remove -Wp.
gcc:
* objc/lang-specs.h: Handle -print-objc-runtime-info.
* doc/invoke.texi (Objective-C Dialect Options): Document it.
Index: gcc/doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.354
diff -u -p -r1.354 invoke.texi
--- gcc/doc/invoke.texi 20 Oct 2003 21:46:46 -0000 1.354
+++ gcc/doc/invoke.texi 23 Oct 2003 20:03:50 -0000
@@ -1959,8 +1959,10 @@ while @code{-Wselector} only performs it
compilation. This also enforces the coding style convention
that methods and selectors must be declared before being used.
-@c not documented because only avail via -Wp
-@c @item -print-objc-runtime-info
+@item -print-objc-runtime-info
+@opindex -print-objc-runtime-info
+Generate C header describing the largest structure that is passed by
+value, if any.
@end table
Index: gcc/objc/lang-specs.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/objc/lang-specs.h,v
retrieving revision 1.33
diff -u -p -r1.33 lang-specs.h
--- gcc/objc/lang-specs.h 25 Sep 2003 01:25:53 -0000 1.33
+++ gcc/objc/lang-specs.h 23 Oct 2003 20:03:50 -0000
@@ -30,13 +30,13 @@ Boston, MA 02111-1307, USA. */
%{traditional|ftraditional|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) %{gen-decls}}\
+ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
%{!save-temps:%{!no-integrated-cpp:\
- cc1obj %(cpp_unique_options) %(cc1_options) %{gen-decls}}}\
+ cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
%{!fsyntax-only:%(invoke_as)}}}}", 0},
{".mi", "@objc-cpp-output", 0},
{"@objc-cpp-output",
- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{gen-decls}\
+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
%{!fsyntax-only:%(invoke_as)}}}}", 0},
{"@objective-c-header",
"%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
@@ -45,10 +45,10 @@ Boston, MA 02111-1307, USA. */
%{traditional|ftraditional|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) %{gen-decls}\
+ cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
-o %g.s %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}\
%{!save-temps:%{!no-integrated-cpp:\
- cc1obj %(cpp_unique_options) %(cc1_options) %{gen-decls}\
+ cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
-o %g.s %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}}}}}", 0},
Index: libobjc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/Makefile.in,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile.in
--- libobjc/Makefile.in 21 Oct 2003 14:11:13 -0000 1.27
+++ libobjc/Makefile.in 23 Oct 2003 20:04:41 -0000
@@ -155,7 +155,7 @@ OBJS_GC = archive_gc.lo class_gc.lo enco
runtime-info.h:
echo "" > tmp-runtime.m
echo "/* This file is automatically generated */" > $@
- $(CC) $(MULTIFLAGS) -Wp,-print-objc-runtime-info -S tmp-runtime.m >> $@
+ $(CC) $(MULTIFLAGS) -print-objc-runtime-info -S tmp-runtime.m >> $@
rm -f tmp-runtime.m tmp-runtime.s
archive_gc.lo: archive.c