Browse Source

gcc: Include libgcc.a on those architectures that need it

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>
harald.geyer@gmx.at 10 years ago
parent
commit
1a7de36186
2 changed files with 4 additions and 2 deletions
  1. 1
    0
      devel/gcc/Makefile
  2. 3
    2
      devel/gcc/README

+ 1
- 0
devel/gcc/Makefile View File

110
 	cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
110
 	cp -ar $(TOOLCHAIN_DIR)/include $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
111
 	cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
111
 	cp -a $(TOOLCHAIN_DIR)/lib/*.{o,so*} $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
112
 	cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a  $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
112
 	cp -a $(TOOLCHAIN_DIR)/lib/*nonshared*.a  $(1)/usr/lib/$(PKG_NAME)/$(REAL_GNU_TARGET_NAME)/$(PKG_VERSION)
113
+	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
113
 endef
114
 endef
114
 
115
 
115
 $(eval $(call BuildPackage,gcc))
116
 $(eval $(call BuildPackage,gcc))

+ 3
- 2
devel/gcc/README View File

1
 Native GCC that runs on target.
1
 Native GCC that runs on target.
2
 
2
 
3
 To save disk space, this GCC only supports dynamic linking on the target box,
3
 To save disk space, this GCC only supports dynamic linking on the target box,
4
-there are no static libraries shipped.
4
+there are no static libraries shipped except libgcc.a on those architectures
5
+that need it.
5
 
6
 
6
 For now, this was only tested on a mips target. Others to be done...
7
 For now, this was only tested on a mips target. Others to be done...
7
 
8
 
8
-   Christian Beier <cb@shoutrlabs.com>
9
+   Christian Beier <cb@shoutrlabs.com>