Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Alessandro Rubini <rubini@gnudd.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/jpeg-turbo: fix aarch64 build using an upstream patch
Date: Fri, 21 Aug 2026 12:02:19 +0200	[thread overview]
Message-ID: <aoghe-d8Lvcj_qlr@windsurf> (raw)
In-Reply-To: <amaCxq1lFi8rsIyJ@arcana.i.gnudd.com>

Hello Alessandro,

On Sun, Jul 26, 2026 at 11:57:26PM +0200, Alessandro Rubini wrote:
> This patch is 3.2.0-8-g0da22762 in the original jpeg-turbo package,
> where the committer claims they can't reproduce the problem. Buildroot
> is currently using version 3.2.0 of the package.
> 
> The build issue I esperience with an aarch64 build (cm4 custom baseboard)
> is the following:
> 
>    spng.c:(.text+0x4d8c): undefined reference to `__fpclassifyf'
> 
> The patch actually fixes it.
> 
> Signed-off-by: Alessandro Rubini <rubini@gnudd.com>

Thanks for your patch. I was initially not able to reproduce the
issue, but after digging into the autobuilder failures for this
problem, I found out that the key to encounter the problem is
BR2_OPTIMIZE_S=y (i.e use gcc -Os instead of our default of -O2). Do
you confirm you are using BR2_OPTIMIZE_S=y in your configuration?

Overall, I can reproduce the issue with:

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_OPTIMIZE_S=y
BR2_PACKAGE_JPEG=y

but not with:

BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y
BR2_PACKAGE_JPEG=y

Do we understand why the issue happens with -Os but not -O2 ?

> diff --git a/package/jpeg-turbo/0001-libspng-Really-remove-gamma-correction-code.patch b/package/jpeg-turbo/0001-libspng-Really-remove-gamma-correction-code.patch
> new file mode 100644
> index 0000000000..5dcd95d0b9
> --- /dev/null
> +++ b/package/jpeg-turbo/0001-libspng-Really-remove-gamma-correction-code.patch
> @@ -0,0 +1,109 @@
> +From 0da22762971551462cfad8f0b11cfb037472a4e8 Mon Sep 17 00:00:00 2001
> +From: DRC <information@libjpeg-turbo.org>
> +Date: Thu, 16 Jul 2026 12:09:54 -0400
> +Subject: [PATCH] libspng: Really remove gamma correction code
> +
> +We really don't use it, and fpclassify() apparently introduces yet
> +another libm dependency in some cases (although I can't reproduce that.)
> +
> +Fixes #904

We require all patches added in Buildroot to have:

- An "Upstream:" tag that points to the upstream commit, PR or patch
  submission (in your case, commit)

- A "Signed-off-by:" tag from the person who introduced the patch into
  Buildroot, i.e you.

Could you adjust this, together with hopefully some explanation on why
-Os triggers the issue and not -O2?

Thanks a lot!

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:[~2026-08-21 10:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-26 21:57 [Buildroot] [PATCH] package/jpeg-turbo: fix aarch64 build using an upstream patch Alessandro Rubini
2026-08-21 10:02 ` Thomas Petazzoni via buildroot [this message]
2026-08-21 10:03   ` Thomas Petazzoni via buildroot
     [not found] <amaCxq1lFi8rsIyJ__7967.02165841765$1785105510$gmane$org@arcana.i.gnudd.com>
2026-07-27  5:15 ` Bernd Kuhls

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=aoghe-d8Lvcj_qlr@windsurf \
    --to=buildroot@buildroot.org \
    --cc=rubini@gnudd.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox