[llvm-dev] [cfe-dev] [4.0.0 Release] 'final' has been tagged
Khem Raj via llvm-dev
llvm-dev at lists.llvm.org
Tue Mar 14 09:55:35 PDT 2017
On 3/14/17 9:38 AM, Hans Wennborg wrote:
> On Mon, Mar 13, 2017 at 10:09 PM, Khem Raj <raj.khem at gmail.com> wrote:
>> Hi Hans
>>
>> On 3/10/17 1:10 PM, Hans Wennborg wrote:
>>> Hi Khem,
>>>
>>> On Fri, Mar 10, 2017 at 1:03 PM, Khem Raj via llvm-dev
>>> <llvm-dev at lists.llvm.org> wrote:
>>>> On Fri, Mar 10, 2017 at 7:01 AM, Renato Golin via llvm-dev
>>>> <llvm-dev at lists.llvm.org> wrote:
>>>>> ARM and AArch64 looking good, uploaded.
>>>>>
>>>>
>>>> This is not particularly related to this RC but in general with 4.0.0
>>>> I am seeing a failure quite common while building for arm
>>>>
>>>> | ./.libs/libsqlite3.so: undefined reference to `__mulodi4'
>>>> | clang-4.0: error: linker command failed with exit code 1 (use -v to
>>>> see invocation)
>>>> | make: *** [Makefile:509: sqlite3] Error 1
>>>>
>>>> There are few bug reports in bugzilla also reporting similar issue
>>>> e.g.
>>>>
>>>> https://bugs.llvm.org//show_bug.cgi?id=14469
>>>
>>> Many of those bugs are pre-4.0.0. Did you see the same issues with
>>> earlier LLVM versions as well, or are you saying these errors are new
>>> with 4.0.0?
>>>
>>
>> I dug into a bit and here is a reproducer
>>
>> #include <stddef.h>
>> size_t n;
>> size_t s;
>> ptrdiff_t z;
>> main()
>> {
>> return __builtin_mul_overflow(n,s, &z);
>> }
>>
>> compiling with
>> clang --target=armv7l -mfloat-abi=hard hello.c -S
>>
>> This generates the call to __mulodi4
>>
>> same code with gcc does not.
>>
>> I see that sqlite3 as well as m4 package pokes the compiler for these
>> builtins before using them. For clang it uses __has_builtin() to
>> determine if a given builtin is supported before using it.
>>
>> see
>> http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/xalloc-oversized.h
>>
>> That is the source of trouble, since its in gnulib that explains why its
>> showing up in lot of packages.
>>
>> perhaps this commit here
>> http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/xalloc-oversized.h?id=9c919a06435266a88d91ffb9eb3f70a82aa65b4b
>>
>> brings this issue to fore.
>
> I get a __mulodi4 call with your reproducer also with llvm 3.9 and
> 3.8, so I'm not sure this changed on our end. (I also added the
> __has_builtin check from the code you linked, with the same result.)
>
thats right, it worked for me in past because the version of gnulib used
in m4 and sqlite3 was old which did not use __builtin_mul_overflow newer
versions have the new gnulib and hence the problem.
> In any case, it's no good generating calls to functions if they're not
> defined in the runtime.
>
nod
> Can you file a bug about this in the Bugzilla and cc myself and Renato?
There is a bug already, I added you to CC, Renato is already CCed
https://bugs.llvm.org//show_bug.cgi?id=28629
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170314/dde9d776/attachment.sig>
More information about the llvm-dev
mailing list