From: Måns Rullgård Date: Tue, 18 Mar 2008 02:01:20 +0000 (+0000) Subject: check for prefix on extern symbols in configure X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b4d96ba2a838d26e469887dfb1c6088005d09f0b;p=ffmpeg check for prefix on extern symbols in configure Originally committed as revision 12484 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/configure b/configure index 8c241cfcf18..16860d2514d 100755 --- a/configure +++ b/configure @@ -1491,6 +1491,12 @@ if test "$?" != 0; then die "C compiler test failed." fi +check_cc <> $TMPH || printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH +echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH diff --git a/libavutil/internal.h b/libavutil/internal.h index 6f1dd806398..ccb0974ad22 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -119,18 +119,10 @@ #endif // Use rip-relative addressing if compiling PIC code on x86-64. -#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__DJGPP__) || \ - defined(__OS2__) || defined(__APPLE__) || \ - (defined (__OpenBSD__) && !defined(__ELF__)) -# if defined(ARCH_X86_64) && defined(PIC) -# define MANGLE(a) "_" #a"(%%rip)" -# else -# define MANGLE(a) "_" #a -# endif -#elif defined(ARCH_X86_64) && defined(PIC) -# define MANGLE(a) #a"(%%rip)" +#if defined(ARCH_X86_64) && defined(PIC) +# define MANGLE(a) EXTERN_PREFIX #a"(%%rip)" #else -# define MANGLE(a) #a +# define MANGLE(a) EXTERN_PREFIX #a #endif /* debug stuff */