Merge pull request #1957 from tonytheodore/gc

Update gc to 7.6.0 (and add libatomic_ops because of it)
This commit is contained in:
Tony Theodore 2017-11-01 01:16:55 +11:00 committed by GitHub
commit 81d73c04b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 13 deletions

View File

@ -3,12 +3,12 @@
PKG := gc
$(PKG)_WEBSITE := http://www.hpl.hp.com/personal/Hans_Boehm/gc/
$(PKG)_IGNORE :=
$(PKG)_VERSION := 7.2e
$(PKG)_CHECKSUM := 09315b48a82d600371207691126ad058c04677281ac318d86fa84c98c3c9af4b
$(PKG)_SUBDIR := $(PKG)-7.2
$(PKG)_VERSION := 7.6.0
$(PKG)_CHECKSUM := a14a28b1129be90e55cd6f71127ffc5594e1091d5d54131528c24cd0c03b7d90
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://hboehm.info/$(PKG)/$(PKG)_source/$($(PKG)_FILE)
$(PKG)_DEPS := gcc
$(PKG)_DEPS := gcc libatomic_ops
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://hboehm.info/gc/gc_source/' | \
@ -20,15 +20,11 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--build="`config.guess`" \
--prefix='$(PREFIX)/$(TARGET)' \
--disable-shared \
# build and install the library
cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
$(MXE_CONFIGURE_OPTS) \
--enable-threads=win32 \
--enable-cplusplus
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef
$(PKG)_BUILD_SHARED =

35
src/libatomic_ops.mk Normal file
View File

@ -0,0 +1,35 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libatomic_ops
$(PKG)_WEBSITE := https://github.com/ivmai/libatomic_ops
$(PKG)_DESCR := The atomic_ops project (Atomic memory update operations portable implementation)
$(PKG)_IGNORE := 7.6%
$(PKG)_VERSION := 7.4.8
$(PKG)_CHECKSUM := b985816abc69df5781d6d9fcf081e03a3a1e44032030d0a2c28f8de731e7f20f
$(PKG)_GH_CONF := ivmai/libatomic_ops,v
$(PKG)_DEPS := gcc
define $(PKG)_BUILD
# build and install the library
cd '$(SOURCE_DIR)' && autoreconf -fi
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# create pkg-config file
# the *_gpl lib has extra functions needed for test program
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
(echo 'Name: atomic_ops_gpl'; \
echo 'Version: $($(PKG)_VERSION)'; \
echo 'Description: $($(PKG)_DESCR)'; \
echo 'Requires: atomic_ops'; \
echo 'Libs: -latomic_ops_gpl';) \
> '$(PREFIX)/$(TARGET)/lib/pkgconfig/atomic_ops_gpl.pc'
# compile test
'$(TARGET)-gcc' \
-W -Wall -Werror -pedantic \
'$(SOURCE_DIR)/tests/test_stack.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
`'$(TARGET)-pkg-config' atomic_ops_gpl --cflags --libs`
endef