]> git.pld-linux.org Git - packages/chromium-browser.git/blob - system-ffmpeg.patch
build with cleaned up source
[packages/chromium-browser.git] / system-ffmpeg.patch
1 Fix HOST_OS detection in build_ffpeg.sh
2 https://bugs.gentoo.org/show_bug.cgi?id=491466
3
4 Enable gold linker
5 https://bugs.gentoo.org/show_bug.cgi?id=491850
6
7 --- a/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh
8 +++ b/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh
9 @@ -75,7 +75,7 @@
10  LIBAVUTIL_VERSION_MAJOR=52
11  
12  case $(uname -sm) in
13 -  Linux\ i386)
14 +  Linux\ i?86)
15      HOST_OS=linux
16      HOST_ARCH=ia32
17      JOBS=$(grep processor /proc/cpuinfo | wc -l)
18 @@ -85,6 +85,11 @@
19      HOST_ARCH=x64
20      JOBS=$(grep processor /proc/cpuinfo | wc -l)
21      ;;
22 +  Linux\ arm*)
23 +    HOST_OS=linux
24 +    HOST_ARCH=arm
25 +    JOBS=$(grep processor /proc/cpuinfo | wc -l)
26 +    ;;
27    Darwin\ i386)
28      HOST_OS=mac
29      HOST_ARCH=ia32
30 @@ -117,14 +122,6 @@
31  echo "LD          = $(ld --version | head -n1)"
32  echo
33  
34 -# As of this writing gold 2.20.1-system.20100303 is unable to link FFmpeg.
35 -if ld --version | grep -q gold; then
36 -  echo "gold is unable to link FFmpeg"
37 -  echo
38 -  echo "Switch /usr/bin/ld to the regular binutils ld and try again"
39 -  exit 1
40 -fi
41 -
42  # We want to use a sufficiently recent version of yasm on Windows.
43  if [[ "$TARGET_OS" == "win" || "$TARGET_OS" == "win-vs2013" ]]; then
44    if !(which yasm 2>&1 > /dev/null); then
45 @@ -292,14 +289,16 @@
46      add_flag_common --extra-cflags=-m32
47      add_flag_common --extra-ldflags=-m32
48    elif [ "$TARGET_ARCH" = "arm" ]; then
49 -    # This if-statement essentially is for chroot tegra2.
50 -    add_flag_common --enable-cross-compile
51 +    if [ "$HOST_ARCH" != "arm" ]; then
52 +      # This if-statement essentially is for chroot tegra2.
53 +      add_flag_common --enable-cross-compile
54  
55 -    # Location is for CrOS chroot. If you want to use this, enter chroot
56 -    # and copy ffmpeg to a location that is reachable.
57 -    add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
58 -    add_flag_common --target-os=linux
59 -    add_flag_common --arch=arm
60 +      # Location is for CrOS chroot. If you want to use this, enter chroot
61 +      # and copy ffmpeg to a location that is reachable.
62 +      add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
63 +      add_flag_common --target-os=linux
64 +      add_flag_common --arch=arm
65 +    fi
66  
67      # TODO(ihf): ARM compile flags are tricky. The final options
68      # overriding everything live in chroot /build/*/etc/make.conf
69 @@ -322,11 +321,13 @@
70      # NOTE: softfp/hardfp selected at gyp time.
71      add_flag_common --extra-cflags=-mfloat-abi=hard
72    elif [ "$TARGET_ARCH" = "arm-neon" ]; then
73 -    # This if-statement is for chroot arm-generic.
74 -    add_flag_common --enable-cross-compile
75 -    add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
76 -    add_flag_common --target-os=linux
77 -    add_flag_common --arch=arm
78 +    if [ "$HOST_ARCH" != "arm" ]; then
79 +      # This if-statement is for chroot arm-generic.
80 +      add_flag_common --enable-cross-compile
81 +      add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi-
82 +      add_flag_common --target-os=linux
83 +      add_flag_common --arch=arm
84 +    fi
85      add_flag_common --enable-armv6
86      add_flag_common --enable-armv6t2
87      add_flag_common --enable-vfp
This page took 0.497978 seconds and 3 git commands to generate.