[MPlayer-cvslog] r29877 - in trunk: configure mangle.h

reimar subversion at mplayerhq.hu
Tue Nov 10 14:08:36 CET 2009


Author: reimar
Date: Tue Nov 10 14:08:36 2009
New Revision: 29877

Log:
Use configure code to define PIC instead of duplicating the check in mangle.h.
While it is currently not necessary, it might be a good idea to move this outside
the x86-only block in configure, as well as adding -pie to LDFLAGS.

Modified:
   trunk/configure
   trunk/mangle.h

Modified: trunk/configure
==============================================================================
--- trunk/configure	Tue Nov 10 12:51:22 2009	(r29876)
+++ trunk/configure	Tue Nov 10 14:08:36 2009	(r29877)
@@ -2580,14 +2580,13 @@ echocheck "PIC"
 pic=no
 cat > $TMPC << EOF
 int main(void) {
-// keep in sync with mangle.h and libavutil/internal.h
 #if !(defined(__PIC__) || defined(__pic__) || defined(PIC))
 #error PIC not enabled
 #endif
     return 0;
 }
 EOF
-cc_check && pic=yes
+cc_check && pic=yes && extra_cflags="$extra_cflags -DPIC"
 echores $pic
 
 echocheck "yasm"

Modified: trunk/mangle.h
==============================================================================
--- trunk/mangle.h	Tue Nov 10 12:51:22 2009	(r29876)
+++ trunk/mangle.h	Tue Nov 10 14:08:36 2009	(r29877)
@@ -31,10 +31,6 @@
 #define attribute_used
 #endif
 
-// keep in sync with configure PIC check and libavutil/internal.h
-#if ( defined(__PIC__) || defined(__pic__) ) && ! defined(PIC)
-#    define PIC
-#endif
 #if ARCH_X86_64 && defined(PIC)
 #define MANGLE(a) EXTERN_PREFIX #a "(%%rip)"
 #else


More information about the MPlayer-cvslog mailing list