mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From 2e2417894ac5d35bc3d93b86c18f4df299f4d933 Mon Sep 17 00:00:00 2001
|
|
From: graysky <graysky@archlinux.us>
|
|
Date: Sat, 12 Dec 2020 09:10:28 -0500
|
|
Subject: [PATCH] use -mcpu= avoiding -march and -mtune for armv7h
|
|
|
|
From what I understand, when building on ARM, it's best to avoid the -march=
|
|
flag and rather use -mcpu= flag due to differences in meaning on ARM vs x86[1].
|
|
Additionally, this patch avoids thousands of warns like the following when
|
|
building for armv7h:
|
|
cc1: warning: switch '-mcpu=cortex-a72' conflicts with '-march=armv8-a'
|
|
|
|
This is due to the way ffmpeg's configure script defines -march=armv8-a when it
|
|
encounters any cortex-a* passed to it.
|
|
|
|
for reference and to experiment:
|
|
untar ffmpeg, run ./configure, then inspect the output of ffbuild/config.mak and adjust:
|
|
kodi-build/build/ffmpeg/src/ffmpeg-build/ffmpeg-prefix/src/ffmpeg-build/ffbuild/config.mak
|
|
|
|
1. https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu
|
|
|
|
---
|
|
configure | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/configure b/configure
|
|
index 8569a60..0d3aafb 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -4948,7 +4948,7 @@ elif enabled arm; then
|
|
|
|
case $cpu in
|
|
armv*)
|
|
- cpuflags="-march=$cpu"
|
|
+ cpuflags="-mcpu=cortex-a53"
|
|
subarch=$(echo $cpu | sed 's/[^a-z0-9]//g')
|
|
;;
|
|
*)
|
|
--
|
|
2.29.2
|
|
|