Project

General

Profile

Actions

Bug #17646

open

Check for `__builtin_mul_overflow` with `long long` arguments

Added by xtkoba (Tee KOBAYASHI) about 2 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-02-19 master a319c04818) [i686-linux]
[ruby-core:<unknown>]

Description

For some 32-bit targets, when Clang/LLVM is set up without compiler-rt, __builtin_mul_overflow does exist but is not usable with long long arguments. In this situation, make stops with the following message:

linking miniruby
ld.lld: error: undefined symbol: __mulodi4
>>> referenced by process.c:8037
>>>               process.o:(timetick2integer)
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:278: miniruby] Error 1

The usability of __builtin_mul_overflow with long long arguments have to be checked within ./configure. A patch is attached for that. Note that optimizations have to be disabled for the compilation of the test code.


Files

No data to display

Actions

Also available in: Atom PDF