public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
@ 2024-02-19  4:47 sjames at gcc dot gnu.org
  2024-02-19  4:51 ` [Bug target/113986] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-19  4:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113986
           Summary: [14 regression] Build failure on aarch64-linux-musl
                    (error: 'export_load_16' aliased to undefined symbol
                    'libat_load_16')
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: csfore at posteo dot net
  Target Milestone: ---

Created attachment 57458
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57458&action=edit
build.log.xz

This is with the patch from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113971#c2 to get past that error.

Reported by Christopher Fore.
```
/bin/sh ./libtool  --tag=CC   --mode=compile
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/build/./gcc/xgcc
-B/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/build/./gcc/
-B/usr/aarch64-gentoo-linux-musl/bin/ -B/usr/aarch64-gentoo-linux-musl/lib/
-isystem /usr/aarch64-gentoo-linux-musl/include -isystem
/usr/aarch64-gentoo-linux-musl/sys-include   -fchecking=1 -DHAVE_CONFIG_H
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/config/aarch64
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/config/linux/aarch64
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/config/posix
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic
-I.    -mno-outline-atomics -Wall   -pthread -g -pipe -O2  -DN=16  -c -o
load_16_.lo
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/load_n.c
In file included from
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/load_n.c:25:
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/libatomic_i.h:288:40:
error: 'export_load_16' aliased to undefined symbol 'libat_load_16'
  288 |         extern typeof(C2(libat_,X)) C2(export_,X)               \
      |                                        ^~~~~~~
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/libatomic_i.h:40:25:
note: in definition of macro 'C2_'
   40 | #define C2_(X,Y)        X ## Y
      |                         ^
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/libatomic_i.h:288:37:
note: in expansion of macro 'C2'
  288 |         extern typeof(C2(libat_,X)) C2(export_,X)               \
      |                                     ^~
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/load_n.c:115:1:
note: in expansion of macro 'EXPORT_ALIAS'
  115 | EXPORT_ALIAS (SIZE(load));
      | ^~~~~~~~~~~~
make[4]: *** [Makefile:900: load_16_.lo] Error 1
make[4]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/build/aarch64-gentoo-linux-musl/libatomic'
make[3]: *** [Makefile:651: all-recursive] Error 1
```

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
@ 2024-02-19  4:51 ` pinskia at gcc dot gnu.org
  2024-02-19  5:19 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-19  4:51 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build
   Target Milestone|---                         |14.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
  2024-02-19  4:51 ` [Bug target/113986] " pinskia at gcc dot gnu.org
@ 2024-02-19  5:19 ` pinskia at gcc dot gnu.org
  2024-02-19 22:41 ` [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled " wilco at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-19  5:19 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilco at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-02-19
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am 99% sure it was caused by r14-6589-g3fa689f6ed8387 .

It is reproducible with --disable-gnu-indirect-function on the gcc configure
line for a glibc build even without the patch for PR 113971 so confirmed. 


Moving the definition of DONE for N==16 case to be under the `#if HAVE_IFUNC`
case fixes the issue. I don't know if that is the correct fix or not ...

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
  2024-02-19  4:51 ` [Bug target/113986] " pinskia at gcc dot gnu.org
  2024-02-19  5:19 ` pinskia at gcc dot gnu.org
