diff options
author | Eric Anholt <eric@anholt.net> | 2008-06-24 14:08:08 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-06-24 14:08:08 -0700 |
commit | f6abe8f0f2fba3073b58b96ed38aae163c765b4a (patch) | |
tree | 706ba29d021fb1e4c54500e8773e3dda5f9ff6e8 /bin | |
parent | a42dac187973cbc17be6c59db89264cbc935ab91 (diff) | |
parent | 5174b85a0cb13b06779ea6fc0a8362c9fe57e2ea (diff) |
Merge commit 'origin/master' into drm-gem
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/minstall | 3 | ||||
-rwxr-xr-x | bin/mklib | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/bin/minstall b/bin/minstall index 819b2bc7e4..8ee96089fa 100755 --- a/bin/minstall +++ b/bin/minstall @@ -42,6 +42,8 @@ if [ $# -ge 2 ] ; then exit 0 fi + PWDSAVE=`pwd` + # determine file's type if [ -h "$FILE" ] ; then #echo $FILE is a symlink @@ -57,7 +59,6 @@ if [ $# -ge 2 ] ; then FILE=`basename "$FILE"` # Go to $DEST and make the link - PWDSAVE="$PWD" cd "$DEST" # pushd $RM "$FILE" $SYMLINK "$TARGET" "$FILE" @@ -61,7 +61,8 @@ do echo ' -minor N specifies minor version number (default is 0)' echo ' -patch N specifies patch version number (default is 0)' echo ' -lLIBRARY specifies a dependency on LIBRARY' - echo ' -LDIR search in DIR for library dependencies' + echo ' -LDIR search in DIR for library dependencies at build time' + echo ' -RDIR search in DIR for library dependencies at run time' echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)' echo ' Not observed on all systems at this time.' echo ' -ldflags OPT specify any additional linker flags in OPT' @@ -107,6 +108,9 @@ do -L*) DEPS="$DEPS $1" ;; + -R*) + DEPS="$DEPS $1" + ;; -Wl*) DEPS="$DEPS $1" ;; @@ -336,7 +340,7 @@ case $ARCH in # use g++ LINK="g++" else - echo "mklib: warning: can't find C++ comiler, trying CC." + echo "mklib: warning: can't find C++ compiler, trying CC." LINK="CC" fi else @@ -365,9 +369,11 @@ case $ARCH in # Check if objects are SPARC v9 # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1 set ${OBJECTS} - SPARCV9=`file $1 | grep SPARCV9` - if [ "${SPARCV9}" ] ; then - OPTS="${OPTS} -xarch=v9" + if [ ${LINK} = "cc" -o ${LINK} = "CC" ] ; then + SPARCV9=`file $1 | grep SPARCV9` + if [ "${SPARCV9}" ] ; then + OPTS="${OPTS} -xarch=v9" + fi fi if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} @@ -379,7 +385,7 @@ case $ARCH in ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} else rm -f ${LIBNAME}.${MAJOR} ${LIBNAME} - ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} + ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS} ln -s ${LIBNAME}.${MAJOR} ${LIBNAME} fi FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}" |