$OpenBSD: patch-src_Makefile,v 1.3 2019/11/05 20:42:34 cwen Exp $

Hunk#1: -Bsymbolic-functions is not supported by ld.bfd
Hunk#2: Fix error: Cannot use '/usr/local/bin/python3.6', Python 2.4 or
        later is required.

Index: src/Makefile
--- src/Makefile.orig
+++ src/Makefile
@@ -141,7 +141,11 @@ else
 EXT = so
 VERSION_EXT = $(EXT).$(API_MAJOR)
 AR_EXT = a
+ifeq ($(LD_IS_LLD),1)
 $(LIBNAME)_LDFLAGS += -Wl,-Bsymbolic-functions,-soname,lib$(LIBNAME).$(VERSION_EXT)
+else
+$(LIBNAME)_LDFLAGS += -Wl,-soname,lib$(LIBNAME).$(VERSION_EXT)
+endif
 UNICORN_CFLAGS += -fvisibility=hidden
 endif
 
@@ -212,7 +216,7 @@ all: unicorn
 
 qemu/config-host.h-timestamp:
 	cd qemu && \
-	./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
+	./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS} --python=${LOCALBASE}/bin/python2
 	printf "$(UNICORN_ARCHS)" > config.log
 	$(MAKE) -C qemu $(SMP_MFLAGS)
 	$(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))
