Summary: | dev-lang/erlang-26.2.1 fails to compile on x86 with gcc-14: erl_bits.c:551:9: error: invalid conversion from type _Float16 without option -msse2] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Matthew Smith <matthew> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | frej.drejhammar, matthew, toolchain |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 914580, 941869 | ||
Attachments: | build.log |
Description
Agostino Sarubbo
![]() Created attachment 884795 [details]
build.log
build log and emerge --info
I think that this may be a regression in GCC 14. If the target doesn't support _Float16, GCC 13 errors on sizeof(_Float16), while GCC 14 returns 2. Making the configure script detect that _Float16 is supported. Test files: > $ cat sizeof.c > #include <stdio.h> > > int main() { printf("%lu\n", sizeof(_Float16)); } > $ cat cast.c > int main() { > _Float16 a = 0; > double b = (double) a; > } GCC 13 behaviour: > $ gcc-13 -mno-sse2 sizeof.c > sizeof.c: In function ‘main’: > sizeof.c:3:37: error: ‘_Float16’ is not supported on this target > 3 | int main() { printf("%lu\n", sizeof(_Float16)); } > | ^~~~~~~~ > $ gcc-13 -mno-sse2 cast.c > cast.c: In function ‘main’: > cast.c:2:3: error: ‘_Float16’ is not supported on this target > 2 | _Float16 a = 0; > | ^~~~~~~~ GCC 14 behaviour: > $ gcc-14 -mno-sse2 sizeof.c > $ ./a.out > 2 > $ gcc-14 -mno-sse2 cast.c > cast.c: In function ‘main’: > cast.c:2:3: error: invalid conversion to type ‘_Float16’ without option ‘-msse2’ > 2 | _Float16 a = 0; > | ^~~~~~~~ > cast.c:3:3: error: invalid conversion from type ‘_Float16’ without option ‘-msse2’ > 3 | double b = (double) a; > | ^~~~~~ This is fixed upstream in https://github.com/erlang/otp/pull/9070/commits/c4e95057d269d7e10bfedb51f0c1cb46006a34b4, unfortunately it does not appear to have been back-ported to OTP 26 and 27. Applying the previously mentioned commit as a user patch, fixes the problem for at least 27.2. |