void-packages/srcpkgs/river/patches/0001-Enable-PIE-for-river-riverctl-rivertile.patch
2021-11-13 11:46:21 -03:00

42 lines
1.5 KiB
Diff

From 759c1c7a915083f3da46960ff82fa2a3566a7065 Mon Sep 17 00:00:00 2001
From: Isaac Freund <mail@isaacfreund.com>
Date: Wed, 3 Nov 2021 14:21:35 +0100
Subject: [PATCH] Enable PIE for river, riverctl, rivertile
There is sadly not yet a standard way to do this exposed by the zig
build system. See: https://github.com/ziglang/zig/issues/7201
---
build.zig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/build.zig b/build.zig
index d561f49..8ac9a4e 100644
--- a/build.zig
+++ b/build.zig
@@ -85,6 +85,7 @@ pub fn build(b: *zbs.Builder) !void {
const river = b.addExecutable("river", "river/main.zig");
river.setTarget(target);
river.setBuildMode(mode);
+ river.pie = true;
river.addBuildOption(bool, "xwayland", xwayland);
river.addBuildOption([:0]const u8, "version", full_version);
@@ -97,6 +98,7 @@ pub fn build(b: *zbs.Builder) !void {
const riverctl = b.addExecutable("riverctl", "riverctl/main.zig");
riverctl.setTarget(target);
riverctl.setBuildMode(mode);
+ riverctl.pie = true;
riverctl.addBuildOption([:0]const u8, "version", full_version);
riverctl.step.dependOn(&scanner.step);
@@ -114,6 +116,7 @@ pub fn build(b: *zbs.Builder) !void {
const rivertile = b.addExecutable("rivertile", "rivertile/main.zig");
rivertile.setTarget(target);
rivertile.setBuildMode(mode);
+ rivertile.pie = true;
rivertile.addBuildOption([:0]const u8, "version", full_version);
rivertile.step.dependOn(&scanner.step);
--
2.33.1