I found a different way to add -lgcc to the linking step but doing that
is a bit hacky by itself already of course. So I'll keep the extra patch
as a private patch for now, unless people want it added to pkgsrc.
patches/patch-Source_WTF_wtf_CMakeLists.txt:
$NetBSD$
Add -lgcc every time libWTFGTK.a is used. That is more often than
strictly needed (it is sufficient to add it to the single linking step
from the error, but sufficiently far to the end) but I could not find a
better place to add it.
Only needed if compiling with gcc7 if it is not the base system gcc.
--- Source/WTF/wtf/CMakeLists.txt.orig 2019-10-31 20:11:01.546112916 +0000
+++ Source/WTF/wtf/CMakeLists.txt
@@ -496,6 +496,13 @@ list(APPEND WTF_LIBRARIES
ICU::data
ICU::i18n
ICU::uc
+ # [100%] Building CXX object Source/WebKit/CMakeFiles/WebKit.dir/__/__/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-32.cpp.o
+ # [100%] Linking CXX shared library ../../lib/libwebkit2gtk-4.0.so
+ # ../../lib/libWTFGTK.a(MediaTime.cpp.o): In function `WTF::MediaTime::setTimeScale(unsigned int, WTF::MediaTime::RoundingFlags)':
+ # MediaTime.cpp:(.text+0xb13): undefined reference to `__divmodti4'
+ # collect2: error: ld returned 1 exit status
+ # gmake[2]: *** [Source/WebKit/CMakeFiles/WebKit.dir/build.make:7468: lib/libwebkit2gtk-4.0.so.37.39.2] Error 1
+ gcc
)
set(WTF_INTERFACE_LIBRARIES WTF)
-Olaf.
--
Olaf 'Rhialto' Seibert -- rhialto at falu dot nl
___ Anyone who is capable of getting themselves made President should on
\X/ no account be allowed to do the job. --Douglas Adams, "THGTTG"
Attachment:
signature.asc
Description: PGP signature