initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 23d0bb0ef0fde52d1cffe235edead09287326fb4 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sun, 4 Oct 2020 01:11:30 +0200
|
||||
Subject: [PATCH] CMakeLists.txt: compile squirrel with -fPIC
|
||||
|
||||
Ensure that squirrel is compiled with -fPIC to allow linking the static
|
||||
libraries with dynamically linked programs. This is not a requirement
|
||||
for most architectures but is mandatory for ARM.
|
||||
|
||||
Fixes:
|
||||
x86_64-buildroot-linux-musl/bin/ld: CMakeFiles/sq_static.dir/sq.c.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
|
||||
x86_64-buildroot-linux-musl/bin/ld: final link failed: nonrepresentable section on output
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8b1dafa1e..07c603cce 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -412,7 +412,8 @@ ExternalProject_Add(squirrel
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
|
||||
-DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX}
|
||||
- -DINSTALL_INC_DIR=include)
|
||||
+ -DINSTALL_INC_DIR=include
|
||||
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON)
|
||||
|
||||
if(WIN32)
|
||||
add_library(squirrel_lib SHARED IMPORTED)
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
config BR2_PACKAGE_SUPERTUX
|
||||
bool "supertux"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_PACKAGE_HAS_LIBGL # libglew
|
||||
depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
|
||||
depends on BR2_PACKAGE_XORG7 # libglew, SDL2 OpenGL (GLX)
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 # C++14
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
|
||||
depends on BR2_USE_MMU # SDL2 OpenGL (GLX)
|
||||
depends on !BR2_STATIC_LIBS # SDL2
|
||||
depends on BR2_USE_WCHAR # Boost
|
||||
select BR2_PACKAGE_BOOST
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
select BR2_PACKAGE_BOOST_LOCALE
|
||||
select BR2_PACKAGE_BOOST_SYSTEM
|
||||
select BR2_PACKAGE_FREETYPE
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBGLEW
|
||||
select BR2_PACKAGE_LIBOGG
|
||||
select BR2_PACKAGE_LIBPNG
|
||||
select BR2_PACKAGE_LIBVORBIS
|
||||
select BR2_PACKAGE_OPENAL
|
||||
select BR2_PACKAGE_PHYSFS
|
||||
select BR2_PACKAGE_SDL2
|
||||
select BR2_PACKAGE_SDL2_IMAGE
|
||||
select BR2_PACKAGE_SDL2_OPENGL
|
||||
help
|
||||
SuperTux is a free classic 2D jump'n run sidescroller game in
|
||||
a style similar to the original Super Mario games covered
|
||||
under the GNU GPL.
|
||||
|
||||
http://supertux.github.io/
|
||||
|
||||
comment "supertux needs OpenGL and a toolchain w/ C++, gcc >= 6, NPTL, dynamic library, wchar"
|
||||
depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
|
||||
BR2_STATIC_LIBS || !BR2_USE_WCHAR
|
||||
@@ -0,0 +1,4 @@
|
||||
# Locally calculated
|
||||
sha256 26a9e56ea2d284148849f3239177d777dda5b675a10ab2d76ee65854c91ff598 SuperTux-v0.6.2-Source.tar.gz
|
||||
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 LICENSE.txt
|
||||
sha256 09645215102c1013a1ef8c16a30bacdb9a78924ca064372290405fabd3e7074d data/AUTHORS
|
||||
@@ -0,0 +1,73 @@
|
||||
################################################################################
|
||||
#
|
||||
# supertux
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SUPERTUX_VERSION = 0.6.2
|
||||
SUPERTUX_SITE = https://github.com/SuperTux/supertux/releases/download/v$(SUPERTUX_VERSION)
|
||||
SUPERTUX_SOURCE = SuperTux-v$(SUPERTUX_VERSION)-Source.tar.gz
|
||||
|
||||
# Supertux itself is GPL-3.0+, but it bundles a few libraries with different
|
||||
# licenses (sexp-cpp, squirrel, tinygettext) which are linked statically.
|
||||
SUPERTUX_LICENSE = GPL-3.0+ (code), CC-BY-SA-2.0, CC-BY-SA-3.0, CC-BY-SA-4.0, GPL-2.0+ (images music sounds)
|
||||
SUPERTUX_LICENSE_FILES = LICENSE.txt data/AUTHORS
|
||||
|
||||
# Use bundled squirrel, tinygettext sexp-cpp packages which are hardcoded in
|
||||
# the CMake build system.
|
||||
SUPERTUX_DEPENDENCIES = host-pkgconf boost freetype libcurl libgl libglew \
|
||||
libogg libpng libvorbis openal physfs sdl2 sdl2_image
|
||||
|
||||
# CMAKE_BUILD_TYPE=Release: disable profiling code (-pg)
|
||||
# ENABLE_BOOST_STATIC_LIBS=OFF: use boost shared libraries since supertux
|
||||
# depends on !BR2_STATIC_LIBS and boost provide only shared libraries with
|
||||
# BR2_SHARED_LIBS.
|
||||
# ENABLE_OPENGL=ON: Can be disabled but will make SuperTux unplayable slow.
|
||||
# GLBINDING_ENABLED=OFF: use GLEW (default) instead of glbinding.
|
||||
# Install the game directly in /usr/bin and game data in /usr/share/supertux2.
|
||||
# Force using physfs.so from staging since the check on PHYSFS_getPrefDir symbol
|
||||
# in physfs.h (CHECK_SYMBOL_EXISTS) doesn't work.
|
||||
# ENABLE_OPENGLES2=OFF: Disable opengles2 for now.
|
||||
SUPERTUX_CONF_OPTS += \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -DGLEW_NO_GLU" \
|
||||
-DENABLE_BOOST_STATIC_LIBS=OFF \
|
||||
-DBUILD_DOCUMENTATION=OFF \
|
||||
-DENABLE_OPENGL=ON \
|
||||
-DGLBINDING_ENABLED=OFF \
|
||||
-DINSTALL_SUBDIR_BIN="bin" \
|
||||
-DINSTALL_SUBDIR_SHARE="share/supertux2" \
|
||||
-DUSE_SYSTEM_PHYSFS=ON \
|
||||
-DENABLE_OPENGLES2=OFF
|
||||
|
||||
# Avoid incompatible posix_memalign declaration on x86 and x86_64 with
|
||||
# musl.
|
||||
# https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01425.html
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_i386)$(BR2_x86_64),y:y)
|
||||
define SUPERTUX_REMOVE_PEDANTIC
|
||||
$(SED) 's% -pedantic%%' $(@D)/CMakeLists.txt
|
||||
$(SED) 's%CHECK_CXX_FLAG(pedantic)%%' $(@D)/external/tinygettext/CMakeLists.txt
|
||||
endef
|
||||
SUPERTUX_POST_PATCH_HOOKS += SUPERTUX_REMOVE_PEDANTIC
|
||||
endif
|
||||
|
||||
# From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
|
||||
# "The problem lies within SDL_cpuinfo.h. It includes altivec.h, which by
|
||||
# definition provides an unconditional vector, pixel and bool define in
|
||||
# standard-c++ mode. In GNU-c++ mode this names are only defined
|
||||
# context-sensitive by cpp. SDL_cpuinfo.h is included by SDL.h.
|
||||
# Including altivec.h makes arbitrary code break."
|
||||
#
|
||||
# Acording to a bug report in GCC [1]:
|
||||
# "You need to use -std=g++11 or undefine bool after the include of altivec.h
|
||||
# as context sensitive keywords is not part of the C++11 standard".
|
||||
# So use gnu++11 instead of c++11 only for altivec system.
|
||||
# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58241#c3
|
||||
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
|
||||
define SUPERTUX_FIX_ALTIVEC_ISSUE
|
||||
$(SED) 's%std=c++0x%std=gnu++0x%' $(@D)/external/tinygettext/CMakeLists.txt
|
||||
endef
|
||||
SUPERTUX_POST_PATCH_HOOKS += SUPERTUX_FIX_ALTIVEC_ISSUE
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user