[MPlayer-dev-eng] -z is not a portable linker option

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon May 30 11:14:56 CEST 2005


Hi,
On Thu, Apr 21, 2005 at 07:49:41PM +0200, Reimar D?ffinger wrote:
> On Wed, Apr 20, 2005 at 11:53:39PM -0400, Rich Felker wrote:
> > I've reversed it for now. It should be detected by configure if this
> > nonsense is needed for anything, but I don't understand why it should
> > be needed anyway...
> 
> More like nice-to-have esp. together with SELinux. Any comments on the
> attached patch? It makes gcc spit out a lot of warnings during
> compiling, so probably not quite perfect yet :-(

The attached patch should work. If nobody objects I will apply tomorrow.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1010
diff -u -r1.1010 configure
--- configure	30 May 2005 08:23:19 -0000	1.1010
+++ configure	30 May 2005 09:08:50 -0000
@@ -6728,6 +6735,17 @@
   echores "only used for x86"
 fi
 
+echocheck "compiler support for noexecstack"
+cat > $TMPC <<EOF
+int main(void) { return 0; }
+EOF
+if cc_check -Wl,-z,noexecstack ; then
+  _ld_extra="-Wl,-z,noexecstack $_ld_extra"
+  echores "yes"
+else
+  echores "no"
+fi
+
 echocheck "ftello()"
 # if we don't have ftello use the osdep/ compatibility module
 cat > $TMPC << EOF


More information about the MPlayer-dev-eng mailing list