diff options
author | marha <marha@users.sourceforge.net> | 2010-11-22 19:42:40 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-11-22 19:42:40 +0000 |
commit | 85ef9930f56bf15181f9a0b238f03d55303cf411 (patch) | |
tree | 63b43286956ebd1c35c96e9b3d5305aabdf71a0f /mesalib/bin | |
parent | 94810d19989336862251dbf69c3f3acb18a9b06d (diff) | |
download | vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.tar.gz vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.tar.bz2 vcxsrv-85ef9930f56bf15181f9a0b238f03d55303cf411.zip |
Updated to mesalib 7.9
Diffstat (limited to 'mesalib/bin')
-rw-r--r-- | mesalib/bin/minstall | 21 | ||||
-rw-r--r-- | mesalib/bin/mklib | 45 |
2 files changed, 46 insertions, 20 deletions
diff --git a/mesalib/bin/minstall b/mesalib/bin/minstall index 130025829..094ec0c2b 100644 --- a/mesalib/bin/minstall +++ b/mesalib/bin/minstall @@ -31,7 +31,7 @@ if [ $# -ge 2 ] ; then # Last cmd line arg is the dest dir for FILE in $@ ; do - DEST="$FILE" + DESTDIR="$FILE" done # Loop over args, moving them to DEST directory @@ -42,6 +42,25 @@ if [ $# -ge 2 ] ; then exit 0 fi + DEST=$DESTDIR + + # On CYGWIN, because DLLs are loaded by the native Win32 loader, + # they are installed in the executable path. Stub libraries used + # only for linking are installed in the library path + case `uname` in + CYGWIN*) + case $FILE in + *.dll) + DEST="$DEST/../bin" + ;; + *) + ;; + esac + ;; + *) + ;; + esac + PWDSAVE=`pwd` # determine file's type diff --git a/mesalib/bin/mklib b/mesalib/bin/mklib index 08ef99ec1..2f9223ff3 100644 --- a/mesalib/bin/mklib +++ b/mesalib/bin/mklib @@ -494,13 +494,16 @@ case $ARCH in OPTS="${OPTS} -Wl,-Mmapfile.scope" fi - # Check if objects are SPARC v9 + # Check if objects are 64-bit # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1 set ${OBJECTS} if [ ${LINK} = "cc" -o ${LINK} = "CC" ] ; then - SPARCV9=`file $1 | grep SPARCV9` - if [ "${SPARCV9}" ] ; then - OPTS="${OPTS} -xarch=v9" + ABI64=`file $1 | grep "ELF 64-bit"` + if [ "${ABI64}" ] ; then + case `uname -p` in + sparc) OPTS="${OPTS} -xarch=v9" ;; + i386) OPTS="${OPTS} -xarch=amd64" ;; + esac fi fi if [ "${ALTOPTS}" ] ; then @@ -927,6 +930,16 @@ case $ARCH in CYGWIN*) # GCC-based environment + + if [ "x$LINK" = "x" ] ; then + # -linker was not specified so set default link command now + if [ $CPLUSPLUS = 1 ] ; then + LINK=g++ + else + LINK=gcc + fi + fi + if [ $NOPREFIX = 1 ] ; then # No "lib" or ".so" part echo "mklib: Making CYGWIN shared library: " ${LIBNAME} @@ -935,7 +948,7 @@ case $ARCH in OPTS=${ALTOPTS} fi rm -f ${LIBNAME} - ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} || exit $? FINAL_LIBS=${LIBNAME} else CYGNAME="cyg${LIBNAME}" # prefix with "cyg" @@ -943,7 +956,7 @@ case $ARCH in if [ $STATIC = 1 ] ; then LIBNAME=${LIBNAME}.a - echo "mklib: Making" $ARCH "static library: " ${LIBNAME} + echo "mklib: Making CYGWIN static library: " ${LIBNAME} OPTS="-ru" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} @@ -961,13 +974,7 @@ case $ARCH in if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - echo "mklib: Making" $ARCH "shared library: " ${CYGNAME}-${MAJOR}.dll - - if [ $CPLUSPLUS = 1 ] ; then - LINK="g++" - else - LINK="gcc" - fi + echo "mklib: Making CYGWIN shared library: " ${CYGNAME}-${MAJOR}.dll # rm any old libs rm -f ${CYGNAME}-${MAJOR}.dll @@ -976,12 +983,7 @@ case $ARCH in rm -f ${LIBNAME}.a # make lib - ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} - # make build fail if link failed - es=$? - if [ "$es" -ne "0" ]; then - exit $es - fi + ${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS} || exit $? # make usual symlinks ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a # finish up @@ -1021,4 +1023,9 @@ if [ ${INSTALLDIR} != "." ] ; then echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR} mv ${FINAL_LIBS} ${INSTALLDIR}/ + + if [ "x${FINAL_BINS}" != "x" ] ; then + echo "mklib: Installing" ${FINAL_BINS} "in" ${INSTALLDIR} + mv ${FINAL_BINS} ${INSTALLDIR}/ + fi fi |