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]

Patches for ObjC rt lib extraction


Jeff,

Here are some patches for you.  I am doing this in two phases -- the first
is to clean up the gcc build and stop building the library and the second
to build the runtime library from its new home in egcs/libobjc.

You might just want to hang onto these until then, or apply them but not
commit them.  Or if you do, we just won't have libobjc.a for a few days.
We will also have to do a cvs remove on a lot of the files in gcc/objc
once I'm finished.

Are there any ObjC maintainers on the egcs mailing list?  Do the ones
mentioned in the objc/README still do work on it?

Ben

Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/ChangeLog,v
retrieving revision 1.1393
diff -r1.1393 ChangeLog
0a1,16
> Sat May 30 15:13:39 1998  Ben Elliston  <bje@cygnus.com>
> 
>       * objc/config-lang.in: Do not output the name of the selected
>       thread file when building the front-end.  The Makefile for the
>       runtime library will do this.
> 
>       * objc/Make-lang.in: Do not build the runtime library or install
>       the Objective C header files.  The Makefile for the runtime
>       library will do this.
> 
>       * objc/Makefile.in (all.indirect): Only build the front-end.
>       (compiler): Rename to `frontend'.
>       (obj-runtime): Remove target.
>       (copy-headers): Likewise.
>       (clean): No need to remove `libobjc.a' any longer.
> 

And then in the objc/ subdirectory:

