initial buildroot for linux 5.15

This commit is contained in:
Huan.Feng
2021-12-06 14:12:13 +08:00
parent d7767d594e
commit 7b6fc358fa
12736 changed files with 508822 additions and 0 deletions
@@ -0,0 +1,57 @@
From f480ac538eb69086d4b7db855c2a457d5d6420d4 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 10 Feb 2020 14:05:12 +0100
Subject: [PATCH] CMake/Utils/PrecompiledHeader.cmake: Add -c argument to build
precompiled headers
Add "-c" argument when building precompiled headers to fix build with
RELRO.
More information on a similar issue with domoticz can be found here:
https://patchwork.ozlabs.org/patch/1187328:
"The problem AFAICS is that if no -c or similar option is given, GCC
decides what needs to be done based on the rest of the arguments. If the
rest of the arguments include a -Wl,... option, it decides that linking
needs to be done. If the rest of the arguments are just header files, it
decides to create a precompiled header."
Fixes:
- http://autobuild.buildroot.org/results/8fabf8d270b9257c3a9db6a2f17f1c08ec9428d3
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Upstream: https://github.com/OGRECave/ogre/commit/de4d5c920e23e1e2b21dc5c8192ef74ba6210cca]
---
CMake/Utils/PrecompiledHeader.cmake | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMake/Utils/PrecompiledHeader.cmake b/CMake/Utils/PrecompiledHeader.cmake
index a02d99acd..bfb0059db 100644
--- a/CMake/Utils/PrecompiledHeader.cmake
+++ b/CMake/Utils/PrecompiledHeader.cmake
@@ -133,11 +133,11 @@ MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
SET(${out_command}
- ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
+ ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -c -o ${_output} ${_input}
)
ELSE(CMAKE_CXX_COMPILER_ARG1)
SET(${out_command}
- ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
+ ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -c -o ${_output} ${_input}
)
ENDIF(CMAKE_CXX_COMPILER_ARG1)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
@@ -291,7 +291,7 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
set_target_properties(${_targetName}_pch_dephelp PROPERTIES INCLUDE_DIRECTORIES "${DIRINC}")
#MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
- #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")
+ #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -c -o ${_output} ${_input}")
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_name}"
--
2.24.1
@@ -0,0 +1,71 @@
From 3f182b7e743662ec3fa63e1c7f213171d99485ba Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Mon, 10 Feb 2020 21:45:58 +0100
Subject: [PATCH] Checks for strtol_l function
strtol_l (and strtoul_l, strtoll_l, strtoull_l) are not always available
(for example on musl) so check for strtol_l and reuse android fallback if
needed to avoid the following build failure:
/home/buildroot/autobuild/instance-1/output-1/build/ogre-1.12.0/OgreMain/src/OgreStringConverter.cpp: In static member function 'static bool Ogre::StringConverter::parse(const String&, Ogre::int32&)':
/home/buildroot/autobuild/instance-1/output-1/build/ogre-1.12.0/OgreMain/src/OgreStringConverter.cpp:253:22: error: 'strtol_l' was not declared in this scope
ret = (int32)strtol_l(val.c_str(), &end, 0, _numLocale);
^~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/107cffe41081ce46441dec8699d6ad0f152bc152
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Retrieved from:
https://github.com/OGRECave/ogre/commit/3f182b7e743662ec3fa63e1c7f213171d99485ba]
---
CMake/ConfigureBuild.cmake | 7 +++++++
CMake/Templates/OgreBuildSettings.h.in | 2 ++
OgreMain/include/OgreString.h | 3 +++
3 files changed, 12 insertions(+)
diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake
index ab049a525ae..73606c997c1 100644
--- a/CMake/ConfigureBuild.cmake
+++ b/CMake/ConfigureBuild.cmake
@@ -133,6 +133,13 @@ if(SDL2_FOUND OR EMSCRIPTEN)
set(OGRE_BITES_HAVE_SDL 1)
endif()
+# determine if strtol_l is supported
+include(CheckFunctionExists)
+CHECK_FUNCTION_EXISTS(strtol_l HAVE_STRTOL_L)
+if (NOT HAVE_STRTOL_L)
+ set(OGRE_NO_LOCALE_STRCONVERT 1)
+endif ()
+
# generate OgreBuildSettings.h
configure_file(${OGRE_TEMPLATES_DIR}/OgreComponents.h.in ${PROJECT_BINARY_DIR}/include/OgreComponents.h @ONLY)
configure_file(${OGRE_TEMPLATES_DIR}/OgreBuildSettings.h.in ${PROJECT_BINARY_DIR}/include/OgreBuildSettings.h @ONLY)
diff --git a/CMake/Templates/OgreBuildSettings.h.in b/CMake/Templates/OgreBuildSettings.h.in
index a491d09624c..95eb1b71d64 100644
--- a/CMake/Templates/OgreBuildSettings.h.in
+++ b/CMake/Templates/OgreBuildSettings.h.in
@@ -107,4 +107,6 @@ WARNING: Disabling this will make the samples unusable.
#cmakedefine01 OGRE_NO_QUAD_BUFFER_STEREO
+#cmakedefine01 OGRE_NO_LOCALE_STRCONVERT
+
#endif
diff --git a/OgreMain/include/OgreString.h b/OgreMain/include/OgreString.h
index a81c220012e..1f544195dee 100644
--- a/OgreMain/include/OgreString.h
+++ b/OgreMain/include/OgreString.h
@@ -46,8 +46,11 @@ THE SOFTWARE.
# define strnicmp strncasecmp
#endif
+#if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_EMSCRIPTEN || \
+ (OGRE_PLATFORM == OGRE_PLATFORM_LINUX && OGRE_NO_LOCALE_STRCONVERT == 1)
#if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_EMSCRIPTEN
# define locale_t int
+#endif
# define strtod_l(ptr, end, l) strtod(ptr, end)
# define strtoul_l(ptr, end, base, l) strtoul(ptr, end, base)
# define strtol_l(ptr, end, base, l) strtol(ptr, end, base)
+41
View File
@@ -0,0 +1,41 @@
config BR2_PACKAGE_OGRE
bool "ogre"
depends on BR2_PACKAGE_HAS_LIBGL # libglu
depends on BR2_PACKAGE_XORG7
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU
depends on BR2_USE_WCHAR # use wchar_t
select BR2_PACKAGE_FREETYPE
select BR2_PACKAGE_LIBFREEIMAGE
select BR2_PACKAGE_SDL2
select BR2_PACKAGE_SDL2_OPENGL
select BR2_PACKAGE_SDL2_X11 # use wmInfo.info.x11
select BR2_PACKAGE_XLIB_LIBX11
select BR2_PACKAGE_XLIB_LIBXAW
select BR2_PACKAGE_XLIB_LIBXEXT
select BR2_PACKAGE_XLIB_LIBXRANDR
select BR2_PACKAGE_ZZIPLIB
help
OGRE is a scene-oriented, flexible 3D engine written in C++
designed to make it easier and more intuitive for developers
to produce games and demos utilising 3D hardware. The class
library abstracts all the details of using the underlying
system libraries like Direct3D and OpenGL and provides an
interface based on world objects and other intuitive classes.
https://ogrecave.github.io/ogre
comment "ogre needs X11 and an OpenGL provider"
depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7
depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
&& BR2_INSTALL_LIBSTDCPP && !BR2_STATIC_LIBS && BR2_USE_WCHAR
depends on BR2_USE_MMU
comment "ogre needs a toolchain w/ C++, dynamic library, gcc >= 4.8, threads, wchar"
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS \
|| !BR2_USE_WCHAR
depends on BR2_USE_MMU
+3
View File
@@ -0,0 +1,3 @@
# sha256 locally computed
sha256 163e7700e319532d4389ecba91e3ab88551f78610886fa36f8f262f9a5080988 ogre-1.12.0.tar.gz
sha256 82758e8d1d72139904b9b7472ef0f6544413d2871b58540307fdcc20e473e5f8 LICENSE
+51
View File
@@ -0,0 +1,51 @@
################################################################################
#
# ogre
#
################################################################################
OGRE_VERSION = 1.12.0
OGRE_SITE = $(call github,OGRECave,ogre,v$(OGRE_VERSION))
OGRE_LICENSE = MIT (main library, DeferredShadingMedia samples), Public Domain (samples and plugins), Zlib (tinyxml)
OGRE_LICENSE_FILES = LICENSE
OGRE_INSTALL_STAGING = YES
# Ogre use a bundled version of tinyxml
OGRE_DEPENDENCIES = host-pkgconf \
freetype \
libfreeimage \
libgl \
sdl2 \
xlib_libX11 \
xlib_libXaw \
xlib_libXext \
xlib_libXrandr \
zziplib
OGRE_CFLAGS = $(TARGET_CFLAGS) -DGLEW_NO_GLU
OGRE_CXXFLAGS = $(TARGET_CXXFLAGS) -DGLEW_NO_GLU
# Unbundle freetype and zziplib.
# Disable java and nvidia cg support.
OGRE_CONF_OPTS = -DOGRE_BUILD_DEPENDENCIES=OFF \
-DOGRE_BUILD_COMPONENT_JAVA=OFF \
-DOGRE_BUILD_PLUGIN_CG=OFF \
-DOGRE_INSTALL_DOCS=OFF \
-DCMAKE_C_FLAGS="$(OGRE_CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(OGRE_CXXFLAGS)"
# Enable optional python component if python interpreter is present on the target.
ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
OGRE_DEPENDENCIES += host-swig \
$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
OGRE_CONF_OPTS += -DOGRE_BUILD_COMPONENT_PYTHON=ON
else
OGRE_CONF_OPTS += -DOGRE_BUILD_COMPONENT_PYTHON=OFF
endif
# Uses __atomic_fetch_add_8
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
OGRE_CXXFLAGS += -latomic
endif
$(eval $(cmake-package))