This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.4 PATCH: Pass multilib flags to libobjc


David Edelsohn writes:

> 	* Makefile.in (CC1OBJ): Remove.
> 	(runtime-info.h): Invoke $(CC) so all MULTIFLAGS are handled
> 	correctly.
> 	Use .m extension for temporary file.
> 
> Are you planning to commit this fix?

Here's the revised patch that correctly uses -S and removes the .s file.
I'm not sure it can go in under the obvious rule, though, especially due to
the use of the -Wp, hack.

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.

For the time being, the current version should be good enough to return AIX
to bootstrap land.  Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Fri Oct 17 18:26:57 2003  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* Makefile.in (CC1OBJ): Remove.
	(runtime-info.h): Invoke $(CC) so all MULTIFLAGS are handled
	correctly.
	Use .m extension for temporary file.
	Remove assembler temp file.
	
Index: libobjc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/Makefile.in,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile.in
--- libobjc/Makefile.in	17 Oct 2003 11:22:58 -0000	1.26
+++ libobjc/Makefile.in	20 Oct 2003 20:19:20 -0000
@@ -88,14 +88,6 @@ LIBTOOL_INSTALL = $(LIBTOOL) --mode=inst
 LIBTOOL_CLEAN   = $(LIBTOOL) --mode=clean
 #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
 
-#
-# Define the cc1obj in terms of the CC that is passed on from higher
-# level make. This is needed to make sure we can create runtime-info.h
-# when doing canadian cross builds where running ../../gcc/cc1obj 
-# does not make any sense.
-#
-CC1OBJ = `$(CC) -print-prog-name=cc1obj`
-
 INCLUDES = -I$(srcdir)/objc  -I$(srcdir)/$(MULTISRCTOP)../gcc \
   -I$(srcdir)/$(MULTISRCTOP)../gcc/config -I$(MULTIBUILDTOP)../../gcc \
   -I$(srcdir)/$(MULTISRCTOP)../include
@@ -161,10 +153,10 @@ OBJS_GC = archive_gc.lo class_gc.lo enco
 	  $(OBJC_THREAD_FILE)_gc.lo
 
 runtime-info.h: 
-	echo "" > tmp-runtime
+	echo "" > tmp-runtime.m
 	echo "/* This file is automatically generated */" > $@
-	$(CC1OBJ) $(MULTIFLAGS) -print-objc-runtime-info tmp-runtime >> $@
-	rm -f tmp-runtime
+	$(CC) $(MULTIFLAGS) -Wp,-print-objc-runtime-info -S tmp-runtime.m >> $@
+	rm -f tmp-runtime.m tmp-runtime.s
 
 archive_gc.lo: archive.c
 	$(LIBTOOL_COMPILE) $(CC) -c  -o $@ $(ALL_CFLAGS) $(OBJC_GCFLAGS) \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]