Index: Make-lang.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/objc/Make-lang.in,v
retrieving revision 1.15
diff -r1.15 Make-lang.in
53,54c53,54
< OBJC objc: cc1obj$(exeext) objc-runtime
< OBJECTIVE-C objective-c: cc1obj$(exeext) objc-runtime
---
> OBJC objc: cc1obj$(exeext)
> OBJECTIVE-C objective-c: cc1obj$(exeext)
59,61d58
< # The Objective C thread file
< OBJC_THREAD_FILE=thr-$(GCC_THREAD_FILE)
< 
97,215d93
< objc-runtime: objc-headers libobjc.a
< 
< # copy objc header files into build directory
< objc-headers: stmp-fixinc
< 	if [ -d include ]; then true; else mkdir include; fi
< 	cd objc; \
< 	if [ -f Makefile ]; then \
< 	  $(MAKE) copy-headers \
< 	  tooldir=$(tooldir) \
< 	  AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
< 	  GCC_FOR_TARGET="../xgcc -B../" \
< 	  GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=../include; \
< 	fi
< 	touch objc-headers
< 
< # Objective C runtime library specific files.
< 
< OBJC_O = objc/hash.o objc/sarray.o \
< 	objc/class.o objc/sendmsg.o \
< 	objc/init.o objc/archive.o \
< 	objc/encoding.o objc/selector.o \
< 	objc/objects.o objc/misc.o \
< 	objc/NXConstStr.o objc/Object.o \
< 	objc/Protocol.o objc/nil_method.o \
< 	objc/thr.o objc/linking.o \
< 	objc/$(OBJC_THREAD_FILE).o
< 
< objc/hash.o: $(srcdir)/objc/hash.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/hash.c -o $@
< objc/sarray.o: $(srcdir)/objc/sarray.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/sarray.c -o $@
< objc/class.o: $(srcdir)/objc/class.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/class.c -o $@
< objc/sendmsg.o: $(srcdir)/objc/sendmsg.c $(GCC_PASSES) objc/runtime-info.h
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -Iobjc \
< 	-c $(srcdir)/objc/sendmsg.c -o $@
< objc/init.o: $(srcdir)/objc/init.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/init.c -o $@
< objc/archive.o: $(srcdir)/objc/archive.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/archive.c -o $@
< objc/encoding.o: $(srcdir)/objc/encoding.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/encoding.c -o $@
< objc/selector.o: $(srcdir)/objc/selector.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/selector.c -o $@
< objc/objects.o: $(srcdir)/objc/objects.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/objects.c -o $@
< objc/misc.o: $(srcdir)/objc/misc.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/misc.c -o $@
< objc/NXConstStr.o: $(srcdir)/objc/NXConstStr.m $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-fgnu-runtime -c $(srcdir)/objc/NXConstStr.m -o $@
< objc/Object.o: $(srcdir)/objc/Object.m $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-fgnu-runtime -c $(srcdir)/objc/Object.m -o $@
< objc/Protocol.o: $(srcdir)/objc/Protocol.m $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-fgnu-runtime -c $(srcdir)/objc/Protocol.m -o $@
< objc/thr.o: $(srcdir)/objc/thr.h $(srcdir)/objc/thr.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/thr.c -o $@
< objc/$(OBJC_THREAD_FILE).o: $(srcdir)/objc/$(OBJC_THREAD_FILE).c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/$(OBJC_THREAD_FILE).c -o $@
< objc/nil_method.o: $(srcdir)/objc/nil_method.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/nil_method.c -o $@
< objc/linking.o: $(srcdir)/objc/linking.m $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-fgnu-runtime -c $(srcdir)/objc/linking.m -o $@
< 
< objc/libobjc_entry.o: $(srcdir)/objc/libobjc_entry.c $(GCC_PASSES)
< 	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
< 	-c $(srcdir)/objc/libobjc_entry.c -o $@
< 
< $(OBJC_O): $(GCC_PASSES) cc1obj$(exeext)
< 
< # Build the Objective C runtime library.
< libobjc.a: cc1obj$(exeext) specs stmp-int-hdrs libgcc2.ready \
<  $(USE_COLLECT2) $(EXTRA_PARTS) objc/runtime-info.h $(OBJC_O)
< 	-rm -f libobjc.a
< 	$(AR) $(AR_FLAGS) libobjc.a $(OBJC_O)
< 	-if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
< 
< libobjc_s.a: libobjc.a
< 	mv libobjc.a libobjc_s.a
< 
< # Create a relocatable DLL
< libobjc.dll: libobjc_s.a objc/libobjc_entry.o
< 	$(GCC_FOR_TARGET) -mdll -Wl,--base-file -Wl,libobjc.base \
< 		-o libobjc.dll libobjc_s.a \
< 		objc/libobjc_entry.o -lkernel32
< 	$(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/objc/libobjc.def \
< 		--base-file libobjc.base --output-exp libobjc.exp
< 	$(GCC_FOR_TARGET) -mdll -Wl,--base-file libobjc.base libobjc.exp \
< 		-o libobjc.dll libobjc_s.a \
< 		objc/libobjc_entry.o -lkernel32
< 	$(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/objc/libobjc.def \
< 		--base-file libobjc.base --output-exp libobjc.exp
< 	$(GCC_FOR_TARGET) libobjc.exp -mdll \
< 		-o libobjc.dll libobjc_s.a \
< 		objc/libobjc_entry.o -lkernel32
< 	$(DLLTOOL) --dllname libobjc.dll --def $(srcdir)/objc/libobjc.def \
< 		--output-lib libobjc.a
< 
< # Platform generated information needed by ObjC runtime
< objc/runtime-info.h: cc1obj$(exeext)
< 	echo "" > tmp-runtime
< 	echo "/* This file is automatically generated */" >$@
< 	./cc1obj -print-objc-runtime-info tmp-runtime >>$@
< 	rm -f tmp-runtime
231,249c109
< objc.install-normal: installdirs
< 	-if [ -f libobjc.a ] ; then \
< 	  rm -f $(libsubdir)/libobjc.a; \
< 	  $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
< 	  if $(RANLIB_TEST) ; then \
< 	    (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
< 	  chmod a-x $(libsubdir)/libobjc.a; \
< 	else true; fi
< 	-if [ -f libobjc_s.a ] ; then \
< 	  rm -f $(libsubdir)/libobjc_s.a; \
< 	  $(INSTALL_DATA) libobjc_s.a $(libsubdir)/libobjc_s.a; \
< 	  if $(RANLIB_TEST) ; then \
< 	    (cd $(libsubdir); $(RANLIB) libobjc_s.a); else true; fi; \
< 	  chmod a-x $(libsubdir)/libobjc_s.a; \
< 	else true; fi
< 	-if [ -f libobjc.dll ] ; then \
< 	  rm -f $(bindir)/libobjc.dll; \
< 	  $(INSTALL_DATA) libobjc.dll $(bindir)/libobjc.dll; \
< 	else true; fi
---
> objc.install-normal:
265,267d124
< 	-rm -f objc/runtime-info.h
< 	-rm -f libobjc.a libobjc_s.a libobjc.dll
< 	-rm -f libobjc.base libobjc.exp
285d141
< 	-mv libobjc.a stage1
289d144
< 	-mv libobjc.a stage2
293d147
< 	-mv libobjc.a stage3
297d150
< 	-mv libobjc.a stage4
Index: Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/objc/Makefile.in,v
retrieving revision 1.2
diff -r1.2 Makefile.in
1c1
< #  GNU Objective C Runtime Makefile
---
> #  GNU Objective C frontend Makefile
20,29c20,29
< #  This makefile is run by the parent dir's makefile.
< #  thisdir1=`pwd`; \
< #  srcdir1=`cd $(srcdir); pwd`; \
< #  cd objc; \
< #  $(MAKE) $(MAKEFLAGS) -f $$srcdir1/objc/Makefile libobjc.a \
< #    srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
< #    GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
< #    GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$$thisdir1/include
< #    OBJC_THREAD_FILE="$(OBJC_THREAD_FILE)"
< #  Two targets are used by ../Makefile: `all' and `mostlyclean'.
---
> #  The Makefile built from this file lives in the objc language subdirectory.
> #  Its purpose is to provide support for:
> #
> #  1. recursion where necessary, and only then (building ..o's), and
> #  2. building and debugging cc1objc from the language subdirectory.
> #
> #  The parent Makefile handles all other chores, with help from the language
> #  Makefile fragment.
> #
> #  The targets for external use are `all' and `mostlyclean'.
33,34d32
< .SUFFIXES: .m
< 
59,61d56
< OBJC_H = hash.h objc-list.h sarray.h objc.h objc-api.h \
<   NXConstStr.h Object.h Protocol.h encoding.h typedstream.h thr.h
< 
63c58
< all.indirect: Makefile compiler objc-runtime
---
> all.indirect: Makefile frontend
65c60
< compiler:
---
> frontend:
68,80d62
< objc-runtime:
< 	cd ..; $(MAKE) libobjc.a
< 
< # copy objc headers to installation include directory
< copy-headers: 
< 	-rm -fr $(incinstalldir)/objc
< 	-mkdir $(incinstalldir)/objc
< 	for file in $(OBJC_H); do \
< 	  realfile=$(srcdir)/$${file}; \
< 	  cp $${realfile} $(incinstalldir)/objc; \
< 	  chmod a+r $(incinstalldir)/objc/$${file}; \
< 	done
< 
85c67
< 	-rm -f *.o libobjc.a xforward fflags
---
> 	-rm -f *.o xforward fflags
Index: config-lang.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/objc/config-lang.in,v
retrieving revision 1.1.1.2
diff -r1.1.1.2 config-lang.in
36,37d35
< 
< echo "Using \`$srcdir/objc/thr-${thread_file}.c' as Objective-C Runtime thread file."



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