@ 2024-02-19 22:41 ` wilco at gcc dot gnu.org
  2024-02-19 22:46 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wilco at gcc dot gnu.org @ 2024-02-19 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |wilco at gcc dot gnu.org

--- Comment #2 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I am 99% sure it was caused by r14-6589-g3fa689f6ed8387 .
> 
> It is reproducible with --disable-gnu-indirect-function on the gcc configure
> line for a glibc build even without the patch for PR 113971 so confirmed. 
> 
> 
> Moving the definition of DONE for N==16 case to be under the `#if
> HAVE_IFUNC` case fixes the issue. I don't know if that is the correct fix or
> not ...

Confirmed. I never heard about that config - at the time I tried it on an old
system with GCC4.8 and that built and passed all tests. I can't see a reason to
ever switch off ifuncs...

The !HAVE_IFUNC case needs to also define IFUNC_ALT 1 and atomic_16.S must add
aliases to __atomic_load_16 etc. Then it works fine. I'll send a patch.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-19 22:41 ` [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled " wilco at gcc dot gnu.org
@ 2024-02-19 22:46 ` pinskia at gcc dot gnu.org
  2024-02-23 16:41 ` wilco at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-19 22:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Wilco from comment #2)
> Confirmed. I never heard about that config - at the time I tried it on an
> old system with GCC4.8 and that built and passed all tests. I can't see a
> reason to ever switch off ifuncs...

The only reason is to test it without ifuncs. Musl libc unlike glibc does not
have ifunc support. Why because it is supposed to be an "embedded" libc but I
am not sure if that is not a good reason not support ifuncs really because I
can see an use case between 2 different generations of SoCs using the same
rootfs to run an application and such.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-02-19 22:46 ` pinskia at gcc dot gnu.org
@ 2024-02-23 16:41 ` wilco at gcc dot gnu.org
  2024-02-25 15:43 ` sjames at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: wilco at gcc dot gnu.org @ 2024-02-23 16:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Wilco <wilco at gcc dot gnu.org> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646408.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-02-23 16:41 ` wilco at gcc dot gnu.org
@ 2024-02-25 15:43 ` sjames at gcc dot gnu.org
  2024-03-27  3:11 ` raj.khem at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-25 15:43 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-02-25 15:43 ` sjames at gcc dot gnu.org
@ 2024-03-27  3:11 ` raj.khem at gmail dot com
  2024-04-04 21:29 ` cvs-commit at gcc dot gnu.org
  2024-04-08 12:15 ` wilco at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: raj.khem at gmail dot com @ 2024-03-27  3:11 UTC (permalink / raw)
  To: gcc-bugs

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

Khem Raj <raj.khem at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |raj.khem at gmail dot com

--- Comment #5 from Khem Raj <raj.khem at gmail dot com> ---
(In reply to Wilco from comment #4)
> Patch: https://gcc.gnu.org/pipermail/gcc-patches/2024-February/646408.html

FWIW, v2 of this patch worked fine on Yocto/qemuarm64/musl build. Run tests
have not been completed yet but it looks promising.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-03-27  3:11 ` raj.khem at gmail dot com
@ 2024-04-04 21:29 ` cvs-commit at gcc dot gnu.org
  2024-04-08 12:15 ` wilco at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-04 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Wilco Dijkstra <wilco@gcc.gnu.org>:

https://gcc.gnu.org/g:27b6d081f68528435066be2234c7329e31e0e84f

commit r14-9796-g27b6d081f68528435066be2234c7329e31e0e84f
Author: Wilco Dijkstra <wilco.dijkstra@arm.com>
Date:   Tue Mar 26 15:08:02 2024 +0000

    libatomic: Fix build for --disable-gnu-indirect-function [PR113986]

    Fix libatomic build to support --disable-gnu-indirect-function on AArch64.
    Always build atomic_16.S, add aliases to the __atomic_ functions if
!HAVE_IFUNC.
    Include auto-config.h in atomic_16.S to avoid having to pass defines via
    makefiles.  Fix build if HWCAP_ATOMICS/CPUID are not defined.

    libatomic:
            PR target/113986
            * Makefile.in: Regenerated.
            * Makefile.am: Make atomic_16.S not depend on HAVE_IFUNC.
            Remove predefine of HAVE_FEAT_LSE128.
            * acinclude.m4: Remove ARCH_AARCH64_HAVE_LSE128.
            * configure: Regenerated.
            * config/linux/aarch64/atomic_16.S: Add __atomic_ alias if
!HAVE_IFUNC.
            * config/linux/aarch64/host-config.h: Correctly handle !HAVE_IFUNC.
            Add defines for HWCAP_ATOMICS and HWCAP_CPUID.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')
  2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-04-04 21:29 ` cvs-commit at gcc dot gnu.org
@ 2024-04-08 12:15 ` wilco at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: wilco at gcc dot gnu.org @ 2024-04-08 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

Wilco <wilco at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Wilco <wilco at gcc dot gnu.org> ---
Fixed

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-08 12:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  4:47 [Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16') sjames at gcc dot gnu.org
2024-02-19  4:51 ` [Bug target/113986] " pinskia at gcc dot gnu.org
2024-02-19  5:19 ` pinskia at gcc dot gnu.org
2024-02-19 22:41 ` [Bug target/113986] [14 regression] Build failure on aarch64-linux-musl or if ifunc support is disabled " wilco at gcc dot gnu.org
2024-02-19 22:46 ` pinskia at gcc dot gnu.org
2024-02-23 16:41 ` wilco at gcc dot gnu.org
2024-02-25 15:43 ` sjames at gcc dot gnu.org
2024-03-27  3:11 ` raj.khem at gmail dot com
2024-04-04 21:29 ` cvs-commit at gcc dot gnu.org
2024-04-08 12:15 ` wilco at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).