ports/multimedia/ffmpeg/files/patch-configure
Thomas Zander c28cf0a76f Fix runtime crashes on i386: enforce stack-alignment=16
PR:		205958
Submitted by:	dim (patch via ports mailing list)
Reported by:	otacilio.neto@bsd.com.br
MFH:		2016Q4 (ports-secteam fix blanket)
2016-10-09 12:19:32 +00:00

60 lines
1.7 KiB
Text

--- configure.orig 2015-06-19 20:47:55 UTC
+++ configure
@@ -2814,12 +2814,7 @@ target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
# machine
-if test "$target_os_default" = aix; then
- arch_default=$(uname -p)
- strip_default="strip -X32_64"
-else
- arch_default=$(uname -m)
-fi
+arch_default=$(uname -p)
cpu="generic"
intrinsics="none"
@@ -5682,7 +5677,11 @@ elif enabled gcc; then
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
elif enabled clang; then
- check_cflags -mllvm -stack-alignment=16
+ if enabled x86_32; then
+ check_cflags -mllvm -stack-alignment=16
+ check_cflags -mstack-alignment=16
+ check_cflags -mstackrealign
+ fi
check_cflags -Qunused-arguments
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
@@ -5823,7 +5818,7 @@ ifndef MAIN_MAKEFILE
SRC_PATH:=\$(SRC_PATH:.%=..%)
endif
CC_IDENT=$cc_ident
-ARCH=$arch
+FFMPEG_ARCH=$arch
INTRINSICS=$intrinsics
CC=$cc
CXX=$cxx
@@ -6035,7 +6030,7 @@ exec_prefix=\${prefix}
libdir=$libdir
includedir=$incdir
-Name: $name
+Name: ${name}${build_suffix}
Description: $comment
Version: $version
Requires: $(enabled shared || echo $requires)
@@ -6049,10 +6044,10 @@ EOF
mkdir -p doc/examples/pc-uninstalled
includedir=${source_path}
[ "$includedir" = . ] && includedir="\${pcfiledir}/../../.."
- cat <<EOF > doc/examples/pc-uninstalled/$name.pc
+ cat <<EOF > doc/examples/pc-uninstalled/${name}${build_suffix}.pc
prefix=
exec_prefix=
-libdir=\${pcfiledir}/../../../$name
+libdir=\${pcfiledir}/../../../${name}${build_suffix}
includedir=${includedir}
Name: $name