From b07fe4bf2be1236b3ed2f3cd928c06a3b80cd577 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 30 Aug 2020 15:25:46 +0100 Subject: [PATCH] chore(native_comp): add GNU-based tools to PATH in patched GCC helper script An attempt at resolving #8 by getting the GCC compilation step to have GNU-based `sed` and other commands available. At the very least, I'm assuming this won't break things. Fingers crossed. --- install-patched-gcc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install-patched-gcc b/install-patched-gcc index ac8c2cb..e4291a9 100755 --- a/install-patched-gcc +++ b/install-patched-gcc @@ -9,6 +9,18 @@ if [ ! -f "$formula" ]; then exit 1 fi +gnubins=( + "${brewdir}/opt/coreutils/libexec/gnubin" + "${brewdir}/opt/make/libexec/gnubin" + "${brewdir}/opt/gnu-sed/libexec/gnubin" +) + +for gnubin in "${gnubins[@]}"; do + if [ -d "$gnubin" ]; then + export PATH="${gnubin}:$PATH" + fi +done + cp "$formula" ./Formula/ patch -f -p1 -i ./Formula/gcc.rb.patch