All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a)
@ 2024-08-13 20:02 Markus Mayer via buildroot
  2024-08-13 20:13 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Mayer via buildroot @ 2024-08-13 20:02 UTC (permalink / raw)
  To: Buildroot Mailing List; +Cc: Yann E. MORIN

Hi all,

It looks like I am always the one finding corner case build problems.
Here is another one.

This commit

3a39e706a91a package/Makefile.in: work around buggy buildsystems wrt LDFLAGS

is causing this build a error when using LLVM for ARM64:

>>> argp-standalone 1.4.1 Patching libtool
[...]
configure: WARNING: unrecognized options: --disable-gtk-doc,
--disable-gtk-doc-html, --disable-doc, --disable-docs,
--disable-documentation, --with-xmlto, --with-fop, --enable-ipv6,
--disable-nls, --disable-static, --enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-buildroot-linux-musl-strip...
/storage/Extra/buildroot/output/stbllvm-13.0-0.6/arm64/host/bin/aarch64-linux-strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for aarch64-buildroot-linux-musl-gcc...
/storage/Extra/buildroot/output/stbllvm-13.0-0.6/arm64/host/bin/aarch64-linux-gcc
checking whether the C compiler works... no
configure: error: in
'/storage/Extra/buildroot/output/stbllvm-13.0-0.6/arm64/build/argp-standalone-1.4.1':
configure: error: C compiler cannot create executables
See 'config.log' for more details
make[1]: *** [package/pkg-generic.mk:289:
/storage/Extra/buildroot/output/stbllvm-13.0-0.6/arm64/build/argp-standalone-1.4.1/.stamp_configured]
Error 77
make: *** [Makefile:29: _all] Error 2

Checking build/argp-standalone-1.4.1/config.log, we see the following:

configure:3801: checking whether the C compiler works
configure:3823:
/storage/Extra/buildroot/output/stbllvm-13.0-0.6/arm64/host/bin/aarch64-linux-gcc
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2
-g0  -fPIC -fgnu89-inline -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64  -ztext conftest.c  >&5
clang-13: error: unknown argument '-ztext'; did you mean '-Ttext'?

So, it looks like argp-standalone is passing the value from
TARGET_LDFLAGS to the C compiler, and clang objects to "-ztext"
whereas gcc doesn't complain. I don't yet know if argp-standalone is
doing something it shouldn't. For now, it all seems to be in order. I
also don't know at this time if other packages would fail with a
similar error or if it is limited to argp-standalone. I will try to
find out.

The problem stems from an incompatibility between clang and GCC in how
they treat "-ztext" vs. "-z text". GCC doesn't care, but clang only
works if there is a space.

$ clang -ztext
clang: error: unknown argument: '-ztext'
clang: error: no input files
$ clang -z text
ld: unknown options: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)

In other words, when the space is present, the argument is passed to
the linker. When it's one word, the compiler tries to parse it itself
and fails.

On the other hand, gcc doesn't care if there's a space or not.

$ gcc -z text
gcc: fatal error: no input files
compilation terminated.
$ gcc -ztext
gcc: fatal error: no input files
compilation terminated.

What is the best way to address this without breaking other things as
this seems to be quite finicky?

Thanks,
-Markus
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a)
  2024-08-13 20:02 [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a) Markus Mayer via buildroot
@ 2024-08-13 20:13 ` Yann E. MORIN
  2024-08-13 20:41   ` Markus Mayer via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2024-08-13 20:13 UTC (permalink / raw)
  To: Markus Mayer; +Cc: Yann E. MORIN, Buildroot Mailing List

Markus, All,

On 2024-08-13 13:02 -0700, Markus Mayer via buildroot spake thusly:
> It looks like I am always the one finding corner case build problems.

Oh no, you're not alone! ;-)

> Here is another one.
> This commit
> 3a39e706a91a package/Makefile.in: work around buggy buildsystems wrt LDFLAGS

-ztext, the gift that keeps on giving...

[--SNIP--]
> The problem stems from an incompatibility between clang and GCC in how
> they treat "-ztext" vs. "-z text". GCC doesn't care, but clang only
> works if there is a space.

Damned, it was not fine afterall...

[--SNIP--]
> What is the best way to address this without breaking other things as
> this seems to be quite finicky?

My @work alter-ego just sent a series that would hopefully help in this
case:

    https://patchwork.ozlabs.org/project/buildroot/list/?series=419144

