svn commit: r558381 - head/games/eureka/files

Piotr Kubaj pkubaj at FreeBSD.org
Fri Dec 18 15:09:10 UTC 2020


Author: pkubaj
Date: Fri Dec 18 15:09:10 2020
New Revision: 558381
URL: https://svnweb.freebsd.org/changeset/ports/558381

Log:
  games/eureka: fix build on powerpc64 head
  
  clang can't build this code:
  In file included from src/e_basis.cc:27:
  In file included from src/main.h:86:
  src/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));
  
  Approved by:	tier 2 blanket

Added:
  head/games/eureka/files/patch-src_sys__endian.h   (contents, props changed)

Added: head/games/eureka/files/patch-src_sys__endian.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/eureka/files/patch-src_sys__endian.h	Fri Dec 18 15:09:10 2020	(r558381)
@@ -0,0 +1,11 @@
+--- src/sys_endian.h.orig	2020-12-18 15:02:12 UTC
++++ src/sys_endian.h
+@@ -58,7 +58,7 @@ static inline u16_t UT_Swap16(u16_t x)
+   __asm__("xchgb %b0,%h0" : "=Q" (x) :  "0" (x));
+   return x;
+ }
+-#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
++#elif defined(__GNUC__) && !defined(__clang__) && (defined(__powerpc__) || defined(__ppc__))
+ static inline u16_t UT_Swap16(u16_t x)
+ {
+   u16_t result;


More information about the svn-ports-all mailing list