mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 04:10:09 +01:00
Cygwin build fixes
Fix mklib to deal with NOPREFIX and use --enable-auto-image-base for cygwin Teach configure.ac some basic facts about cygwin Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
304ba4bba4
commit
7eed6ab5b5
2 changed files with 21 additions and 3 deletions
19
bin/mklib
19
bin/mklib
|
|
@ -885,6 +885,17 @@ case $ARCH in
|
|||
|
||||
CYGWIN*)
|
||||
# GCC-based environment
|
||||
if [ $NOPREFIX = 1 ] ; then
|
||||
# No "lib" or ".so" part
|
||||
echo "mklib: Making CYGWIN shared library: " ${LIBNAME}
|
||||
OPTS="-shared -Wl,--enable-auto-image-base"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
rm -f ${LIBNAME}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
else
|
||||
CYGNAME="cyg${LIBNAME}" # prefix with "cyg"
|
||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||
|
||||
|
|
@ -901,11 +912,11 @@ case $ARCH in
|
|||
# finish up
|
||||
FINAL_LIBS=${LIBNAME}.a
|
||||
else
|
||||
OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
|
||||
OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
fi
|
||||
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll
|
||||
echo "mklib: Making" $ARCH "shared library: " ${CYGNAME}-${MAJOR}.dll
|
||||
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK="g++"
|
||||
|
|
@ -914,7 +925,8 @@ case $ARCH in
|
|||
fi
|
||||
|
||||
# rm any old libs
|
||||
rm -f ${LIBNAME}-${MAJOR}.dll
|
||||
rm -f ${CYGNAME}-${MAJOR}.dll
|
||||
rm -f ${LIBNAME}-${MAJOR}.dll.a
|
||||
rm -f ${LIBNAME}.dll.a
|
||||
rm -f ${LIBNAME}.a
|
||||
|
||||
|
|
@ -927,6 +939,7 @@ case $ARCH in
|
|||
# special case for installing in bin
|
||||
FINAL_BINS="${CYGNAME}-${MAJOR}.dll"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
'example')
|
||||
|
|
|
|||
|
|
@ -222,6 +222,8 @@ else
|
|||
case "$host_os" in
|
||||
darwin* )
|
||||
LIB_EXTENSION='dylib' ;;
|
||||
cygwin* )
|
||||
LIB_EXTENSION='dll' ;;
|
||||
* )
|
||||
LIB_EXTENSION='so' ;;
|
||||
esac
|
||||
|
|
@ -1073,6 +1075,9 @@ if test "x$APP_LIB_DEPS" = x; then
|
|||
solaris*)
|
||||
APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm"
|
||||
;;
|
||||
cygwin*)
|
||||
APP_LIB_DEPS="-lX11"
|
||||
;;
|
||||
*)
|
||||
APP_LIB_DEPS="-lm"
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue