ld.lld doesn't use as much memory as ld.bfd, so disable the
--no-keep-memory flag with the new PROPERTIES that sthen@ added. While here, port some patches from FreeBSD's ports tree to fix the build on aarch64 and armv7. OK ajacoutot@
This commit is contained in:
parent
04e0b146d2
commit
ffe9570788
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.63 2017/07/27 10:05:20 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.64 2017/09/09 19:25:29 phessler Exp $
|
||||
|
||||
# patches/patch-Source_JavaScriptCore_javascriptcoregtk_pc_in
|
||||
# patches/patch-Source_WebKit2_webkit2gtk-web-extension_pc_in
|
||||
@ -95,15 +95,20 @@ CONFIGURE_ARGS += -DUSE_GSTREAMER_MPEGTS=OFF
|
||||
CONFIGURE_ARGS += -DENABLE_PLUGIN_PROCESS_GTK2=OFF
|
||||
|
||||
# sync with Source/JavaScriptCore/assembler/MacroAssembler.h
|
||||
.if ${MACHINE_ARCH} != "amd64" && ${MACHINE_ARCH} != "arm" && \
|
||||
${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "mips64" && \
|
||||
${MACHINE_ARCH} != "mips64el" && ${MACHINE_ARCH} != "sh"
|
||||
.if ${MACHINE_ARCH} != "aarch64" && ${MACHINE_ARCH} != "amd64" && \
|
||||
${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "i386" && \
|
||||
${MACHINE_ARCH} != "mips64" && ${MACHINE_ARCH} != "mips64el" && \
|
||||
${MACHINE_ARCH} != "sh"
|
||||
# #error "The MacroAssembler is not supported on this platform."
|
||||
CONFIGURE_ARGS += -DENABLE_JIT=OFF
|
||||
CONFIGURE_ARGS += -DENABLE_LLINT_C_LOOP=ON
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} != "amd64"
|
||||
.include <bsd.port.arch.mk>
|
||||
|
||||
# ld.lld does not have this option
|
||||
# save memory on 32bit arches
|
||||
.if !${PROPERTIES:Mlld} && ${MACHINE_ARCH} != "amd64"
|
||||
LDFLAGS += -Wl,--no-keep-memory
|
||||
.endif
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-Source_JavaScriptCore_assembler_ARM64Assembler_h,v 1.1 2017/09/09 19:25:29 phessler Exp $
|
||||
|
||||
Index: Source/JavaScriptCore/assembler/ARM64Assembler.h
|
||||
--- Source/JavaScriptCore/assembler/ARM64Assembler.h.orig
|
||||
+++ Source/JavaScriptCore/assembler/ARM64Assembler.h
|
||||
@@ -2751,6 +2751,8 @@ class ARM64Assembler { (public)
|
||||
{
|
||||
#if OS(IOS)
|
||||
sys_cache_control(kCacheFunctionPrepareForExecution, code, size);
|
||||
+#elif OS(FREEBSD) || OS(NETBSD) || OS(OPENBSD)
|
||||
+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
|
||||
#elif OS(LINUX)
|
||||
size_t page = pageSize();
|
||||
uintptr_t current = reinterpret_cast<uintptr_t>(code);
|
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-Source_JavaScriptCore_assembler_ARMAssembler_h,v 1.1 2017/09/09 19:25:29 phessler Exp $
|
||||
|
||||
Index: Source/JavaScriptCore/assembler/ARMAssembler.h
|
||||
--- Source/JavaScriptCore/assembler/ARMAssembler.h.orig
|
||||
+++ Source/JavaScriptCore/assembler/ARMAssembler.h
|
||||
@@ -1155,6 +1155,8 @@ namespace JSC {
|
||||
linuxPageFlush(current, current + page);
|
||||
|
||||
linuxPageFlush(current, end);
|
||||
+#elif CPU(ARM_TRADITIONAL) && (OS(FREEBSD) || OS(OPENBSD))
|
||||
+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
|
||||
#else
|
||||
#error "The cacheFlush support is missing on this platform."
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user