ladybird/Ports/zig/patches/0015-build-Remove-unsupported-zig-linker-flag-z-seperate-.patch
sin-ack 752d9d7c03 Ports: Bump Zig version to 0.11.0-dev.4003+c6aa29b6f
This commit fixes the build for LLVM 16 now that the toolchain has been
updated, and updates us to the latest available Zig commit.

The main patch changes are making more symbols available (and exposing
them through std.c.serenity) and working around new Zig build
requirements.

Co-Authored-By: Andre Herbst <moormaster@gmx.net>
2023-07-17 22:52:08 +01:00

21 lines
977 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andre Herbst <moormaster@gmx.net>
Date: Sun, 9 Jul 2023 01:24:04 +0200
Subject: [PATCH] build: Remove unsupported zig linker flag -z seperate-code
---
build | 1 +
1 file changed, 1 insertion(+)
diff --git a/build b/build
index aae2f445209bbab53670a4809293e22e8a5091c0..31754a58c596a80bcb302b98faae15c88ebe798b 100755
--- a/build
+++ b/build
@@ -190,6 +190,7 @@ cmake "$ROOTDIR/llvm" \
-DCMAKE_SYSTEM_NAME="$TARGET_OS_CMAKE" \
-DCMAKE_C_COMPILER="$ZIG;cc;-fno-sanitize=all;-s;-target;$TARGET;-mcpu=$MCPU" \
-DCMAKE_CXX_COMPILER="$ZIG;c++;-fno-sanitize=all;-s;-target;$TARGET;-mcpu=$MCPU" \
+ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--hash-style=gnu,-z,relro,-z,now,-z,noexecstack,-z,max-page-size=0x1000" \
-DCMAKE_ASM_COMPILER="$ZIG;cc;-fno-sanitize=all;-s;-target;$TARGET;-mcpu=$MCPU" \
-DCMAKE_RC_COMPILER="$ROOTDIR/out/host/bin/llvm-rc" \
-DCMAKE_AR="$ROOTDIR/out/host/bin/llvm-ar" \