mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 07:33:46 +01:00
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29877 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4ca9381eae
commit
42ec82c1e5
3
configure
vendored
3
configure
vendored
@ -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"
|
||||
|
4
mangle.h
4
mangle.h
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user