~ubuntu-branches/ubuntu/jaunty/mesa/jaunty-proposed

« back to all changes in this revision

Viewing changes to bin/mklib

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-04-03 12:42:06 UTC
  • mfrom: (1.3.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 70.
  • Revision ID: james.westby@ubuntu.com-20090403124206-vulvbgrn29zpeb2m
Tags: upstream-7.4
ImportĀ upstreamĀ versionĀ 7.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
                fi
395
395
            fi
396
396
 
 
397
            # If using Sun C++ compiler, need to tell it not to add runpaths
 
398
            # that are specific to the build machine
 
399
            if [ ${LINK} = "CC" ] ; then
 
400
                OPTS="${OPTS} -norunpath"
 
401
            fi
 
402
 
 
403
            # Solaris linker requires explicitly listing the Standard C & C++
 
404
            # libraries in the link path when building shared objects
 
405
            if [ ${LINK} = "CC" ] ; then
 
406
                DEPS="${DEPS} -lCrun"
 
407
            fi
 
408
            DEPS="${DEPS} -lc"
 
409
 
 
410
            if [ $EXPORTS ] ; then
 
411
                # Make the 'mapfile.scope' linker mapfile
 
412
                echo "{" > mapfile.scope
 
413
                echo "global:" >> mapfile.scope
 
414
                sed 's/$/;/' ${EXPORTS} >> mapfile.scope
 
415
                echo "local:" >> mapfile.scope
 
416
                echo "    *;" >> mapfile.scope
 
417
                echo "};" >> mapfile.scope
 
418
                OPTS="${OPTS} -Wl,-Mmapfile.scope"
 
419
            fi
 
420
 
397
421
            # Check if objects are SPARC v9
398
422
            # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
399
423
            set ${OBJECTS}
406
430
            if [ "${ALTOPTS}" ] ; then
407
431
                OPTS=${ALTOPTS}
408
432
            fi
 
433
 
409
434
            # for debug:
410
435
            #echo "mklib: linker is" ${LINK} ${OPTS}
411
436
            if [ $NOPREFIX = 1 ] ; then
412
437
                rm -f ${LIBNAME}
413
438
                ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
 
439
                FINAL_LIBS="${LIBNAME}"
414
440
            else
415
441
                rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
416
442
                ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
417
443
                ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
 
444
                FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
418
445
            fi
419
 
            FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
420
446
        fi
421
447
        ;;
422
448