Error "Unknown architecture." on ppc64le and s390x

# Eike Rathke (2 days ago)

In Fedora rawhide WebKitGTK 2.27.3 fails to build on ppc64le and s390x with

... -c ../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp In file included from ../Source/JavaScriptCore/heap/Heap.h:31, from ../Source/JavaScriptCore/heap/DeferGC.h:29, from ../Source/JavaScriptCore/runtime/ConcurrentJSLock.h:28, from ../Source/JavaScriptCore/bytecode/ArrayProfile.h:28, from ../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:29: ../Source/JavaScriptCore/heap/GCMemoryOperations.h:125:2: error: #error "Unknown architecture." 125 | #error "Unknown architecture." | ^~~ ../Source/JavaScriptCore/heap/GCMemoryOperations.h:241:2: error: #error "Unknown architecture." 241 | #error "Unknown architecture." | ^~~ ../Source/JavaScriptCore/heap/GCMemoryOperations.h:299:2: error: #error "Unknown architecture." 299 | #error "Unknown architecture." | ^~~ In file included from ../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28: ../Source/JavaScriptCore/bytecode/ArithProfile.h:263:38: warning: comparison of promoted ~unsigned with unsigned [-Wsign-compare] 263 | static_assert(specialFastPathBit > ~clearLhsObservedTypeBitMask, "These bits should not intersect and specialFastPathBit should be a higher bit."); | ~~~~~^~~~~~~~ In file included from ../Source/JavaScriptCore/heap/Heap.h:31, from ../Source/JavaScriptCore/heap/DeferGC.h:29, from ../Source/JavaScriptCore/runtime/ConcurrentJSLock.h:28, from ../Source/JavaScriptCore/bytecode/ArrayProfile.h:28, from ../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:29: ../Source/JavaScriptCore/heap/GCMemoryOperations.h: In instantiation of 'void JSC::gcSafeZeroMemory(T, size_t) [with T = JSC::WriteBarrierBase<JSC::Unknown, WTF::DumbValueTraits<JSC::Unknown> >; size_t = long unsigned int]': ../Source/JavaScriptCore/runtime/JSObject.h:1183:101: required from here ../Source/JavaScriptCore/heap/GCMemoryOperations.h:253:40: warning: unused parameter 'dst' [-Wunused-parameter] 253 | ALWAYS_INLINE void gcSafeZeroMemory(T dst, size_t bytes) | ~^~~

Reason apparently is that for USE(JSVALUE64) the path

#if COMPILER(GCC_COMPATIBLE) && USE(JSVALUE64) is hit but only implemented for CPU(X86_64) and CPU(ARM64)

As a quick remedy patching those places out to something like

#if COMPILER(GCC_COMPATIBLE) && 0 for those architectures probably should work to use "the other" implementation, have to try.

Other than that, the #if directives should cater for unknown CPU values and use the default non-GCC implementation.

Thanks Eike

Contact us to advertise here
# Eike Rathke (a day ago)

On Thursday, 2019-11-28 22:15:12 +0100, Eike Rathke wrote:

Other than that, the #if directives should cater for unknown CPU values and use the default non-GCC implementation.

Patch submitted with bugs.webkit.org/show_bug.cgi?id=204701

Eike

Want more features?

Request early access to our private beta of readable email premium.