rgbds: FreeBSD: v0.6.0 clang build fails
Hello,
v0.6.0 doesn’t build with clang 14.0.5 and 13.0.0:
cc -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -pedantic -std=gnu11 -I include -D_POSIX_C_SOURCE=200809L -D_ISOC11_SOURCE -c -o src/asm/main.o src/asm/main.c
--- src/gfx/pal_spec.o ---
In file included from src/gfx/pal_spec.cpp:18:
In file included from /usr/include/c++/v1/fstream:185:
/usr/include/c++/v1/__locale:637:16: error: use of undeclared identifier 'isascii'
return isascii(__c) ? (__tab_[static_cast<int>(__c)] & __m) !=0 : false;
^
/usr/include/c++/v1/__locale:644:22: error: use of undeclared identifier 'isascii'
*__vec = isascii(*__low) ? __tab_[static_cast<int>(*__low)] : 0;
^
/usr/include/c++/v1/__locale:652:17: error: use of undeclared identifier 'isascii'
if (isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m))
^
/usr/include/c++/v1/__locale:661:19: error: use of undeclared identifier 'isascii'
if (!(isascii(*__low) && (__tab_[static_cast<int>(*__low)] & __m)))
But it build fine with clang 10.0.1: log
Any hints?
Thanks
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (10 by maintainers)
Commits related to this issue
- devel/rgbds: Update to 0.6.0 - Workaround clang build failure on 13.1 and 14 current with USE_GCC https://github.com/gbdev/rgbds/issues/1091 ChangeLog: https://github.com/gbdev/rgbds/releases/ta... — committed to freebsd/freebsd-ports by nunotexbsd 2 years ago
- devel/rgbds: Fix build with clang - yank _POSIX_C_SOURCE because it breaks the build See also: https://github.com/gbdev/rgbds/issues/1091 https://github.com/gbdev/rgbds/issues/1111 Reported by: da... — committed to freebsd/freebsd-ports by nunotexbsd a year ago
I submitted LIJI32/SameBoy#501 to fix the build error; it boils down to passing
-c embedded
to thergbgfx
invocation.