diff options
| author | Tatsuro Shibamura <me@shibayan.jp> | 2020-01-28 07:32:23 +0900 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2020-01-27 14:32:23 -0800 |
| commit | 268d7bb406bef5aea66a79c91d4ebc981c5a9860 (patch) | |
| tree | aeae4e024f0d41a2208a4e62b03e9b1e2cc08b04 | |
| parent | 53f1ae86d038c0ccf7edbbcfda1eaf6c6d271e9e (diff) | |
| download | vcpkg-268d7bb406bef5aea66a79c91d4ebc981c5a9860.tar.gz vcpkg-268d7bb406bef5aea66a79c91d4ebc981c5a9860.zip | |
[sdl2-gfx] Fixed build error ARM64 Windows 10 (#9314)
* [sdl2-gfx] Fixed build error ARM64 Windows 10
* [sdl2-gfx] Update CI baseline
* [sdl2-gfx] Fixed function name
* Revert ci.baseline.txt
* Remove sdl2-gfx:arm64-windows from ci.baseline.txt
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
| -rw-r--r-- | ports/sdl2-gfx/001-lrint-arm64.patch | 26 | ||||
| -rw-r--r-- | ports/sdl2-gfx/CONTROL | 2 | ||||
| -rw-r--r-- | ports/sdl2-gfx/portfile.cmake | 2 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 1 |
4 files changed, 29 insertions, 2 deletions
diff --git a/ports/sdl2-gfx/001-lrint-arm64.patch b/ports/sdl2-gfx/001-lrint-arm64.patch new file mode 100644 index 000000000..50de17973 --- /dev/null +++ b/ports/sdl2-gfx/001-lrint-arm64.patch @@ -0,0 +1,26 @@ +diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c +index f81e6da..91817fd 100755 +--- a/SDL2_gfxPrimitives.c ++++ b/SDL2_gfxPrimitives.c +@@ -1771,8 +1771,20 @@ __declspec(naked) long int + __emit(0xE12FFF1E); // bx lr + } + #pragma warning(pop) ++#elif defined(_M_ARM64) ++#include <intrin.h> ++#pragma warning(push) ++#pragma warning(disable: 4716) ++__declspec(naked) long ++ lrint (double f) ++{ ++ __emit(0x1e674000); // frintx d0, d0 ++ __emit(0x9e780000); // fcvtzs x0, d0 ++ __emit(0xd65f03c0); // ret ++} ++#pragma warning(pop) + #else +-#error lrint needed for MSVC on non X86/AMD64/ARM targets. ++#error lrint needed for MSVC on non X86/AMD64/ARM/ARM64 targets. + #endif + #endif + diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL index de1005b47..bd6b4f6b2 100644 --- a/ports/sdl2-gfx/CONTROL +++ b/ports/sdl2-gfx/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-gfx -Version: 1.0.4-4 +Version: 1.0.4-5 Build-Depends: sdl2 Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake index f547c1edd..802b1a2c5 100644 --- a/ports/sdl2-gfx/portfile.cmake +++ b/ports/sdl2-gfx/portfile.cmake @@ -12,6 +12,8 @@ vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF ${VERSION} + PATCHES + 001-lrint-arm64.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 31152b319..02da3bcd9 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1526,7 +1526,6 @@ sdformat6:x64-linux=ignore sdl1:arm-uwp=fail
sdl1:x64-uwp=fail
sdl1:x64-osx=fail
-sdl2-gfx:arm64-windows=fail
sdl2-gfx:x64-linux=fail
sdl2-gfx:x64-osx=fail
sdl2-image:arm-uwp=fail
|
