components/gcc3/Makefile
changeset 378 f0b61ed1d10d
parent 313 e30cc0dc4e8b
child 392 59cfe0ca65fb
--- a/components/gcc3/Makefile	Thu Jul 07 14:07:49 2011 -0700
+++ b/components/gcc3/Makefile	Thu Jul 07 19:05:29 2011 -0700
@@ -71,7 +71,16 @@
 # common targets
 build:		$(BUILD_32)
 
-install:	$(INSTALL_32)
+$(PROTO_DIR)/.sedded:	$(INSTALL_32)
+	(cd $(@D) ; for file in libstdc++.la libsupc++.la ; do \
+		$(MV) usr/sfw/lib/$$file usr/sfw/lib/$$file.orig ; \
+		sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/sfw/lib -lgcc_s -lm';" usr/sfw/lib/$$file.orig >usr/sfw/lib/$$file ; \
+		$(MV) usr/sfw/lib/$(MACH64)/$$file usr/sfw/lib/$(MACH64)/$$file.orig ; \
+		sed -e "s;\\(dependency_libs=\\).*;\\1' -L/usr/sfw/lib/$(MACH64) -lgcc_s -lm';" usr/sfw/lib/$(MACH64)/$$file.orig >usr/sfw/lib/$(MACH64)/$$file ; \
+	 done)
+	$(TOUCH) [email protected]
+
+install:	$(PROTO_DIR)/.sedded
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)