All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Waldemar Brodkorb <wbx@openadk.org>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/nginx: fix sparc compile
Date: Sun, 4 Aug 2024 23:12:54 +0200	[thread overview]
Message-ID: <20240804231254.6301c5df@windsurf> (raw)
In-Reply-To: <Zq9j8m3YPt0Xh0gY@waldemar-brodkorb.de>

On Sun, 4 Aug 2024 13:20:18 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> When libatomic_ops are enabled the shared library is using symbols
> from libatomic.
> 
> In output/build/nginx-1.24.0/objs/autoconf.err
> You get:
> checking for atomic_ops library
> 
> /home/wbx/buildroot/output/host/lib/gcc/sparc-buildroot-linux-uclibc/13.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
> /tmp/ccx4rHjO.o: in function `main':
> autotest.c:(.text.startup+0x30): undefined reference to
> `__atomic_fetch_add_4'
> collect2: error: ld returned 1 exit status
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/5de/5de45530bbc615b1c44cc73a0ae7bf4cff5f1a56/

Do you have a minimal reproducer for this issue?

>  NGINX_CONF_ENV += ngx_force_have_libatomic=yes
>  ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
>  NGINX_CFLAGS += "-DAO_NO_SPARC_V9"
> +NGINX_LDFLAGS += -latomic
>  endif

Basically, I am wondering if this is the correct condition to put this.
Other architecture than SPARC may need to link against libatomic. So
perhaps it should instead be:

ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
NGINX_LDFLAGS += -latomic
endif

but as I am not 100% sure, I wanted to first reproduce the issue.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-08-04 21:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 11:20 [Buildroot] [PATCH] package/nginx: fix sparc compile Waldemar Brodkorb
2024-08-04 21:12 ` Thomas Petazzoni via buildroot [this message]
2024-08-05  7:24   ` Waldemar Brodkorb
2024-08-05  7:31     ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240804231254.6301c5df@windsurf \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wbx@openadk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.