Re: devel/arm-none-eabi-newlib headers inconsistencies (not functional) or am I misusing something?

José Pérez <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
Hi,

El 2023-05-27 15:21, Mark Millard escribió:
> On May 27, 2023, at 05:27, Mark Millard <[email protected]> wrote:
> It is unclear what you are doing for linking.

Linking is another chapter that will be written after we can obtain 
objects.

For the time being I am buinding a number of tests to see if the headers 
are functional or not, following your suggestion to add newlib ports 
header path first, and then arm-noabi-gcc header paths. I.e.
#include <...> search starts here:
  /usr/local/arm-none-eabi/include
  /usr/local/lib/gcc/arm-none-eabi/11.3.0/include
  /usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed
End of search list.

In this scenario the next problem I am hitting is this one:
% arm-none-eabi-gcc test_stdatomic.c -c -g -DDEBUG -pipe -nostdinc 
-isystem /usr/local/arm-none-eabi/include -isystem 
/usr/local/lib/gcc/arm-none-eabi/11.3.0/include -isystem 
/usr/local/lib/gcc/arm-none-eabi/11.3.0/include-fixed -o 
test_stdatomic.o
In file included from test_stdatomic.c:2:
/usr/local/arm-none-eabi/include/stdatomic.h: In function 
'atomic_flag_test_and_set_explicit':
/usr/local/arm-none-eabi/include/stdatomic.h:386:17: error: request for 
member '__val' in something not a structure or union
   386 |         return (atomic_exchange_explicit(&__object->__flag, 1, 
__order));
       |                 ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/arm-none-eabi/include/stdatomic.h: In function 
'atomic_flag_clear_explicit':
/usr/local/arm-none-eabi/include/stdatomic.h:393:9: error: request for 
member '__val' in something not a structure or union
   393 |         atomic_store_explicit(&__object->__flag, 0, __order);
       |         ^~~~~~~~~~~~~~~~~~~~~

% cat test_stdatomic.c
#include <stdint.h>
#include <stdatomic.h>

int main(int argc, char *argv[]) {
   return 0;
}

Any suggestion before I patch 
/usr/local/arm-none-eabi/include/stdatomic.h to make it work?

Thank you.

BR,

-- 
José Pérez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.