[Webkit-unassigned] [Bug 190208] New: clang Linux build cannot link because of __builtin_mul_overflow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 2 10:14:36 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=190208

            Bug ID: 190208
           Summary: clang Linux build cannot link because of
                    __builtin_mul_overflow
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: olivier.blin at softathome.com
                CC: darin at apple.com, guijemont at igalia.com,
                    loic.yhuel at softathome.com, mark.lam at apple.com,
                    sam at webkit.org, yusukesuzuki at slowstart.org,
                    zan at falconsigh.net

Since r183319, __builtin_mul_overflow is used with gcc or clang in WTF/wtf/CheckedArithmetic.h

This leads to a link failure when WebKit is built on Linux with clang and the libgcc runtime:
 BINXX  WPELauncher
output/staging/usr/lib/libWPEWebKit-0.1.so: undefined reference to `__mulodi4'
collect2: error: ld returned 1 exit status 

This is because clang generates code using the __mulodi4 symbol for __builtin_mul_overflow.
But this symbol is available only in compiler-rt, and not in the libgcc runtime used by most Linux distributions of clang.

See also this upstream clang bug: https://bugs.llvm.org/show_bug.cgi?id=28629

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181002/9679c893/attachment.html>


More information about the webkit-unassigned mailing list