[Ffmpeg-devel] 64bit support

Jacob Meuser jakemsr
Sun Jun 26 23:27:34 CEST 2005


On Sun, Jun 26, 2005 at 10:17:51PM +0200, Fran?ois Revol wrote:
> > 
> > So it doesn't fail to build unless you use shared libs, which is
> > explicitly not recommended. Recompile without --enable-shared and it
> > will work fine.
> 
> That's not what I call a fix. :p

me either.

Rich, do you really enjoy replying to these emails?  don't you have
something better to do?  don't you think most people want stuff that
"just works"?

now, if someone complains about speed, and they are using PIC, then
your suggestion would help.

fact is, there are some places where trying to get around PIC is
going to waste more time, both for the users and the developers,
than the total time of the extra cycles used for PIC.

I've previously sent a pretty similar patch to the one attached,
but this one will also take care of this particular users problem.

-- 
<jakemsr at jakemsr.com>
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
retrieving revision 1.186
diff -u -r1.186 configure
--- configure	25 Jun 2005 09:04:08 -0000	1.186
+++ configure	26 Jun 2005 21:25:40 -0000
@@ -197,6 +197,7 @@
 need_inet_aton="no"
 ffserver="yes"
 ffplay="yes"
+LIBOBJFLAGS=""
 LDFLAGS=-Wl,--warn-common
 FFSLDFLAGS=-Wl,-E
 LDCONFIG="ldconfig"
@@ -276,7 +277,7 @@
 audio_oss="yes"
 dv1394="no"
 make="gmake"
-CFLAGS="$CFLAGS \$(PIC)"
+LIBOBJFLAGS="\$(PIC)"
 LDFLAGS="$LDFLAGS -export-dynamic -pthread"
 LDCONFIG="ldconfig -m \$(libdir)"
 extralibs="$extralibs -lossaudio"
@@ -1103,6 +1104,16 @@
     fi
 fi
 
+# PIC flags for shared library objects where they are needed
+if test "$lshared" = "yes" ; then
+  # LIBOBJFLAGS may have already been set in the OS configuration
+  if test -z "$LIBOBJFLAGS" ; then
+    if test "$cpu" = "x86_64" ; then
+      LIBOBJFLAGS="\$(PIC)"
+    fi
+  fi
+fi
+
 if test x"$bindir" = x""; then
 bindir="${prefix}/bin"
 fi
@@ -1219,6 +1230,7 @@
 echo "LDCONFIG=$LDCONFIG" >> config.mak
 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
+echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
 echo "BUILDSUF=$BUILDSUF" >> config.mak
 echo "LIBPREF=$LIBPREF" >> config.mak
 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
Index: libavcodec/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.194
diff -u -r1.194 Makefile
--- libavcodec/Makefile	3 Jun 2005 13:59:38 -0000	1.194
+++ libavcodec/Makefile	26 Jun 2005 21:25:41 -0000
@@ -409,10 +409,10 @@
 	$(MAKE) -C libpostproc
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $< 
+	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< 
 
 %.o: %.S
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $<
 
 depend: $(SRCS)
 	$(CC) -MM $(CFLAGS) $^ 1>.depend
Index: libavcodec/libpostproc/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/libpostproc/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- libavcodec/libpostproc/Makefile	22 May 2005 23:58:57 -0000	1.24
+++ libavcodec/libpostproc/Makefile	26 Jun 2005 21:25:41 -0000
@@ -21,7 +21,7 @@
 # .PHONY: all clean
 
 .c.o:
-	$(CC) -c $(CFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
+	$(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
 
 all:    $(SWSLIB) $(PPLIB) $(SPPLIB)
 
Index: libavformat/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v
retrieving revision 1.92
diff -u -r1.92 Makefile
--- libavformat/Makefile	25 Jun 2005 09:04:08 -0000	1.92
+++ libavformat/Makefile	26 Jun 2005 21:25:41 -0000
@@ -134,7 +134,7 @@
 	install -m 644 ../libavformat.pc $(libdir)/pkgconfig
 
 %.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $< 
+	$(CC) $(CFLAGS) $(LIBOBJFLAGS) -c -o $@ $< 
 
 # BeOS: remove -Wall to get rid of all the "multibyte constant" warnings
 %.o: %.cpp



More information about the ffmpeg-devel mailing list