1 Fix HOST_OS detection in build_ffpeg.sh
2 https://bugs.gentoo.org/show_bug.cgi?id=491466
5 https://bugs.gentoo.org/show_bug.cgi?id=491850
7 --- a/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh
8 +++ b/third_party/ffmpeg/chromium/scripts/build_ffmpeg.sh
10 LIBAVUTIL_VERSION_MAJOR=52
17 JOBS=$(grep processor /proc/cpuinfo | wc -l)
20 JOBS=$(grep processor /proc/cpuinfo | wc -l)
25 + JOBS=$(grep processor /proc/cpuinfo | wc -l)
31 echo "LD = $(ld --version | head -n1)"
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"
38 - echo "Switch /usr/bin/ld to the regular binutils ld and try again"
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
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
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
67 # TODO(ihf): ARM compile flags are tricky. The final options
68 # overriding everything live in chroot /build/*/etc/make.conf
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
85 add_flag_common --enable-armv6
86 add_flag_common --enable-armv6t2
87 add_flag_common --enable-vfp