It would be nice if you could have a look and test it, if possible.
Otherwise, please send him a defconfig, he might be able to spin a build
tomorrow...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a)
  2024-08-13 20:13 ` Yann E. MORIN
@ 2024-08-13 20:41   ` Markus Mayer via buildroot
  2024-08-14  4:11     ` Markus Mayer via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Mayer via buildroot @ 2024-08-13 20:41 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Yann E. MORIN, Buildroot Mailing List

On Tue, 13 Aug 2024 at 13:13, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> Markus, All,
>
> On 2024-08-13 13:02 -0700, Markus Mayer via buildroot spake thusly:
> > It looks like I am always the one finding corner case build problems.
>
> Oh no, you're not alone! ;-)

Phew! That's reassuring. *LOL*

> -ztext, the gift that keeps on giving...

It would seem like it.

> [--SNIP--]
> > The problem stems from an incompatibility between clang and GCC in how
> > they treat "-ztext" vs. "-z text". GCC doesn't care, but clang only
> > works if there is a space.
>
> Damned, it was not fine afterall...
>
> [--SNIP--]
> > What is the best way to address this without breaking other things as
> > this seems to be quite finicky?
>
> My @work alter-ego just sent a series that would hopefully help in this
> case:
>
>     https://patchwork.ozlabs.org/project/buildroot/list/?series=419144
>
> It would be nice if you could have a look and test it, if possible.
> Otherwise, please send him a defconfig, he might be able to spin a build
> tomorrow...

Tell your alter ego I'll be taking a look. My work day is far from
over, so I should have something for him when he gets to work
tomorrow. ;-) I'll fetch that series into my tree and see what
happens.

Regards,
-Markus

> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a)
  2024-08-13 20:41   ` Markus Mayer via buildroot
@ 2024-08-14  4:11     ` Markus Mayer via buildroot
  2024-08-14  5:52       ` yann.morin
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Mayer via buildroot @ 2024-08-14  4:11 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: Yann E. MORIN, Buildroot Mailing List

On Tue, 13 Aug 2024 at 13:41, Markus Mayer <mmayer@broadcom.com> wrote:
>
> On Tue, 13 Aug 2024 at 13:13, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> >
> > My @work alter-ego just sent a series that would hopefully help in this
> > case:
> >
> >     https://patchwork.ozlabs.org/project/buildroot/list/?series=419144
> >
> > It would be nice if you could have a look and test it, if possible.
> > Otherwise, please send him a defconfig, he might be able to spin a build
> > tomorrow...
>
> Tell your alter ego I'll be taking a look. My work day is far from
> over, so I should have something for him when he gets to work
> tomorrow. ;-) I'll fetch that series into my tree and see what
> happens.

I am happy to report that your patch series performed flawlessly in my
tests. There were no further build issues caused by "-z text".

If you so desire, you can add

Tested-by: Markus Mayer <mmayer@broadcom.com>

to the series.

Thanks,
-Markus
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a)
  2024-08-14  4:11     ` Markus Mayer via buildroot
@ 2024-08-14  5:52       ` yann.morin
  0 siblings, 0 replies; 5+ messages in thread
From: yann.morin @ 2024-08-14  5:52 UTC (permalink / raw)
  To: Markus Mayer; +Cc: Yann E. MORIN, Buildroot Mailing List

Markus, All,

On 2024-08-13 21:11 -0700, Markus Mayer spake thusly:
> > On Tue, 13 Aug 2024 at 13:13, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > > My @work alter-ego just sent a series that would hopefully help in this
> > > case:
> > >     https://patchwork.ozlabs.org/project/buildroot/list/?series=419144
[--SNIP--]
> I am happy to report that your patch series performed flawlessly in my
> tests. There were no further build issues caused by "-z text".

Very nice, thanks for testing!

> If you so desire, you can add
> Tested-by: Markus Mayer <mmayer@broadcom.com>

Thanks!

Regards,
Yann E. MORIN.

-- 
                                        ____________
.-----------------.--------------------:       _    :------------------.
|  Yann E. MORIN  | Real-Time Embedded |    __/ )   | /"\ ASCII RIBBON |
|                 | Software  Designer |  _/ - /'   | \ / CAMPAIGN     |
| +33 638.411.245 '--------------------: (_    `--, |  X  AGAINST      |
| yann.morin (at) orange.com           |_="    ,--' | / \ HTML MAIL    |
'--------------------------------------:______/_____:------------------'

____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-08-14  5:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-13 20:02 [Buildroot] LLVM builds broken by "-z text" (3a39e706a91a) Markus Mayer via buildroot
2024-08-13 20:13 ` Yann E. MORIN
2024-08-13 20:41   ` Markus Mayer via buildroot
2024-08-14  4:11     ` Markus Mayer via buildroot
2024-08-14  5:52       ` yann.morin

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.