From 88f9d40aabb2916b7355581ccc9b4ef0c0f19109 Mon Sep 17 00:00:00 2001 From: Tibor Nagy Date: Sun, 29 Apr 2018 23:50:07 +0200 Subject: [PATCH] Fix linking problems The Rust code and some built-in compiler functions (__divdc3/__divsc3/__divxc3) complained about missing floating-point stuff: - fmax, fmaxf, fmaxl, logb, logbf, logbl, scalbnl, trunc, floor, ceil. Passing `--gc-sections` to the linker seems to fix this. --- recipes/netsurf/recipe.sh | 2 +- recipes/prboom/recipe.sh | 2 +- recipes/sdl/01_orbital.patch | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/recipes/netsurf/recipe.sh b/recipes/netsurf/recipe.sh index 42e0c72e7..f7ede53d6 100644 --- a/recipes/netsurf/recipe.sh +++ b/recipes/netsurf/recipe.sh @@ -1,6 +1,6 @@ VERSION=3.7 TAR=http://download.netsurf-browser.org/netsurf/releases/source-full/netsurf-all-$VERSION.tar.gz -BUILD_DEPENDS=(curl expat libjpeg libpng openssl sdl zlib freetype) +BUILD_DEPENDS=(curl expat libjpeg libpng openssl sdl zlib freetype liborbital) DEPENDS="ca-certificates orbital" function recipe_version { diff --git a/recipes/prboom/recipe.sh b/recipes/prboom/recipe.sh index f8c084424..cf4ccb141 100644 --- a/recipes/prboom/recipe.sh +++ b/recipes/prboom/recipe.sh @@ -1,6 +1,6 @@ VERSION=2.5.0 TAR=https://downloads.sourceforge.net/project/prboom/prboom%20stable/$VERSION/prboom-$VERSION.tar.gz -BUILD_DEPENDS=(sdl) +BUILD_DEPENDS=(sdl liborbital) function recipe_version { echo "$VERSION" diff --git a/recipes/sdl/01_orbital.patch b/recipes/sdl/01_orbital.patch index c7365591a..2d4216f89 100644 --- a/recipes/sdl/01_orbital.patch +++ b/recipes/sdl/01_orbital.patch @@ -13,10 +13,10 @@ diff -rupNw source-original/build-scripts/config.sub source/build-scripts/config diff -rupNw source-original/configure.in source/configure.in --- source-original/configure.in 2012-01-19 07:30:05.000000000 +0100 +++ source/configure.in 2018-04-23 17:03:35.533588029 +0200 -@@ -1646,6 +1646,19 @@ AC_HELP_STRING([--enable-video-dummy], [ +@@ -1646,6 +1646,20 @@ AC_HELP_STRING([--enable-video-dummy], [ fi } - + +dnl Set up the Orbital video driver. +CheckOrbitalVideo() +{ @@ -26,6 +26,7 @@ diff -rupNw source-original/configure.in source/configure.in + if test x$enable_video_orbital = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_ORBITAL) + SOURCES="$SOURCES $srcdir/src/video/orbital/*.c" ++ SDL_LIBS="$SDL_LIBS -Wl,--gc-sections -lorbital" + have_video=yes + fi +} @@ -671,13 +672,13 @@ diff -rupNw source-original/src/video/SDL_gamma.c source/src/video/SDL_gamma.c @@ -35,6 +35,9 @@ #define log(x) __ieee754_log(x) #endif - + +#include "e_log.h" +#define log(x) __ieee754_log(x) + #include "SDL_sysvideo.h" - - + + diff -rupNw source-original/src/video/SDL_sysvideo.h source/src/video/SDL_sysvideo.h --- source-original/src/video/SDL_sysvideo.h 2012-01-19 07:30:06.000000000 +0100 +++ source/src/video/SDL_sysvideo.h 2018-04-23 17:03:35.537588257 +0200 @@ -711,6 +712,6 @@ diff -rupNw source-original/src/video/SDL_video.c source/src/video/SDL_video.c - SDL_ClearSurface(mode); + // Causes blinking under Orbital + //SDL_ClearSurface(mode); - + /* Now adjust the offsets to match the desired mode */ video->offset_x = (mode->w-width)/2;