gcc: Include libgcc.a on those architectures that need it
authorharald.geyer@gmx.at <harald.geyer@gmx.at>
Wed, 7 Jan 2015 11:53:28 +0000 (12:53 +0100)
committerChristian Beier <dontmind@freeshell.org>
Wed, 7 Jan 2015 16:11:03 +0000 (17:11 +0100)
Right now these are arm, hppa, microblaze, powerpc, sh and xtensa.
So we just try to grep for it to figure out if it is needed.

Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Christian Beier <dontmind@freeshell.org>
devel/gcc/Makefile
devel/gcc/README

index c8d87335e91c4c685a68edc5998210b46501d8f6..9cdde88dda2f66f208b5e58523fc0c2b59081e9b 100644 (file)
@@ -110,6 +110,7 @@ define Package/gcc/install
        cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
        cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
        cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a  $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
+       grep "GROUP.*-lgcc" $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgcc_s.so && cp -a $(PKG_INSTALL_DIR)/usr/lib/gcc/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/libgcc.a $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)/ ; true
 endef
 
 $(eval $(call BuildPackage,gcc))
index 6cbc80d2b6969569c592466e6ecfc8413a4d8bc9..3dd94eb1746b681f0ff83a97b4a78fe9f6f1fe5a 100644 (file)
@@ -1,8 +1,9 @@
 Native GCC that runs on target.
 
 To save disk space, this GCC only supports dynamic linking on the target box,
-there are no static libraries shipped.
+there are no static libraries shipped except libgcc.a on those architectures
+that need it.
 
 For now, this was only tested on a mips target. Others to be done...
 
-   Christian Beier <cb@shoutrlabs.com>
\ No newline at end of file
+   Christian Beier <cb@shoutrlabs.com>