diff options
author | Steven Barth <steven@midlink.org> | 2014-09-12 12:25:55 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2014-09-12 12:25:55 +0000 |
commit | 48388f901b59108f376ab0eea2dbdbd82a99a01c (patch) | |
tree | bc7b71d19e52d7f585fdd42b1d9394fd5da66a07 /package/libs/toolchain | |
parent | 455c1fabf8e79fb4f49085516f36db172a46226b (diff) | |
download | upstream-48388f901b59108f376ab0eea2dbdbd82a99a01c.tar.gz upstream-48388f901b59108f376ab0eea2dbdbd82a99a01c.tar.bz2 upstream-48388f901b59108f376ab0eea2dbdbd82a99a01c.zip |
toolchain: packetize libatomic
Based on a patch by Tobias Steinicke <tobias.steinicke@inet.tu-berlin.de>.
Signed-off-by: Steven Barth <steven@midlink.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42514 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/libs/toolchain')
-rw-r--r-- | package/libs/toolchain/Makefile | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index e4a78ed5f2..36cf8c471b 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -52,6 +52,31 @@ define Package/libgcc/config endmenu endef +define Package/libatomic +$(call Package/gcc/Default) + DEPENDS:=+libgcc + TITLE:=Atomic support library +endef + +define Package/libatomic/config + menu "Configuration" + depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic + + config LIBATOMIC_ROOT_DIR + string + prompt "libatomic shared library base directory" + depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic + default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN + default "/" if NATIVE_TOOLCHAIN + + config LIBATOMIC_FILE_SPEC + string + prompt "libatomic shared library files (use wildcards)" + depends on EXTERNAL_TOOLCHAIN && PACKAGE_libatomic + default "./lib/libatomic.so.*" + + endmenu +endef define Package/libssp $(call Package/gcc/Default) @@ -316,6 +341,13 @@ ifneq ($(BUILD_LIBGCC),) -Wl,-soname=libcrypt.so.0 $(SCRIPT_DIR)/relink-lib.sh \ "$(TARGET_CROSS)" \ + "$(wildcard $(TOOLCHAIN_DIR)/lib/libatomic.so)" \ + "$(wildcard $(TOOLCHAIN_DIR)/lib/libatomic.a)" \ + "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(wildcard $(TOOLCHAIN_DIR)/lib/libatomic*.so))" \ + $(BUILD_LIBGCC) \ + -Wl,-soname=libatomic.so.0 + $(SCRIPT_DIR)/relink-lib.sh \ + "$(TARGET_CROSS)" \ "$(wildcard $(TOOLCHAIN_DIR)/lib/libm-*.so)" \ "$(wildcard $(TOOLCHAIN_DIR)/lib/libm_pic.a)" \ "$(patsubst $(TOOLCHAIN_DIR)/lib/%,$(PKG_BUILD_DIR)/%,$(wildcard $(TOOLCHAIN_DIR)/lib/libm-*.so))" \ @@ -367,6 +399,11 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(if $(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libgcc_s.so.* $(1)/lib/) endef + define Package/libatomic/install + $(INSTALL_DIR) $(1)/lib + $(if $(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libatomic.so.* $(1)/lib/) + endef + define Package/libgfortran/install $(INSTALL_DIR) $(1)/usr/lib $(if $(CONFIG_TARGET_avr32)$(CONFIG_TARGET_coldfire),,$(CP) $(TOOLCHAIN_DIR)/lib/libgfortran.so.* $(1)/usr/lib/) @@ -414,7 +451,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(TOOLCHAIN_DIR)/lib/libc.so.* \ $(TOOLCHAIN_DIR)/lib/libuClibc-$(LIBC_SO_VERSION).so \ $(1)/lib/ - for file in libcrypt libdl libm libutil; do \ + for file in libatomic libcrypt libdl libm libutil; do \ $(CP) \ $(TOOLCHAIN_DIR)/lib/$$$$file.so.* \ $(TOOLCHAIN_DIR)/lib/$$$$file-$(LIBC_SO_VERSION).so \ @@ -588,6 +625,7 @@ endif $(eval $(call BuildPackage,libc)) $(eval $(call BuildPackage,libgcc)) +$(eval $(call BuildPackage,libatomic)) $(eval $(call BuildPackage,libssp)) $(eval $(call BuildPackage,libstdcpp)) $(eval $(call BuildPackage,libpthread)) |