undefined reference to '__builtin_mul_overflow'

Sebastian Huber sebastian.huber@embedded-brains.de
Fri Feb 25 12:03:09 GMT 2022


Hello Jordi,

On 25/02/2022 12:24, Jordi Sanfeliu via Newlib wrote:
> I'm upgrading to Newlib 4.1.0 version (from Newlib 3.2.0) in my own 
> hobby operating system FiwixOS for i386, and after a successful build 
> with GCC 4.7.4 and Binutils 2.23.2, I found that I'm unable to compile a 
> simple C program:
> 
> # cat test.c
> #include <stdio.h>
> 
> int main(void)
> {
>      printf("newlib version %s\n", _NEWLIB_VERSION);
>      return 0;
> }
> 
> # gcc -o test test.c
> /usr/lib/gcc/i686-pc-fiwix/4.7.4/../../../../i686-pc-fiwix/lib/libc.a(lib_a-callocr.o): 
> In function `_calloc_r':
> /mnt/builds/build-newlib-4.1.0.final/i386-fiwix/newlib/libc/stdlib/../../../../../newlib-4.1.0/newlib/libc/stdlib/mallocr.c:3210: 
> undefined reference to `__builtin_mul_overflow'

this builtin is available since GCC 5. Maybe you should update your GCC 
version or implement __builtin_mul_overflow() in your operating system.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the Newlib mailing list