From 9aaeb4623d3ff5746e665bc17914eefd292b7dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C3=BChling?= Date: Sun, 2 Jan 2011 15:19:00 +0100 Subject: New OpenWrt package for GNU Octave. Experimental/probably still broken. Work in progress. Committing it as compilation seems to take forever. Not sure whether I can finish this within a few days. --- libgc/Makefile | 68 ++++++++++++++++++++++++++++++++++++++++++ libgc/patches/001-os_dep.patch | 19 ++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 libgc/Makefile create mode 100644 libgc/patches/001-os_dep.patch (limited to 'libgc') diff --git a/libgc/Makefile b/libgc/Makefile new file mode 100644 index 0000000..8f96b4f --- /dev/null +++ b/libgc/Makefile @@ -0,0 +1,68 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gc +PKG_VERSION:=7.2alpha4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/ +PKG_MD5SUM:=0a6785ebb61c6e2b50c3952c3bbf9ea1 + +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/gc + TITLE:=gc + SECTION:=libs + CATEGORY:=Libraries + URL:=http://www.hpl.hp.com/personal/Hans_Boehm/gc/ +endef + +define Package/gc/description + garbage collector can be used as a garbage collecting replacement for C malloc or C++ new +endef + +TARGET_CFLAGS+="-I./include" + +TARGET_LDFLAGS+=-lpthread + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-gcj-support \ + --disable-java-finalization \ + --disable-atomic-uncollectible \ + ) +endef + +define Build/InstallDev + $(INSTALL_DIR) \ + $(1)/usr/include \ + $(1)/usr/lib \ + $(1)/usr/lib/pkgconfig + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/* \ + $(1)/usr/lib/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/* \ + $(1)/usr/include/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/pkgconfig \ + $(1)/usr/lib/ +endef + +define Package/gc/install + $(INSTALL_DIR) \ + $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/lib{cord,gc}.so* \ + $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,gc)) diff --git a/libgc/patches/001-os_dep.patch b/libgc/patches/001-os_dep.patch new file mode 100644 index 0000000..42fc131 --- /dev/null +++ b/libgc/patches/001-os_dep.patch @@ -0,0 +1,19 @@ +--- gc-7.2alpha4.orig/os_dep.c 2010-09-25 17:47:19.651870610 +0400 ++++ gc-7.2alpha4/os_dep.c 2010-09-25 21:40:13.382745526 +0400 +@@ -1211,7 +1211,7 @@ + { + pthread_attr_t attr; + size_t size; +- ++/* + if (pthread_getattr_np(pthread_self(), &attr) != 0) { + WARN("pthread_getattr_np failed\n", 0); + return GC_UNIMPLEMENTED; +@@ -1219,6 +1219,7 @@ + if (pthread_attr_getstack(&attr, &(b -> mem_base), &size) != 0) { + ABORT("pthread_attr_getstack failed"); + } ++ */ + pthread_attr_destroy(&attr); + # ifdef STACK_GROWS_DOWN + b -> mem_base = (char *)(b -> mem_base) + size; -- cgit v1.2.3