All of lore.kernel.org
 help / color / mirror / Atom feed
* Can't build with GCC 16.1.0 - libatomic problem
@ 2026-05-10 12:07 dash-shell-80d677ffb5cf
  2026-05-10 12:18 ` Sam James
  0 siblings, 1 reply; 3+ messages in thread
From: dash-shell-80d677ffb5cf @ 2026-05-10 12:07 UTC (permalink / raw)
  To: dash

Hi,
Doing a static build on a system where static version of libatomic is
not available system-wide.

Attempt 1:

export CC="musl-gcc"
./configure --enable-static
# FAIL, from config.log:
configure:4037: checking whether the C compiler works
configure:4059: musl-gcc    conftest.c  >&5
/usr/bin/ld: cannot find -latomic_asneeded: No such file or directory
collect2: error: ld returned 1 exit status

Attempt 2 (telling build system not to use libatomic):

export CC="musl-gcc"
export LDFLAGS="-fno-link-libatomic"
./configure --enable-static
# OK, but:
make  all-recursive
make[1]: Entering directory '/home/me/media/930_GiB/dash-0.5.13.4'
Making all in src
make[2]: Entering directory '/home/me/media/930_GiB/dash-0.5.13.4/src'
   CC       builtins.def
   GEN      builtins.h
   CC       mknodes
/usr/bin/ld: cannot find -latomic_asneeded: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:831: mknodes] Error 1
make[2]: Leaving directory '/home/me/media/930_GiB/dash-0.5.13.4/src'
make[1]: *** [Makefile:357: all-recursive] Error 1
make[1]: Leaving directory '/home/me/media/930_GiB/dash-0.5.13.4'
make: *** [Makefile:298: all] Error 2

Attempt 3 (built libatomic.a separately, trying to use it):

export CC="musl-gcc"
export CFLAGS="-Os -I/home/me/media/930_GiB/gcc-build/gcc/include"
export LDFLAGS="-L/home/me/media/930_GiB/gcc-build/gcc"
./configure --enable-static
# OK, but:
make
make  all-recursive
make[1]: Entering directory '/home/me/media/930_GiB/dash-0.5.13.4'
Making all in src
make[2]: Entering directory '/home/me/media/930_GiB/dash-0.5.13.4/src'
   CC       builtins.def
   GEN      builtins.h
   CC       mknodes
/usr/bin/ld: cannot find -latomic_asneeded: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:831: mknodes] Error 1
make[2]: Leaving directory '/home/me/media/930_GiB/dash-0.5.13.4/src'
make[1]: *** [Makefile:357: all-recursive] Error 1
make[1]: Leaving directory '/home/me/media/930_GiB/dash-0.5.13.4'
make: *** [Makefile:298: all] Error 2

Looks like "mknodes" step ignores CFLAGS/LDFLAGS.

/Regards, Aleksej

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

* Re: Can't build with GCC 16.1.0 - libatomic problem
  2026-05-10 12:07 Can't build with GCC 16.1.0 - libatomic problem dash-shell-80d677ffb5cf
@ 2026-05-10 12:18 ` Sam James
  2026-05-10 12:37   ` dash-shell-80d677ffb5cf
  0 siblings, 1 reply; 3+ messages in thread
From: Sam James @ 2026-05-10 12:18 UTC (permalink / raw)
  To: dash-shell-80d677ffb5cf; +Cc: dash

[-- Attachment #1: Type: text/plain, Size: 147 bytes --]

This is a bug in the `musl-gcc` wrapper (other than possibly some
concern about the dash build system wrt flags): 
https://gcc.gnu.org/PR125235

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 418 bytes --]

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

* Re: Can't build with GCC 16.1.0 - libatomic problem
  2026-05-10 12:18 ` Sam James
@ 2026-05-10 12:37   ` dash-shell-80d677ffb5cf
  0 siblings, 0 replies; 3+ messages in thread
From: dash-shell-80d677ffb5cf @ 2026-05-10 12:37 UTC (permalink / raw)
  To: Sam James; +Cc: dash

On 2026-05-10, Sam James wrote:
>This is a bug in the `musl-gcc` wrapper (other than possibly some
>concern about the dash build system wrt flags):
>https://gcc.gnu.org/PR125235

Hi Sam,
When building other programs I successfully worked around it by using
-fno-link-libatomic, dash is the only exception so far.

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

end of thread, other threads:[~2026-05-10 12:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 12:07 Can't build with GCC 16.1.0 - libatomic problem dash-shell-80d677ffb5cf
2026-05-10 12:18 ` Sam James
2026-05-10 12:37   ` dash-shell-80d677ffb5cf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.