[SCM] FFmpeg packaging branch, ubuntu.lucid, updated. debian/0.5+svn20090706-2ubuntu5.ppa2-3-gea2d74c

lool at users.alioth.debian.org lool at users.alioth.debian.org
Wed Jan 13 11:25:00 UTC 2010


The following commit has been merged in the ubuntu.lucid branch:
commit ea2d74ce433dd7882da1712a539afe2a5a9ca88f
Author: Loïc Minier <lool at dooz.org>
Date:   Wed Jan 13 12:23:35 2010 +0100

    Test whether to build neon and vfp flavors
    
    Build some assembly test code -- just like configure -- to decide
    whether the *default* toolchain uses vfp or neon to decided whether to
    build the vfp and neon flavors.

diff --git a/debian/confflags b/debian/confflags
index 610c4b2..8b3107a 100644
--- a/debian/confflags
+++ b/debian/confflags
@@ -13,25 +13,49 @@ export DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
 SVNREVISION=$(shell cat .svnrevision 2>/dev/null || echo "UNKNOWN")
 
+# this is only used for the check_asm macro
+ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+    CC := gcc
+else
+    CC := $(DEB_HOST_GNU_TYPE)-gcc
+endif
+
+# this outputs 0 or 1 depending on whether a piece of assembly can be compiled
+# with the *default* gcc flags; this is used to test the toolchain *default*
+# configuration
+check_asm = $(shell echo 'void foo(void) { __asm__ volatile("$(1)"); }' | $(CC) -x c -c - -o /dev/null 2>/dev/null && echo 1 || echo 0)
+
 # the other flavors always build dynamic versions
 # Also, disable architecture-specific optimizations for default shared build
-ifeq      ($(DEB_HOST_ARCH),armel)
-# Ubuntu's toolchain default to vfp anyway
-#FLAVORS += vfp
-FLAVORS += neon
+ifeq ($(DEB_HOST_ARCH),armel)
+    # whether the toolchain *default* configuration includes vfp and neon
+    vfp_asm := fadds s0, s0, s0
+    has_vfp := $(call check_asm, $(vfp_asm))
+    neon_asm := vadd.i16 q0, q0, q0
+    has_neon := $(call check_asm, $(neon_asm))
+
+    # only build 
+    ifneq ($(has_vfp),1)
+    FLAVORS += vfp
+    endif
+    ifneq ($(has_neon),1)
+    FLAVORS += neon
+    endif
 else ifeq ($(DEB_HOST_ARCH),arm)
-nooptflags += --disable-armv5te --disable-armv6 --disable-armv6t2
-nooptflags += --disable-armvfp --disable-neon
+    nooptflags += --disable-armv5te --disable-armv6 --disable-armv6t2
+    nooptflags += --disable-armvfp --disable-neon
 else ifeq ($(DEB_HOST_ARCH),i386)
-FLAVORS += cmov
+    FLAVORS += cmov
 else ifeq ($(DEB_HOST_ARCH),powerpc)
-FLAVORS += altivec
-nooptflags += --disable-altivec
+    FLAVORS += altivec
+    nooptflags += --disable-altivec
 else ifeq ($(DEB_HOST_ARCH),sparc)
-FLAVORS += vis
-nooptflags += --disable-vis
+    FLAVORS += vis
+    nooptflags += --disable-vis
 endif
 
+$(info Building FLAVORS=$(FLAVORS))
+
 define cond_enable
 	$(shell test -r $(1) && echo --enable-$(2) )
 endef

-- 
FFmpeg packaging



More information about the pkg-multimedia-commits mailing list