From 2af0f16f1fdadf1e85493f8506d441df09199fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sat, 23 Oct 2010 13:18:24 +0200 Subject: mingw32-w64 port: '-no-undefined' part - use -no-undefined flag only for building shared libraries (libxine, plugins) - plugins LDFLAGS unification - move -no-undefined into LDFLAGS_NOUNDEFINED - attributes.m4 fix --- m4/attributes.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'm4') diff --git a/m4/attributes.m4 b/m4/attributes.m4 index c7ef73e68..4f0442865 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -109,14 +109,21 @@ AC_DEFUN([CC_NOUNDEFINED], [ dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads dnl are requested, as different implementations are present; to avoid problems dnl use -Wl,-z,defs only for those platform not behaving this way. + dnl + dnl MinGW platforms: for libraries required -no-undefined, + dnl use it only for libraries in mingw32-w64 + *-freebsd* | *-openbsd*) ;; + *-mingw*) + LDFLAGS_NOUNDEFINED="-no-undefined" + ;; *) dnl First of all check for the --no-undefined variant of GNU ld. This allows dnl for a much more readable commandline, so that people can understand what dnl it does without going to look for what the heck -z defs does. for possible_flags in "-Wl,--no-undefined" "-Wl,-z,defs"; do CC_CHECK_LDFLAGS([$possible_flags], [LDFLAGS_NOUNDEFINED="$possible_flags"]) - break + if test "x$LDFLAGS_NOUNDEFINED" = "x"; then break; fi done ;; esac -- cgit v1.2.3