https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109245

            Bug ID: 109245
           Summary: aarch64 gcc defaults to -moutline-atomics but symbol
                    ‘__aarch64_swp4_sync’ is hidden in libgcc.a
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: songmz1999 at foxmail dot com
  Target Milestone: ---

I found an issue when compiling the connection process using the toolchain
aarch64_gcc12.2.0_glibc2.31.0_fp with the error message:

~/aarch64_gcc12.2.0_glibc2.31.0_fp/aarch64-unknown-linux-gnueabi/bin/.ld:
../../../deploy/oms/bin/omsservice: hidden symbol `__aarch64_swp4_sync' in
~/aarch64_gcc12.2.0_glibc2.31.0_fp/bin/../lib/gcc/aarch64-unknown-linux-gnueabi/12.2.0/libgcc.a(swp_4_5.o)
is referenced by DSO

~/aarch64_gcc12.2.0_glibc2.31.0_fp/aarch64-unknown-linux-gnueabi/bin/.ld: final
link failed: bad value


The solution I've found so far is to enable the -mno-outline-atomics parameter
at compile time. But why does gcc have -moutline-atomics enabled by default,
but when calling the function '__aarch64_swp4_sync', it is hidden in libgcc.a?
Is there a better solution?

Reply via email to