The following patch enables support for shared libgpc libraries on Darwin.
--- gcc-3.4.5-orig/gcc/p/rts/Makefile.in 2005-12-15 17:41:59.000000000 +0100 +++ gcc-3.4.5/gcc/p/rts/Makefile.in 2005-12-18 20:44:49.000000000 +0100 @@ -54,6 +54,11 @@ GPCSOLIBNAME=$(GPCSOLIBSHORTNAME).$(gpc_major).$(gpc_minor).$ (rts_version) GPCLIB=$(DESTDIR)/libgpc.a GPCSOLIB=$(DESTDIR)/$(GPCSOLIBNAME) +ifdef TARGET_MACHO + GPCSOLIBOPTIONS = -dynamiclib -dylib_install_name,$(GPCSOLIBNAME) +else + GPCSOLIBOPTIONS = -shared -Wl,-soname=$(GPCSOLIBNAME) +endif PFLAGS1=--unit-path=$(VPATH) --automake RTS_WARN=-W -Wall -Wmissing-prototypes -Wmissing-declarations RTS_CFLAGS=-I. $(RTS_WARN) $(CFLAGS) $(RTSFLAGS)# -DDEBUG @@ -195,7 +200,7 @@ sharedlib.yes: $(GPCSOLIB) $(GPCSOLIB): $(SO_OBJS) -rm -f $(GPCSOLIB) - $(CC) -shared -Wl,-soname=$(GPCSOLIBNAME) -fPIC -o $(GPCSOLIB) $ (SO_OBJS) + $(CC) $(GPCSOLIBOPTIONS) -fPIC -o $(GPCSOLIB) $(SO_OBJS)
mostlyclean: -rm -f $(OBJS) $(SO_OBJS) *.gpi *.gpd core needed-options stamp- error-gpi
Some help on the command line is needed, e.g.
[g5:~/gpc/gpc-20051116/build] adriaan% cd gcc/p/rts [g5:gcc/p/rts] adriaan% make clean [g5:gcc/p/rts] adriaan% make GPCSOLIBNAME=libgpc-345u1.dylib WITH_SHARED=yes TARGET_MACHO=1
Regards,
Adriaan van Os