fix C++ link issues on IRIX
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 28 Jan 2004 22:54:33 +0000 (22:54 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 28 Jan 2004 22:54:33 +0000 (22:54 +0000)
bin/mklib

index 694a60bd17228bc632ce2e0bbd2a3cf31a41ad67..317abc06957bcf064a8f70eeab96665336117bd8 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -238,7 +238,12 @@ case $ARCH in
            OPTS="-n32 -shared -all"
            echo "mklib: Making IRIX n32-bit shared library: " ${LIBNAME}
        fi
-       ld ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+       if [ $CPLUSPLUS = 1 ] ; then
+           LINK="CC"
+       else
+           LINK="ld"
+       fi
+       ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
        FINAL_LIBS="${LIBNAME}"
        ;;
 
@@ -247,7 +252,12 @@ case $ARCH in
        echo "mklib: Making IRIX64 library: " ${LIBNAME}
        # 64-bit ABI
        OPTS="-64 -shared -all"
-       ld ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+       if [ $CPLUSPLUS = 1 ] ; then
+           LINK="CC"
+       else
+           LINK="ld"
+       fi
+       ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
        FINAL_LIBS="${LIBNAME}"
        ;;