ladybird/Ports/zig/patches/0015-build-Remove-unsupported-zig-linker-flag-z-seperate-.patch
Andre Herbst 14d8403a7b Ports/zig: Bump zig version to 0.12.0-dev.141+ddf5859c2
Fixes build error
```
error "It looks like you're trying to enable vendor availability
markup, but you haven't defined the corresponding macros yet!"
```
while trying to #include <__availability> header without having
the necessary preprocessor directive
`_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS` set
2023-09-29 00:58:17 +02:00

22 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 e7d809893e46e247a579050ac61091a78c6b90a5..bf53f9ecca8fc15b9a80bd3c13b7c551f77979df 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" \