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)))

14.0.5 log 13.0.0 log

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

Most upvoted comments

I submitted LIJI32/SameBoy#501 to fix the build error; it boils down to passing -c embedded to the rgbgfx invocation.