Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
From b56e9125db34614b2157516df3ee724180f2084f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sat, 13 Jul 2024 09:59:26 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: do not force compiler flags
|
||||
|
||||
The compiler flags enforced by CMakeLists.txt can be problematic:
|
||||
|
||||
- When CROSS_COMPILE_ARM is set, one is not necessarily building for
|
||||
armv6 with soft float-abi: one may be using ARMv7 with hard float
|
||||
|
||||
- When CROSS_COMPILE_ARM is not set, forcing -mfloat-abi=hard is
|
||||
similarly wrong
|
||||
|
||||
Those compiler flags should be passed by the user depending on the
|
||||
exact target platform.
|
||||
|
||||
Inspired from
|
||||
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/x265/files/arm-r1.patch,
|
||||
and earlier work from Bertrand Jacquin <bertrand@jacquin.bzh> and
|
||||
Bernd Kuhls <bernd.kuhls@t-online.de>.
|
||||
|
||||
Upstream: https://bitbucket.org/multicoreware/x265_git/pull-requests/26
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
[Bernd: rebased for 4.1]
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
source/CMakeLists.txt | 6 +++---
|
||||
source/dynamicHDR10/CMakeLists.txt | 6 +++---
|
||||
2 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index c14489ea6..fa331e8af 100755
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -270,14 +270,14 @@ if(GCC)
|
||||
endif()
|
||||
if(ARM AND CROSS_COMPILE_ARM)
|
||||
message(STATUS "cross compile arm")
|
||||
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
elseif(ARM)
|
||||
find_package(Neon)
|
||||
if(CPU_HAS_NEON)
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
|
||||
+ set(ARM_ARGS -mfpu=neon -fPIC)
|
||||
add_definitions(-DHAVE_NEON)
|
||||
else()
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
endif()
|
||||
endif()
|
||||
if(ARM64)
|
||||
diff --git a/source/dynamicHDR10/CMakeLists.txt b/source/dynamicHDR10/CMakeLists.txt
|
||||
index 4243338c6..62853a06b 100644
|
||||
--- a/source/dynamicHDR10/CMakeLists.txt
|
||||
+++ b/source/dynamicHDR10/CMakeLists.txt
|
||||
@@ -43,14 +43,14 @@ if(GCC)
|
||||
endif()
|
||||
endif()
|
||||
if(ARM AND CROSS_COMPILE_ARM)
|
||||
- set(ARM_ARGS -march=armv6 -mfloat-abi=soft -mfpu=vfp -marm -fPIC)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
elseif(ARM)
|
||||
find_package(Neon)
|
||||
if(CPU_HAS_NEON)
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=neon -marm -fPIC)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
add_definitions(-DHAVE_NEON)
|
||||
else()
|
||||
- set(ARM_ARGS -mcpu=native -mfloat-abi=hard -mfpu=vfp -marm)
|
||||
+ set(ARM_ARGS -fPIC)
|
||||
endif()
|
||||
endif()
|
||||
add_definitions(${ARM_ARGS})
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user