diff options
author | Jon TURNEY <[email protected]> | 2010-08-27 22:52:41 +0100 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-09-01 08:48:11 -0600 |
commit | c085cd6917310ab35325f84311258905b5ded66b (patch) | |
tree | 7c10b19310cec552dac3052219dc8f03b5d56443 | |
parent | c55a8a73a483305c7c9a7bcc7191dd7c833f873d (diff) |
Cygwin: Adjust mklib so -linker and -cplusplus options are processed more like they are for linux
It looks like we were ignoring -linker when -noprefix wasn't present, and
when -noprefix was present, -linker was mandatory and -cplusplus ignored.
Signed-off-by: Jon TURNEY <[email protected]>
Signed-off-by: Brian Paul <[email protected]>
-rwxr-xr-x | bin/mklib | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/mklib b/bin/mklib index bc554c15637..2f9223ff3c1 100755 --- a/bin/mklib +++ b/bin/mklib @@ -930,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} @@ -966,12 +976,6 @@ case $ARCH in fi echo "mklib: Making CYGWIN shared library: " ${CYGNAME}-${MAJOR}.dll - if [ $CPLUSPLUS = 1 ] ; then - LINK="g++" - else - LINK="gcc" - fi - # rm any old libs rm -f ${CYGNAME}-${MAJOR}.dll rm -f ${LIBNAME}-${MAJOR}.dll.a |