configure: disable hardware capabilities ELF section with suncc on Solaris x86
authorSean McGovern <gseanmcg@gmail.com>
Sat, 17 Sep 2011 04:36:37 +0000 (00:36 -0400)
committerJanne Grunau <janne-libav@jannau.net>
Sat, 24 Sep 2011 12:47:49 +0000 (14:47 +0200)
When using suncc to build, the Solaris linker will mark
an executable with each instruction set encountered by
the Solaris assembler.  As our libraries contain their own
guards for processor-specific code, instead suppress
generation of the HWCAPS ELF section on Solaris x86 only.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
configure

index e01d9fd..8440cab 100755 (executable)
--- a/configure
+++ b/configure
@@ -2370,6 +2370,12 @@ case $target_os in
         enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
         network_extralibs="-lsocket -lnsl"
         add_cppflags -D__EXTENSIONS__
+        # When using suncc to build, the Solaris linker will mark
+        # an executable with each instruction set encountered by
+        # the Solaris assembler.  As our libraries contain their own
+        # guards for processor-specific code, instead suppress
+        # generation of the HWCAPS ELF section on Solaris x86 only.
+        enabled_all suncc x86 && echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile
         nm_opts='-P -g'
         ;;
     netbsd)