a fix for when loading other hugepage modules
authorYanhua Sun <sun51@hopper10.(none)>
Mon, 5 Mar 2012 19:48:19 +0000 (11:48 -0800)
committerYanhua Sun <sun51@hopper10.(none)>
Mon, 5 Mar 2012 19:48:19 +0000 (11:48 -0800)
src/scripts/charmc

index ac548e9812779546614eb2610bdc316f18902958..6a66790261f957bae640b0b9235abfe74e56d9b7 100755 (executable)
@@ -808,9 +808,10 @@ if [ -n "$CHARMDEBUG" ]; then
        OPTS_CPP="$OPTS_CPP -O0 -g"
 fi
 
-if [ -n "$UGNI_CFLAGS" -a -z "$HUGETLB8M_POST_LINK_OPTS" ]
+if [ -z "$NATIVE" -a -n "$UGNI_CFLAGS" ]
 then
-       POST_LIBRARIES=`AddList $POST_LIBRARIES $CHARMLIB/cray_tlbhack.o`
+    linkopt=`env | grep  "HUGETLB[0-9]*[MKG]_POST_LINK_OPTS" 2> /dev/null`
+    test -n "$linkopt=" && POST_LIBRARIES=`AddList $POST_LIBRARIES $CHARMLIB/cray_tlbhack.o`
 fi
 
 PROCESSED_MODULES=""