Simplify -fPIC tests

pull/326/head
Jeffrey Walton 2016-10-14 04:42:22 -04:00
parent 4b73230e36
commit 11d36e9cf9
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 3 additions and 2 deletions

View File

@ -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