contrib: turn off Thumb ISA for libavcodec and libmad
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 29 Aug 2009 15:36:54 +0000 (18:36 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 29 Aug 2009 15:40:20 +0000 (18:40 +0300)
Conflicts:

extras/contrib/src/Makefile

extras/contrib/bootstrap
extras/contrib/src/Makefile
extras/contrib/src/Patches/ffmpeg-avcodec-no-thumb.patch [new file with mode: 0644]

index 5e34e46..edd4ebb 100755 (executable)
@@ -242,6 +242,7 @@ case $HOST in
             EXTRA_CFLAGS=" -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a"
             EXTRA_CLFAGS="$EXTRA_CFLAGS -mfpu=vfp"
             EXTRA_CFLAGS="$EXTRA_CFLAGS -mthumb -mthumb-interwork"
+            echo 'HAVE_ISA_THUMB = 1' >> config.mak
         fi
     ;;
     *86_64*linux*)
index 4517bb8..edbe95c 100644 (file)
@@ -170,6 +170,10 @@ endif
 X264CONF += --enable-pic
 endif
 
+ifdef HAVE_ISA_THUMB
+NOTHUMB ?= -mno-thumb
+endif
+
 DATE=`date +%Y-%m-%d`
 
 # ***************************************************************************
@@ -631,7 +635,7 @@ ifdef HAVE_DARWIN_OS
 endif
 
 .mad: libmad
-       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && make && make install)
+       (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3 $(NOTHUMB)" && make && make install)
        $(INSTALL_NAME)
        touch $@
 
@@ -984,6 +988,9 @@ DISTCLEAN_PKG += amrwb-$(LIBAMR_WB_VERSION).tar.bz2
 ifdef SVN
 ffmpeg:
        $(SVN) co $(FFMPEG_SVN) ffmpeg
+ifdef HAVE_ISA_THUMB
+       patch -p0 < Patches/ffmpeg-avcodec-no-thumb.patch
+endif
 ifdef HAVE_WINCE
        patch -p1 < Patches/ffmpeg-svn-wince.patch
 endif
@@ -1039,6 +1046,9 @@ ifdef HAVE_UCLIBC
 else
 .ffmpeg: ffmpeg .lame .gsm
 endif
+endif
+ifdef HAVE_ISA_THUMB
+       patch -p0 < Patches/ffmpeg-avcodec-no-thumb.patch
 endif
        (cd $<; $(HOSTCC) ./configure $(FFMPEGCONF) --prefix=$(PREFIX) --extra-cflags="$(CFLAGS) $(FFMPEG_CFLAGS)" --extra-ldflags="$(LDFLAGS)" $(FFMPEGCONF) --disable-shared --enable-static && make && make install-libs install-headers)
        touch $@
diff --git a/extras/contrib/src/Patches/ffmpeg-avcodec-no-thumb.patch b/extras/contrib/src/Patches/ffmpeg-avcodec-no-thumb.patch
new file mode 100644 (file)
index 0000000..21b51a5
--- /dev/null
@@ -0,0 +1,10 @@
+Index: ffmpeg/libavcodec/Makefile
+===================================================================
+--- ffmpeg/libavcodec/Makefile (révision 19635)
++++ ffmpeg/libavcodec/Makefile (copie de travail)
+@@ -1,4 +1,5 @@
+ include $(SUBDIR)../config.mak
++CFLAGS+=-mno-thumb
+ NAME = avcodec
+ FFLIBS = avutil