From 806ab8b33237af064243fbb98836a0d93b699430 Mon Sep 17 00:00:00 2001 From: "Maxie D. Schmidt" Date: Wed, 2 Jun 2021 00:22:53 -0400 Subject: [PATCH] Fixing -no-lto options on MacOS --- build-scripts/pkg-config-flags.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-scripts/pkg-config-flags.sh b/build-scripts/pkg-config-flags.sh index d16b0b3..da0aeff 100755 --- a/build-scripts/pkg-config-flags.sh +++ b/build-scripts/pkg-config-flags.sh @@ -1,5 +1,12 @@ #!/bin/bash +GREP=$(which grep); +SED=$(which sed); +if [[ "$(uname -s)" == "Darwin" ]]; then + GREP=$(which ggrep); + SED=$(which gsed); +fi + PKGCONFIG=`which pkg-config` if [[ "$(uname -s)" == "Darwin" ]]; then export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/viennarna/lib/pkgconfig"; @@ -33,4 +40,6 @@ else PKGOUT+=" -DTARGETOS_GENERIC_UNIX" fi +PKGOUT=`echo $PKGOUT | $SED 's/-fno-lto//g' | $SED 's/-Wl,-fno-lto//g'` + echo $PKGOUT