[MPlayer-dev-eng] [PATCH] Fix usage of nm(1) with OpenBSD.
Brad
brad at comstyle.com
Wed Jun 1 03:23:13 CEST 2011
The following diff brings over a fix for nm(1) usage within
the configure script to only use the -P flag on Solaris.
The current usage of nm(1) breaks on OpenBSD which doesn't
support the -P flag. The fix was copied from FFmpeg.
Checking for extern symbol prefix ... nm: unknown option -- P
usage: nm [-aCegnoprsuw] [file ...]
Index: configure
===================================================================
--- configure (revision 33533)
+++ configure (working copy)
@@ -622,6 +622,7 @@
test "$CC" && _cc="$CC"
_as=auto
_nm=auto
+nm_opts="-g"
_yasm=yasm
_runtime_cpudetection=no
_cross_compile=auto
@@ -1588,6 +1589,10 @@
def_priority="#define CONFIG_PRIORITY 1"
fi
+if sunos ; then
+ nm_opts="-P -g"
+fi
+
for tmpdir in "$TMPDIR" "$TEMPDIR" "/tmp" ; do
test "$tmpdir" && break
done
@@ -2523,7 +2528,7 @@
int ff_extern;
EOF
cc_check -c || die "Symbol mangling check failed."
-sym=$($_nm -P -g $TMPEXE)
+sym=$($_nm $nm_opts $TMPEXE | awk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
extern_prefix=${sym%%ff_extern*}
def_extern_asm="#define EXTERN_ASM $extern_prefix"
def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MPlayer-dev-eng
mailing list