Monday, April 27, 2020

[macppc] Unbreak devel/glog

Hi,

glog fails to build in the current macppc bulk:

> /usr/obj/ports/glog-0.3.5/glog-0.3.5/src/stacktrace_powerpc-inl.h:
> 121:2: error: Need to specify the PPC ABI for your archiecture.

This is once again due to _CALL_SYSV not being defined by clang,
*but* they've already planned that case, so we just need to
add ourselves to an ifdef.

I'm trying to upstream that change [0], allowing glog to be built on
macppc [1].

OK?

Charlène.


[0] https://github.com/google/glog/pull/545
[1] https://bin.charlenew.xyz/macppc/paths/devel/glog.log


Index: patches/patch-src_stacktrace_powerpc-inl_h
===================================================================
RCS file: patches/patch-src_stacktrace_powerpc-inl_h
diff -N patches/patch-src_stacktrace_powerpc-inl_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_stacktrace_powerpc-inl_h 27 Apr 2020 14:36:58 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix the lack of _CALL_SYSV on powerpc with clang, from:
+https://github.com/google/glog/pull/545
+
+Index: src/stacktrace_powerpc-inl.h
+--- src/stacktrace_powerpc-inl.h.orig
++++ src/stacktrace_powerpc-inl.h
+@@ -114,7 +114,7 @@ int GetStackTrace(void** result, int max_depth, int sk
+ #elif defined(__APPLE__) || ((defined(__linux) || defined(__linux__)) && defined(__PPC64__))
+ // This check is in case the compiler doesn't define _CALL_AIX/etc.
+ result[n++] = *(sp+2);
+-#elif defined(__linux)
++#elif defined(__linux) || defined(__OpenBSD__)
+ // This check is in case the compiler doesn't define _CALL_SYSV.
+ result[n++] = *(sp+1);
+ #else

No comments:

Post a Comment