Mercurial > libavcodec.hg
comparison common.h @ 2391:336a239ad9a4 libavcodec
fixes for PIC code on x86-64 patch by (Drew Hess <drew.hess gmail com>)
author | michael |
---|---|
date | Sat, 18 Dec 2004 03:07:15 +0000 |
parents | 26560d4fdb1f |
children | 582e635cfa08 |
comparison
equal
deleted
inserted
replaced
2390:ce45e1dd4b09 | 2391:336a239ad9a4 |
---|---|
222 | 222 |
223 #ifdef HAVE_AV_CONFIG_H | 223 #ifdef HAVE_AV_CONFIG_H |
224 | 224 |
225 # include "bswap.h" | 225 # include "bswap.h" |
226 | 226 |
227 // Use rip-relative addressing if compiling PIC code on x86-64. | |
227 # if defined(__MINGW32__) || defined(__CYGWIN__) || \ | 228 # if defined(__MINGW32__) || defined(__CYGWIN__) || \ |
228 defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__)) | 229 defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__)) |
229 # define MANGLE(a) "_" #a | 230 # if defined(ARCH_X86_64) && defined(PIC) |
231 # define MANGLE(a) "_" #a"(%%rip)" | |
232 # else | |
233 # define MANGLE(a) "_" #a | |
234 # endif | |
230 # else | 235 # else |
231 # define MANGLE(a) #a | 236 # if defined(ARCH_X86_64) && defined(PIC) |
237 # define MANGLE(a) #a"(%%rip)" | |
238 # else | |
239 # define MANGLE(a) #a | |
240 # endif | |
232 # endif | 241 # endif |
233 | 242 |
234 /* debug stuff */ | 243 /* debug stuff */ |
235 | 244 |
236 # ifndef DEBUG | 245 # ifndef DEBUG |