diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-04-03 19:00:44 -0700 |
---|---|---|
committer | Florian Fainelli <f.fainelli@gmail.com> | 2017-05-11 13:42:55 -0700 |
commit | c258bc781feb41f66a0f2784547c1cc27aad1386 (patch) | |
tree | 8464ec4a8cca41a6088c28a7625b377ad70153aa /package/libs | |
parent | 83814856fe8efaeb8f88c14822c6dfacf23acb98 (diff) | |
download | upstream-c258bc781feb41f66a0f2784547c1cc27aad1386.tar.gz upstream-c258bc781feb41f66a0f2784547c1cc27aad1386.tar.bz2 upstream-c258bc781feb41f66a0f2784547c1cc27aad1386.zip |
toolchain: Package libgomp
Some external toolchains may be configured to enable OpenMP. Provide a
package for these libraries which can be used by other packages.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'package/libs')
-rw-r--r-- | package/libs/toolchain/Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index 0bf482402d..ce0acd19b2 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -275,6 +275,32 @@ define Package/libgfortran/config endmenu endef +define Package/libgomp +$(call Package/gcc/Default) + TITLE:=OpenMP support library +endef + +define Package/libgomp/config + menu "Configuration" + depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp + + config LIBGOMP_ROOT_DIR + string + prompt "libgomp shared library base directory" + depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp + default TOOLCHAIN_ROOT if !NATIVE_TOOLCHAIN + default "/" if NATIVE_TOOLCHAIN + + config LIBGOMP_FILE_SPEC + string + prompt "libgomp shared library files (use wildcards)" + depends on EXTERNAL_TOOLCHAIN && PACKAGE_libgomp + default "./lib/libgomp.so*" + + endmenu +endef + + define Package/ldd $(call Package/libc/Default) DEPENDS:=@!USE_MUSL @@ -561,6 +587,14 @@ else exit 0 endef + define Package/libgomp/install + for file in $(call qstrip,$(CONFIG_LIBGOMP_FILE_SPEC)); do \ + $(INSTALL_DIR) $(1)/lib ; \ + $(CP) $(call qstrip,$(CONFIG_LIBGOMP_ROOT_DIR))/$$$$file $(1)/lib/ ; \ + done ; \ + exit 0 + endef + define Package/ldd/install for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \ dir=`dirname $$$$file` ; \ @@ -590,5 +624,6 @@ $(eval $(call BuildPackage,libpthread)) $(eval $(call BuildPackage,libthread-db)) $(eval $(call BuildPackage,librt)) $(eval $(call BuildPackage,libgfortran)) +$(eval $(call BuildPackage,libgomp)) $(eval $(call BuildPackage,ldd)) $(eval $(call BuildPackage,ldconfig)) |