Linux hints: add some missing $ccflags
authorBrian Fraser <fraserbn@gmail.com>
Wed, 22 Jan 2014 20:17:33 +0000 (17:17 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sun, 26 Jan 2014 17:44:18 +0000 (14:44 -0300)
hints/linux.sh

index c0e85f7..ed05b46 100644 (file)
@@ -177,7 +177,7 @@ else
 fi
 
 case "$plibpth" in
-'') plibpth=`LANG=C LC_ALL=C $gcc -print-search-dirs | grep libraries |
+'') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
        cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
     set X $plibpth # Collapse all entries on one line
     shift
@@ -205,7 +205,7 @@ main() {
        exit(0); /* succeed (yes, it's ELF) */
 }
 EOM
-if ${cc:-gcc} try.c >/dev/null 2>&1 && $run ./a.out; then
+if ${cc:-gcc} $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
     cat <<'EOM' >&4
 
 You appear to have ELF support.  I'll try to use it for dynamic loading.