freemint / m68k-atari-mint-gcc

Fork of GNU's gcc with support for the m68k-atari-mint target
https://github.com/freemint/m68k-atari-mint-gcc/wiki
Other
26 stars 7 forks source link

libstdc++-v3: "No 2-byte compare-and-swap" #42

Closed mikrosk closed 5 months ago

mikrosk commented 5 months ago

I have just noticed this difference: for -m68000 and -mcpu=5475 multilibs the error from title can be seen in config.log. This results in using "checking for lock policy for shared_ptr reference counts ... mutex" instead of atomic. For -m68020-60 it results in atomic (and the config.log test succeeds).

Is this OK?

Also, while we are at it, mint-atomic.c complains quite a lot during compilation:

/home/mikro/atari/compilers/m68k-atari-mint-build/m68k-atari-mint-gcc-gcc-13-mintelf-m68000-cross-preliminary/./gcc/xgcc -B/home/mikro/atari/compilers/m68k-atari-mint-build/m68k-atari-mint-gcc-gcc-13-mintelf-m68000-cross-preliminary/./gcc/ -B/home/mikro/gnu-tools/m68000/m68k-atari-mintelf/bin/ -B/home/mikro/gnu-tools/m68000/m68k-atari-mintelf/lib/ -isystem /home/mikro/gnu-tools/m68000/m68k-atari-mintelf/include -isystem /home/mikro/gnu-tools/m68000/m68k-atari-mintelf/sys-include    -g -O2 -m68020-60 -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc -I../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/. -I../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/../gcc -I../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/../include  -DHAVE_CC_TLS   -o mint-atomic.o -MT mint-atomic.o -MD -MP -MF mint-atomic.dep  -c ../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c -fvisibility=hidden -DHIDE_EXPORTS
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_add_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:118:1: note: in expansion of macro 'WORD_SYNC_OP'
  118 | WORD_SYNC_OP (add,   , +, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_sub_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:119:1: note: in expansion of macro 'WORD_SYNC_OP'
  119 | WORD_SYNC_OP (sub,   , -, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_or_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:120:1: note: in expansion of macro 'WORD_SYNC_OP'
  120 | WORD_SYNC_OP (or,    , |, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_and_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:121:1: note: in expansion of macro 'WORD_SYNC_OP'
  121 | WORD_SYNC_OP (and,   , &, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_xor_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:122:1: note: in expansion of macro 'WORD_SYNC_OP'
  122 | WORD_SYNC_OP (xor,   , ^, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_nand_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:123:1: note: in expansion of macro 'WORD_SYNC_OP'
  123 | WORD_SYNC_OP (nand, ~, &, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_add_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:125:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  125 | SUBWORD_SYNC_OP (add,   , +, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_sub_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:126:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  126 | SUBWORD_SYNC_OP (sub,   , -, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_or_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:127:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  127 | SUBWORD_SYNC_OP (or,    , |, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_and_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:128:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  128 | SUBWORD_SYNC_OP (and,   , &, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_xor_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:129:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  129 | SUBWORD_SYNC_OP (xor,   , ^, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_nand_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:130:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  130 | SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_add_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:132:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  132 | SUBWORD_SYNC_OP (add,   , +, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_sub_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:133:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  133 | SUBWORD_SYNC_OP (sub,   , -, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_or_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:134:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  134 | SUBWORD_SYNC_OP (or,    , |, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_and_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:135:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  135 | SUBWORD_SYNC_OP (and,   , &, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_xor_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:136:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  136 | SUBWORD_SYNC_OP (xor,   , ^, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:78:32: warning: conflicting types for built-in function '__sync_fetch_and_nand_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   78 | #define NAME_oldval(OP, WIDTH) __sync_fetch_and_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:137:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  137 | SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_add_and_fetch_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_newval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:139:1: note: in expansion of macro 'WORD_SYNC_OP'
  139 | WORD_SYNC_OP (add,   , +, newval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_sub_and_fetch_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_newval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:140:1: note: in expansion of macro 'WORD_SYNC_OP'
  140 | WORD_SYNC_OP (sub,   , -, newval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_or_and_fetch_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_newval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:141:1: note: in expansion of macro 'WORD_SYNC_OP'
  141 | WORD_SYNC_OP (or,    , |, newval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_and_and_fetch_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_newval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:142:1: note: in expansion of macro 'WORD_SYNC_OP'
  142 | WORD_SYNC_OP (and,   , &, newval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_xor_and_fetch_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_newval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:143:1: note: in expansion of macro 'WORD_SYNC_OP'
  143 | WORD_SYNC_OP (xor,   , ^, newval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_nand_and_fetch_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_newval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:144:1: note: in expansion of macro 'WORD_SYNC_OP'
  144 | WORD_SYNC_OP (nand, ~, &, newval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_add_and_fetch_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:146:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  146 | SUBWORD_SYNC_OP (add,   , +, unsigned short, 2, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_sub_and_fetch_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:147:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  147 | SUBWORD_SYNC_OP (sub,   , -, unsigned short, 2, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_or_and_fetch_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:148:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  148 | SUBWORD_SYNC_OP (or,    , |, unsigned short, 2, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_and_and_fetch_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:149:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  149 | SUBWORD_SYNC_OP (and,   , &, unsigned short, 2, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_xor_and_fetch_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:150:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  150 | SUBWORD_SYNC_OP (xor,   , ^, unsigned short, 2, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_nand_and_fetch_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:151:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  151 | SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_add_and_fetch_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:153:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  153 | SUBWORD_SYNC_OP (add,   , +, unsigned char, 1, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_sub_and_fetch_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:154:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  154 | SUBWORD_SYNC_OP (sub,   , -, unsigned char, 1, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_or_and_fetch_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:155:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  155 | SUBWORD_SYNC_OP (or,    , |, unsigned char, 1, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_and_and_fetch_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:156:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  156 | SUBWORD_SYNC_OP (and,   , &, unsigned char, 1, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_xor_and_fetch_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:157:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  157 | SUBWORD_SYNC_OP (xor,   , ^, unsigned char, 1, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:79:32: warning: conflicting types for built-in function '__sync_nand_and_fetch_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
   79 | #define NAME_newval(OP, WIDTH) __sync_##OP##_and_fetch_##WIDTH
      |                                ^~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_newval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:158:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  158 | SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:161:1: warning: conflicting types for built-in function '__sync_val_compare_and_swap_4'; expected 'unsigned int(volatile void *, unsigned int,  unsigned int)' [-Wbuiltin-declaration-mismatch]
  161 | __sync_val_compare_and_swap_4 (uint32_t *ptr, uint32_t oldval, uint32_t newval)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:167:1: warning: conflicting types for built-in function '__sync_bool_compare_and_swap_4'; expected '_Bool(volatile void *, unsigned int,  unsigned int)' [-Wbuiltin-declaration-mismatch]
  167 | __sync_bool_compare_and_swap_4 (uint32_t *ptr, uint32_t oldval,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:175:3: warning: conflicting types for built-in function '__sync_val_compare_and_swap_2'; expected 'short unsigned int(volatile void *, short unsigned int,  short unsigned int)' [-Wbuiltin-declaration-mismatch]
  175 |   __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE soldval,         \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:199:1: note: in expansion of macro 'SUBWORD_VAL_CAS'
  199 | SUBWORD_VAL_CAS (unsigned short, 2)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:175:3: warning: conflicting types for built-in function '__sync_val_compare_and_swap_1'; expected 'unsigned char(volatile void *, unsigned char,  unsigned char)' [-Wbuiltin-declaration-mismatch]
  175 |   __sync_val_compare_and_swap_##WIDTH (TYPE *ptr, TYPE soldval,         \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:200:1: note: in expansion of macro 'SUBWORD_VAL_CAS'
  200 | SUBWORD_VAL_CAS (unsigned char,  1)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:204:3: warning: conflicting types for built-in function '__sync_bool_compare_and_swap_2'; expected '_Bool(volatile void *, short unsigned int,  short unsigned int)' [-Wbuiltin-declaration-mismatch]
  204 |   __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval,         \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:211:1: note: in expansion of macro 'SUBWORD_BOOL_CAS'
  211 | SUBWORD_BOOL_CAS (unsigned short, 2)
      | ^~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:204:3: warning: conflicting types for built-in function '__sync_bool_compare_and_swap_1'; expected '_Bool(volatile void *, unsigned char,  unsigned char)' [-Wbuiltin-declaration-mismatch]
  204 |   __sync_bool_compare_and_swap_##WIDTH (TYPE *ptr, TYPE oldval,         \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:212:1: note: in expansion of macro 'SUBWORD_BOOL_CAS'
  212 | SUBWORD_BOOL_CAS (unsigned char,  1)
      | ^~~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:215:32: warning: conflicting types for built-in function '__sync_lock_test_and_set_4'; expected 'unsigned int(volatile void *, unsigned int)' [-Wbuiltin-declaration-mismatch]
  215 | #define NAME_oldval(OP, WIDTH) __sync_lock_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:83:3: note: in expansion of macro 'NAME_oldval'
   83 |   NAME##_##RETURN (OP, 4) (uint32_t *ptr, uint32_t val)                 \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:220:1: note: in expansion of macro 'WORD_SYNC_OP'
  220 | WORD_SYNC_OP (test_and_set, , COMMA, oldval)
      | ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:215:32: warning: conflicting types for built-in function '__sync_lock_test_and_set_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch]
  215 | #define NAME_oldval(OP, WIDTH) __sync_lock_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:221:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  221 | SUBWORD_SYNC_OP (test_and_set, , COMMA, unsigned char, 1, oldval)
      | ^~~~~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:215:32: warning: conflicting types for built-in function '__sync_lock_test_and_set_2'; expected 'short unsigned int(volatile void *, short unsigned int)' [-Wbuiltin-declaration-mismatch]
  215 | #define NAME_oldval(OP, WIDTH) __sync_lock_##OP##_##WIDTH
      |                                ^~~~~~~~~~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:98:3: note: in expansion of macro 'NAME_oldval'
   98 |   NAME##_##RETURN (OP, WIDTH) (TYPE *ptr, TYPE sval)                    \
      |   ^~~~
../../../../downloads/m68k-atari-mint-gcc-gcc-13-mintelf/libgcc/config/m68k/mint-atomic.c:222:1: note: in expansion of macro 'SUBWORD_SYNC_OP'
  222 | SUBWORD_SYNC_OP (test_and_set, , COMMA, unsigned short, 2, oldval)
      | ^~~~~~~~~~~~~~~
th-otto commented 5 months ago

Is this OK?

I think yes. The configure script checks for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 being defined, and that is set here: https://github.com/freemint/m68k-atari-mint-gcc/blob/4598322acf7f9abe94721449c100f782185f05df/gcc/c-family/c-cppbuiltin.c#L644-L654

HAVE_atomic_compare_and_swap is defined indirectly by https://github.com/freemint/m68k-atari-mint-gcc/blob/4598322acf7f9abe94721449c100f782185f05df/gcc/config/m68k/sync.md#L21 only for TARGET_CAS, so only for m68020

Falling back to mutexes is of course sub-optimal, but there is actually no other instruction for m68k that guarantees atomic operation. Question is only whether that is relevant on a single-threaded system.

mikrosk commented 5 months ago

Thanks for the quick check.

Any idea where the flood of warnings comes from?

th-otto commented 5 months ago

Maybe something missing in your patch? I don't get that warnings when compiling from my repo.

Edit: see https://github.com/freemint/m68k-atari-mint-gcc/blob/b3351d5c9bd987f52f7ece55713b855656d5cb86/libgcc/config/m68k/mint-atomic.c#L83 vs https://github.com/th-otto/m68k-atari-mint-gcc/blob/25ba96f5a5dff3a9b09ca44d6bb5d23468d36da9/libgcc/config/m68k/mint-atomic.c#L87

mikrosk commented 5 months ago

It wasn't missing as such, it's just you pushed an updated version of mint-atomic.c into your gcc-13 branch while Vincent backported the original gcc-7 patch into gcc-13.

I see there's a lot of changes (even directly mint-related) in your gcc-13 branch but I'm unable to judge their usefulness (especially if they come from your initial m68k-atari-mintelf commit) so if you can think of similarly useful (and ideally mintelf specific only) we can consider adding it to the official branch as well.

th-otto commented 5 months ago

That's why i made up this list : https://github.com/freemint/m68k-atari-mint-gcc/issues/17

BTW, a few day ago, gcc 13.3.0 was released.

vinriviere commented 5 months ago

FYI, I upgraded my mintelf branch yesterday with GCC 13.3.0, and I rebuilt my Ubuntu binaries. You can see the build log. And indeed, the many mint-atomic.c warnings are present.

The mint-atomic.c file comes from that commit: https://github.com/vinriviere/m68k-atari-mint-gcc/commit/e433e054077fcd2a3c4eda1e8f65ceee209218bd It mentions @th-otto as author and @mikrosk as committer. I haven't hacked that file.

th-otto commented 5 months ago

Yes that file was originally for gcc-7, but when porting it to gcc-13 i think i had to adapt it a bit. But since this functions are not called directly, but by compiler builtins emitting library calls, i think those warnings are harmless, just irritating and annoying.

Edit: i see --with-sysroot=$PWD/sys-root in the log file. Are you sure this was intended?

mikrosk commented 5 months ago

Anyway, it's pushed to our branch now, so feel free to fast-forward it.

vinriviere commented 5 months ago

Edit: i see --with-sysroot=$PWD/sys-root in the log file. Are you sure this was intended?

This is a mistake, about another topic discussed in https://github.com/freemint/m68k-atari-mint-gcc/issues/38 . I will fix it later.

vinriviere commented 5 months ago

Anyway, it's pushed to our branch now, so feel free to fast-forward it.

Thanks, I've just cherry-picked it to my gcc-13-mintelf branch.