forked from Lainports/freebsd-ports
games/oblige: fix build on powerpc*
gui/sys_endian.h:66:58: error: unsupported inline asm: input with type 'int' matching output with type 'u16_t' (aka 'unsigned short')
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
~~~~~~ ^~~~~~
This commit is contained in:
parent
6a56ecb355
commit
6483d7e6e5
3 changed files with 30 additions and 1 deletions
|
|
@ -17,7 +17,8 @@ LIB_DEPENDS= libfltk.so:x11-toolkits/fltk \
|
|||
libphysfs.so:devel/physfs \
|
||||
libpng.so:graphics/png
|
||||
|
||||
USES= gmake jpeg xorg zip
|
||||
USES= dos2unix gmake jpeg xorg zip
|
||||
DOS2UNIX_FILES= ajpoly_src/pl_endian.h gui/sys_endian.h
|
||||
USE_XORG= x11 xcursor xext xfixes xft xinerama xrender
|
||||
WRKSRC= ${WRKDIR}/Oblige-${PORTVERSION}-source
|
||||
|
||||
|
|
|
|||
14
games/oblige/files/patch-ajpoly__src_pl__endian.h
Normal file
14
games/oblige/files/patch-ajpoly__src_pl__endian.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- ajpoly_src/pl_endian.h.orig 2023-07-31 15:43:19 UTC
|
||||
+++ ajpoly_src/pl_endian.h
|
||||
@@ -57,10 +57,7 @@ static inline u16_t UT_Swap16(u16_t x)
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
static inline u16_t UT_Swap16(u16_t x)
|
||||
{
|
||||
- u16_t result;
|
||||
-
|
||||
- __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
||||
- return result;
|
||||
+ return __builtin_bswap16(x);
|
||||
}
|
||||
#else
|
||||
static inline u16_t UT_Swap16(u16_t x) {
|
||||
14
games/oblige/files/patch-gui_sys__endian.h
Normal file
14
games/oblige/files/patch-gui_sys__endian.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- gui/sys_endian.h.orig 2023-07-31 15:43:29 UTC
|
||||
+++ gui/sys_endian.h
|
||||
@@ -61,10 +61,7 @@ static inline u16_t UT_Swap16(u16_t x)
|
||||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
static inline u16_t UT_Swap16(u16_t x)
|
||||
{
|
||||
- u16_t result;
|
||||
-
|
||||
- __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
||||
- return result;
|
||||
+ return __builtin_bswap16(x);
|
||||
}
|
||||
#else
|
||||
static inline u16_t UT_Swap16(u16_t x) {
|
||||
Loading…
Add table
Reference in a new issue