From 9de09376b60c390408bf5219152812de9908e148 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Tue, 26 Jul 2022 17:23:19 -0600
Subject: [PATCH] Add i686 cargo config and pkg config

---
 .cargo/config                     | 4 ++++
 bin/i686-unknown-redox-pkg-config | 7 +++++++
 2 files changed, 11 insertions(+)
 create mode 100755 bin/i686-unknown-redox-pkg-config

diff --git a/.cargo/config b/.cargo/config
index 69c4db47d..424d66065 100644
--- a/.cargo/config
+++ b/.cargo/config
@@ -2,6 +2,10 @@
 linker = "aarch64-unknown-redox-gcc"
 rustflags = []
 
+[target.i686-unknown-redox]
+linker = "i686-unknown-redox-gcc"
+rustflags = []
+
 [target.x86_64-unknown-redox]
 linker = "x86_64-unknown-redox-gcc"
 rustflags = []
diff --git a/bin/i686-unknown-redox-pkg-config b/bin/i686-unknown-redox-pkg-config
new file mode 100755
index 000000000..c1eb83233
--- /dev/null
+++ b/bin/i686-unknown-redox-pkg-config
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot"
+export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
+export PKG_CONFIG_PATH="${PKG_CONFIG_SYSROOT_DIR}/share/pkgconfig"
+
+exec pkg-config --static "$@"
-- 
GitLab