From 11d36e9cf9c22f592bc277b03483d1b2ed571073 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 14 Oct 2016 04:42:22 -0400 Subject: [PATCH] Simplify -fPIC tests --- cryptest.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cryptest.sh b/cryptest.sh index c708e08f..e48c8a13 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -475,8 +475,9 @@ fi # Cygwin and noisy compiles rm -f "$TMP/adhoc.exe" > /dev/null 2>&1 if [[ (-z "$HAVE_PIC") ]]; then - HAVE_PIC=$("$CXX" -DCRYPTOPP_ADHOC_MAIN -fPIC adhoc.cpp -o "$TMP/adhoc.exe" 2>&1 | grep -c 'warning') - if [[ "$HAVE_PIC" -ne "0" ]]; then + HAVE_PIC=0 + PIC_PROBLEMS=$("$CXX" -DCRYPTOPP_ADHOC_MAIN -fPIC adhoc.cpp -o "$TMP/adhoc.exe" 2>&1 | "$EGREP" -ic '(warning|error)') + if [[ "$PIC_PROBLEMS" -eq "0" ]]; then HAVE_PIC=1 fi fi