svn commit: r434801 - in head/emulators/unicorn: . files
Antoine Brodin
antoine at FreeBSD.org
Sat Feb 25 13:09:57 UTC 2017
Author: antoine
Date: Sat Feb 25 13:09:55 2017
New Revision: 434801
URL: https://svnweb.freebsd.org/changeset/ports/434801
Log:
Update to 1.0
Modified:
head/emulators/unicorn/Makefile
head/emulators/unicorn/distinfo
head/emulators/unicorn/files/patch-Makefile
head/emulators/unicorn/files/patch-qemu_configure
head/emulators/unicorn/files/patch-tests_unit_Makefile
head/emulators/unicorn/pkg-plist
Modified: head/emulators/unicorn/Makefile
==============================================================================
--- head/emulators/unicorn/Makefile Sat Feb 25 13:02:27 2017 (r434800)
+++ head/emulators/unicorn/Makefile Sat Feb 25 13:09:55 2017 (r434801)
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= unicorn
-PORTVERSION= 0.9
+PORTVERSION= 1.0
CATEGORIES= emulators
MAINTAINER= antoine at FreeBSD.org
@@ -15,15 +15,18 @@ TEST_DEPENDS= cmocka>0:sysutils/cmocka
USE_GITHUB= yes
GH_ACCOUNT= unicorn-engine
-USES= gmake pkgconfig python:2.7,build
-USE_GNOME= glib20
+USES= gmake python:2.7,build
USE_LDCONFIG= yes
MAKE_ENV= INSTALL_LIB="${INSTALL_LIB}" \
UNICORN_QEMU_FLAGS=--python=${PYTHON_CMD} \
+ MAKE_JOBS_NUMBER=${MAKE_JOBS_NUMBER} \
V=1
TEST_TARGET= test
TEST_WRKSRC= ${WRKSRC}/tests/unit
-
-BROKEN_aarch64= fails to compile: error: use of undeclared identifier tcg_op_defs
+_MAKE_JOBS= # MAKE_JOBS_NUMBER is passed via MAKE_ENV
+# Optimization breaks runtime,
+# see https://github.com/unicorn-engine/unicorn/issues/356
+# and https://github.com/unicorn-engine/unicorn/issues/689
+CFLAGS:= ${CFLAGS:C/-O[1-9]/-O0/g}
.include <bsd.port.mk>
Modified: head/emulators/unicorn/distinfo
==============================================================================
--- head/emulators/unicorn/distinfo Sat Feb 25 13:02:27 2017 (r434800)
+++ head/emulators/unicorn/distinfo Sat Feb 25 13:09:55 2017 (r434801)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1481841704
-SHA256 (unicorn-engine-unicorn-0.9_GH0.tar.gz) = 1ca03b1c8f6360335567b528210713461e839d47c4eb7c676ba3aa4f72b8cf10
-SIZE (unicorn-engine-unicorn-0.9_GH0.tar.gz) = 2576109
+TIMESTAMP = 1487917142
+SHA256 (unicorn-engine-unicorn-1.0_GH0.tar.gz) = 27efa24e465f3eca9a1fa8f7f456f6fecd91beeba0b4be21b34308040047def9
+SIZE (unicorn-engine-unicorn-1.0_GH0.tar.gz) = 3214697
Modified: head/emulators/unicorn/files/patch-Makefile
==============================================================================
--- head/emulators/unicorn/files/patch-Makefile Sat Feb 25 13:02:27 2017 (r434800)
+++ head/emulators/unicorn/files/patch-Makefile Sat Feb 25 13:09:55 2017 (r434801)
@@ -1,61 +1,32 @@
---- Makefile.orig 2015-10-15 16:22:04 UTC
+--- Makefile.orig 2017-02-23 12:57:14 UTC
+++ Makefile
-@@ -59,9 +59,9 @@ UNICORN_CFLAGS += -fPIC
- V ?= 0
+@@ -62,9 +62,9 @@ V ?= 0
+ MACOS_UNIVERSAL ?= yes
ifeq ($(UNICORN_DEBUG),yes)
--CFLAGS += -O3
-+#CFLAGS += -O3
- else
-CFLAGS += -g
+#CFLAGS += -g
+ else
+-CFLAGS += -O3
++#CFLAGS += -O3
+ UNICORN_QEMU_FLAGS += --disable-debug-info
endif
- ifeq ($(CROSS),)
-@@ -158,7 +158,7 @@ LIBDIRARCH ?= lib
+@@ -171,7 +171,7 @@ LIBDIRARCH ?= lib
# Or better, pass 'LIBDIRARCH=lib64' to 'make install/uninstall' via 'make.sh'.
#LIBDIRARCH ?= lib64
--LIBDIR ?= $(DESTDIR)$(PREFIX)/$(LIBDIRARCH)
-+LIBDIR = $(DESTDIR)$(PREFIX)/$(LIBDIRARCH)
- INCDIR ?= $(DESTDIR)$(PREFIX)/include
-
- LIBDATADIR ?= $(LIBDIR)
-@@ -181,7 +181,7 @@ else
- PKGCFGDIR ?= $(LIBDATADIR)/pkgconfig
- endif
-
--all: compile_lib
-+all: compile_lib $(PKGCFGF)
- ifeq (,$(findstring yes,$(UNICORN_BUILD_CORE_ONLY)))
- ifeq ($(UNICORN_SHARED),yes)
- ifeq ($(V),0)
-@@ -213,9 +213,8 @@ else
- endif
-
- compile_lib: config qemu/config-host.h-timestamp
-- rm -rf lib$(LIBNAME)* $(LIBNAME)*.lib $(LIBNAME)*.dll && cd qemu && $(MAKE) -j 8
-+ cd qemu && $(MAKE)
- $(MAKE) unicorn
-- cd samples && $(MAKE) clean
+-LIBDIR ?= $(PREFIX)/$(LIBDIRARCH)
++LIBDIR = $(PREFIX)/$(LIBDIRARCH)
+ INCDIR ?= $(PREFIX)/include
+ BINDIR ?= $(PREFIX)/bin
+
+@@ -204,7 +204,7 @@ qemu/config-host.h-timestamp:
+ cd qemu && \
+ ./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
+ printf "$(UNICORN_ARCHS)" > config.log
+- $(MAKE) -C qemu -j 4
++ $(MAKE) -C qemu -j $(MAKE_JOBS_NUMBER)
+ $(eval UC_TARGET_OBJ += $$(wildcard qemu/util/*.o) $$(wildcard qemu/*.o) $$(wildcard qemu/qom/*.o) $$(wildcard qemu/hw/core/*.o) $$(wildcard qemu/qapi/*.o) $$(wildcard qemu/qobject/*.o))
unicorn: $(LIBRARY) $(ARCHIVE)
-
-@@ -225,7 +224,7 @@ ifeq ($(V),0)
- $(call log,GEN,$(LIBRARY))
- @$(CC) $(CFLAGS) -shared $^ -o $(LIBRARY) $(GLIB) -lm
- else
-- $(CC) $(CFLAGS) -shared $^ -o $(LIBRARY) $(GLIB) -lm
-+ $(CC) $(CFLAGS) -shared -Wl,-soname,libunicorn.so $^ -o $(LIBRARY) $(GLIB) -lm
- endif
- endif
-
-@@ -254,7 +253,7 @@ test: all
- $(MAKE) -C tests/unit test
-
-
--install: all $(PKGCFGF)
-+install: all
- mkdir -p $(LIBDIR)
- ifeq ($(UNICORN_SHARED),yes)
- $(INSTALL_LIB) $(LIBRARY) $(LIBDIR)
Modified: head/emulators/unicorn/files/patch-qemu_configure
==============================================================================
--- head/emulators/unicorn/files/patch-qemu_configure Sat Feb 25 13:02:27 2017 (r434800)
+++ head/emulators/unicorn/files/patch-qemu_configure Sat Feb 25 13:09:55 2017 (r434801)
@@ -1,6 +1,6 @@
---- qemu/configure.orig 2015-10-15 16:22:04 UTC
+--- qemu/configure.orig 2017-02-23 12:57:14 UTC
+++ qemu/configure
-@@ -285,11 +285,11 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredun
+@@ -229,11 +229,11 @@ QEMU_CFLAGS="-Wstrict-prototypes -Wredun
QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include"
if test "$debug_info" = "yes"; then
Modified: head/emulators/unicorn/files/patch-tests_unit_Makefile
==============================================================================
--- head/emulators/unicorn/files/patch-tests_unit_Makefile Sat Feb 25 13:02:27 2017 (r434800)
+++ head/emulators/unicorn/files/patch-tests_unit_Makefile Sat Feb 25 13:09:55 2017 (r434801)
@@ -1,22 +1,10 @@
---- tests/unit/Makefile.orig 2015-10-15 16:22:04 UTC
+--- tests/unit/Makefile.orig 2017-02-23 12:57:14 UTC
+++ tests/unit/Makefile
-@@ -1,8 +1,8 @@
-
+@@ -1,6 +1,6 @@
CFLAGS += -Wall -Werror -Wno-unused-function -g
--CFLAGS += -L ../../
-+CFLAGS += -L ../../ -L $(PREFIX)/lib
- CFLAGS += -lcmocka -lunicorn
--CFLAGS += -I ../../include
-+CFLAGS += -I ../../include -I $(PREFIX)/include
-
- ALL_TESTS = test_sanity test_x86 test_mem_map
-
-@@ -25,7 +25,7 @@ test_x86: test_x86.c
- test_mem_map: test_mem_map.c
-
- ${ALL_TESTS}:
-- gcc ${CFLAGS} -o $@ $^
-+ $(CC) ${CFLAGS} -o $@ $^
-
-
+ CFLAGS += -L ../../ -I ../../include
+-CFLAGS += -L ../../cmocka/src -I ../../cmocka/include
++CFLAGS += -L $(PREFIX)/lib -I $(PREFIX)/include
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S), Linux)
Modified: head/emulators/unicorn/pkg-plist
==============================================================================
--- head/emulators/unicorn/pkg-plist Sat Feb 25 13:02:27 2017 (r434800)
+++ head/emulators/unicorn/pkg-plist Sat Feb 25 13:09:55 2017 (r434801)
@@ -2,11 +2,10 @@ include/unicorn/arm.h
include/unicorn/arm64.h
include/unicorn/m68k.h
include/unicorn/mips.h
-include/unicorn/platform.h
include/unicorn/sparc.h
include/unicorn/unicorn.h
include/unicorn/x86.h
lib/libunicorn.a
lib/libunicorn.so
-lib/libunicorn.so.0
+lib/libunicorn.so.1
libdata/pkgconfig/unicorn.pc
More information about the svn-ports-head
mailing list