[MacPorts] #64994: WIP on webkit2 for PowerPC
MacPorts
noreply at macports.org
Tue Apr 12 14:38:28 UTC 2022
#64994: WIP on webkit2 for PowerPC
-------------------------------------------+-------------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Keywords: powerpc, leopard, snowleopard | Port: webkit2-gtk
-------------------------------------------+-------------------------
I have finally built all major dependencies for webkit2-gtk and rewritten
existing patches for @2.36.0.
However, unsurprisingly, once I sorted out all configure errors, the build
did not proceed much further :)
Any idea why Cmake fails to identify the arch?
{{{
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/Threading.h:42,
from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.h:32,
from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.cpp:27:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/PlatformRegisters.h:60:2:
error: #error Unknown Architecture
60 | #error Unknown Architecture
| ^~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/PlatformRegisters.h:63:8:
error: 'PlatformRegisters' does not name a type
63 | inline PlatformRegisters& registersFromUContext(ucontext_t*
ucontext)
| ^~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/PlatformRegisters.h:145:12:
error: 'PlatformRegisters' has not been declared in 'WTF'
145 | using WTF::PlatformRegisters;
| ^~~~~~~~~~~~~~~~~
In file included from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.h:32,
from
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/AutomaticThread.cpp:27:
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.36.0/Source/WTF/wtf/Threading.h:183:72:
error: 'PlatformRegisters' has not been declared
183 | WTF_EXPORT_PRIVATE size_t getRegisters(const
ThreadSuspendLocker&, PlatformRegisters&);
|
^~~~~~~~~~~~~~~~~
}}}
Here is the source code:
{{{
namespace WTF {
#if OS(DARWIN)
#if CPU(X86)
typedef i386_thread_state_t PlatformRegisters;
#elif CPU(X86_64)
typedef x86_thread_state64_t PlatformRegisters;
#elif CPU(PPC)
typedef ppc_thread_state_t PlatformRegisters;
#elif CPU(PPC64)
typedef ppc_thread_state64_t PlatformRegisters;
#elif CPU(ARM)
typedef arm_thread_state_t PlatformRegisters;
#elif CPU(ARM64)
typedef arm_thread_state64_t PlatformRegisters;
#else
#error Unknown Architecture
#endif
inline PlatformRegisters& registersFromUContext(ucontext_t* ucontext)
{
return ucontext->uc_mcontext->__ss;
}
#elif OS(WINDOWS)
using PlatformRegisters = CONTEXT;
#elif HAVE(MACHINE_CONTEXT)
struct PlatformRegisters {
mcontext_t machineContext;
};
inline PlatformRegisters& registersFromUContext(ucontext_t* ucontext)
{
#if OS(OPENBSD)
return *bitwise_cast<PlatformRegisters*>(ucontext);
#elif CPU(PPC)
return
*bitwise_cast<PlatformRegisters*>(ucontext->uc_mcontext.uc_regs);
#else
return *bitwise_cast<PlatformRegisters*>(&ucontext->uc_mcontext);
#endif
}
#else
struct PlatformRegisters {
void* stackPointer;
};
#endif
} // namespace WTF
}}}
I also tried to specify the arch directly in configure.args, it made no
effect. (Argument does get passed to Cmake, but the same error occurs.)
From what I can see, no patches were applied to this header file
(explicitly, I did not add PPC there, it is there in the source code).
P. S. I no one objects, we may keep this ticket as a track record and
invitation to participate. If no one joins in, I will slowly post updates
from my end.
--
Ticket URL: <https://trac.macports.org/ticket/64994>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list