aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorashish <ashish@FreeBSD.org>2014-12-08 17:13:22 +0800
committerashish <ashish@FreeBSD.org>2014-12-08 17:13:22 +0800
commit44b0fd118af13a4abcdc30c74546d393e181e35b (patch)
tree53f1b7cd546fa8439ab7b3a728cfb2606e1228ec /multimedia
parentfc648f2ac8dc30423019e0be975152b426d9e408 (diff)
downloadfreebsd-ports-gnome-44b0fd118af13a4abcdc30c74546d393e181e35b.tar.gz
freebsd-ports-gnome-44b0fd118af13a4abcdc30c74546d393e181e35b.tar.zst
freebsd-ports-gnome-44b0fd118af13a4abcdc30c74546d393e181e35b.zip
Add fix for building with clang 3.5
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/libvpx/files/patch-build_make_Makefile9
-rw-r--r--multimedia/libvpx/files/patch-build_make_configure.sh21
-rw-r--r--multimedia/libvpx/files/patch-configure25
3 files changed, 55 insertions, 0 deletions
diff --git a/multimedia/libvpx/files/patch-build_make_Makefile b/multimedia/libvpx/files/patch-build_make_Makefile
index 6ae9142cb85f..3b7f32ea54da 100644
--- a/multimedia/libvpx/files/patch-build_make_Makefile
+++ b/multimedia/libvpx/files/patch-build_make_Makefile
@@ -3,6 +3,15 @@ $FreeBSD$
--- build/make/Makefile.orig
+++ build/make/Makefile
+@@ -158,7 +158,7 @@
+ $(qexec)$(AS) $(ASFLAGS) -o $@ $<
+
+ .PRECIOUS: %.c.S
+-%.c.S: CFLAGS += -DINLINE_ASM
++%.c.S: CFLAGS += -DINLINE_ASM $(CLANG_NO_IAS)
+ $(BUILD_PFX)%.c.S: %.c
+ $(if $(quiet),@echo " [GEN] $@")
+ $(qexec)$(CC) -S $(CFLAGS) -o $@ $<
@@ -230,8 +230,8 @@
define install_map_template
$(DIST_DIR)/$(1): $(2)
diff --git a/multimedia/libvpx/files/patch-build_make_configure.sh b/multimedia/libvpx/files/patch-build_make_configure.sh
new file mode 100644
index 000000000000..eb84684c6b06
--- /dev/null
+++ b/multimedia/libvpx/files/patch-build_make_configure.sh
@@ -0,0 +1,21 @@
+$FreeBSD$
+
+--- build/make/configure.sh.orig 2014-12-03 18:11:14.000000000 +0100
++++ build/make/configure.sh 2014-12-03 20:20:00.000000000 +0100
+@@ -382,6 +382,7 @@
+ print_webm_license config.mk "##" ""
+ echo '# This file automatically generated by configure. Do not edit!' >> config.mk
+ echo "TOOLCHAIN := ${toolchain}" >> config.mk
++ echo "CLANG_NO_IAS=${CLANG_NO_IAS}" >> config.mk
+
+ case ${toolchain} in
+ *-linux-rvct)
+@@ -1019,7 +1019,7 @@ EOF
+ bits=32
+ enabled x86_64 && bits=64
+ check_cpp <<EOF && bits=x32
+-#ifndef __ILP32__
++#if !defined(__ILP32__) || !defined(__x86_64__)
+ #error "not x32"
+ #endif
+ EOF
diff --git a/multimedia/libvpx/files/patch-configure b/multimedia/libvpx/files/patch-configure
index 2a15f60f8ae9..bfe8a2eb7893 100644
--- a/multimedia/libvpx/files/patch-configure
+++ b/multimedia/libvpx/files/patch-configure
@@ -11,3 +11,28 @@ $FreeBSD$
all_platforms="${all_platforms} generic-gnu"
# all_targets is a list of all targets that can be configured
+@@ -611,15 +612,15 @@
+ check_add_cflags -Wimplicit-function-declaration
+ check_add_cflags -Wuninitialized
+ check_add_cflags -Wunused-variable
+- case ${CC} in
+- *clang*)
+- # libvpx and/or clang have issues with aliasing:
+- # https://code.google.com/p/webm/issues/detail?id=603
+- # work around them until they are fixed
+- check_add_cflags -fno-strict-aliasing
+- ;;
+- *) check_add_cflags -Wunused-but-set-variable ;;
+- esac
++ if ${CC} -v 2>&1 | grep "clang version" >/dev/null; then
++ # libvpx and/or clang have issues with aliasing:
++ # https://code.google.com/p/webm/issues/detail?id=603
++ # work around them until they are fixed
++ check_add_cflags -fno-strict-aliasing
++ CLANG_NO_IAS=-no-integrated-as
++ else
++ check_add_cflags -Wunused-but-set-variable
++ fi
+ enabled extra_warnings || check_add_cflags -Wno-unused-function
+ fi
+