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:

> 	libobjc:
> 	* Makefile.in (runtime-info.h): Use MULTIFLAGS.
> 
> 	Something about this patch broke bootstrap on AIX.  I now get:
> 
> cc1obj: error: unrecognized command line option "-pthread"
> make[4]: *** [runtime-info.h] Error 1

This seems to happen because $(MULTIFLAGS) is passed to cc1obj directly
instead of using the compiler driver.  Could you please try if this hack
works for you: I need -Wp,-print-objc-runtime since the latter flag is only
understood by cc1obj, not gcc itself, and there is no method to pass flags
to cc1{, objc, plus, ...} directly (using something like -Wc,<flag>), so
it's passed as if a preprocessor flag ;-(

The special provisions for canadian crosses shouldn't be necessary now that
$(CC) is invoked directly.

A proper fix would make -print-objc-runtime known to gcc.  I'll leave this
for later.

	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.

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	17 Oct 2003 20:22:10 -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 tmp-runtime.m >> $@
+	rm -f tmp-runtime.m
 
 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]