ffmpeg/ffmpeg-0.4.9-pic.patch

41 lines
1.5 KiB
Diff
Raw Permalink Normal View History

--- ffmpeg-0.4.9-pre1/libavcodec/Makefile.pic 2004-07-23 12:04:25.586018114 +0200
+++ ffmpeg-0.4.9-pre1/libavcodec/Makefile 2004-07-23 12:05:57.274315938 +0200
@@ -9,6 +9,10 @@
# NOTE: -I.. is needed to include config.h
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
+ifeq ($(BUILD_SHARED),yes)
+CFLAGS+=$(PIC)
+endif
+
OBJS= common.o utils.o mem.o allcodecs.o \
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \
--- ffmpeg-0.4.9-pre1/libavformat/Makefile.pic 2004-04-24 17:16:23.000000000 +0200
+++ ffmpeg-0.4.9-pre1/libavformat/Makefile 2004-07-23 12:06:18.109608754 +0200
@@ -8,6 +8,10 @@
CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
+ifeq ($(BUILD_SHARED),yes)
+CFLAGS+=$(PIC)
+endif
+
OBJS= utils.o cutils.o os_support.o allformats.o
PPOBJS=
--- ffmpeg-0.4.9-pre1/configure.pic 2004-07-05 20:06:16.000000000 +0200
+++ ffmpeg-0.4.9-pre1/configure 2004-07-23 12:04:25.593018213 +0200
@@ -1144,7 +1144,10 @@
fi
if test "$lshared" = "yes" ; then
echo "BUILD_SHARED=yes" >> config.mak
- echo "PIC=-fPIC" >> config.mak
+ # it can work without PIC on x86
+ if test "$cpu" != "x86"; then
+ echo "PIC=-fPIC" >> config.mak
+ fi
fi
echo "EXTRALIBS=$extralibs" >> config.mak
version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |