mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] How to add symbols to PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST
@ 2026-07-13 16:23 Guillermo Rodriguez Garcia
  2026-07-14  6:11 ` Michael Olbrich
  0 siblings, 1 reply; 3+ messages in thread
From: Guillermo Rodriguez Garcia @ 2026-07-13 16:23 UTC (permalink / raw)
  To: ptxdist; +Cc: Alejandro Vazquez

Hello,

Our BSP is currently defining:

TARGET_EXTRA_CFLAGS=-mtune=cortex-a7 -mfpu=neon-vfpv4

However this is causing us some trouble with TF-A, as the code
generated by the toolchain contains NEON instructions, which makes it
fail at runtime with "Undefined instruction" exceptions.

We could skip this for TF-A specifically by adding TARGET_EXTRA_CFLAGS
to TF_A_WRAPPER_BLACKLIST.

But actually we'd like to do the same for all low level code,
including kernel and bootloaders (U-Boot, OP-TEE). Since all of these
already set <package>_WRAPPER_BLACKLIST to
$(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST), the easiest and more robust way
would be to add TARGET_EXTRA_CFLAGS to
PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST itself. Is this possible?

Thanks,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com



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

* Re: [ptxdist] How to add symbols to PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST
  2026-07-13 16:23 [ptxdist] How to add symbols to PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST Guillermo Rodriguez Garcia
@ 2026-07-14  6:11 ` Michael Olbrich
  2026-07-14 18:22   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2026-07-14  6:11 UTC (permalink / raw)
  To: Guillermo Rodriguez Garcia; +Cc: Alejandro Vazquez, ptxdist

On Mon, Jul 13, 2026 at 06:23:56PM +0200, Guillermo Rodriguez Garcia wrote:
> Hello,
> 
> Our BSP is currently defining:
> 
> TARGET_EXTRA_CFLAGS=-mtune=cortex-a7 -mfpu=neon-vfpv4
> 
> However this is causing us some trouble with TF-A, as the code
> generated by the toolchain contains NEON instructions, which makes it
> fail at runtime with "Undefined instruction" exceptions.
> 
> We could skip this for TF-A specifically by adding TARGET_EXTRA_CFLAGS
> to TF_A_WRAPPER_BLACKLIST.
> 
> But actually we'd like to do the same for all low level code,
> including kernel and bootloaders (U-Boot, OP-TEE). Since all of these
> already set <package>_WRAPPER_BLACKLIST to
> $(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST), the easiest and more robust way
> would be to add TARGET_EXTRA_CFLAGS to
> PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST itself. Is this possible?

Untested, but I think, you can create rules/pre/blacklist.make with:

PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST += TARGET_EXTRA_CFLAGS

to your BSP (any filename is fine as long as it is in rules/pre/ and has a
.make suffix).

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [ptxdist] How to add symbols to PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST
  2026-07-14  6:11 ` Michael Olbrich
@ 2026-07-14 18:22   ` Guillermo Rodriguez Garcia
  0 siblings, 0 replies; 3+ messages in thread
From: Guillermo Rodriguez Garcia @ 2026-07-14 18:22 UTC (permalink / raw)
  To: Guillermo Rodriguez Garcia, ptxdist, Alejandro Vazquez

Hi Michael,

El mar, 14 jul 2026 a las 8:11, Michael Olbrich
(<m.olbrich@pengutronix.de>) escribió:
>
> On Mon, Jul 13, 2026 at 06:23:56PM +0200, Guillermo Rodriguez Garcia wrote:
> > Hello,
> >
> > Our BSP is currently defining:
> >
> > TARGET_EXTRA_CFLAGS=-mtune=cortex-a7 -mfpu=neon-vfpv4
> >
> > However this is causing us some trouble with TF-A, as the code
> > generated by the toolchain contains NEON instructions, which makes it
> > fail at runtime with "Undefined instruction" exceptions.
> >
> > We could skip this for TF-A specifically by adding TARGET_EXTRA_CFLAGS
> > to TF_A_WRAPPER_BLACKLIST.
> >
> > But actually we'd like to do the same for all low level code,
> > including kernel and bootloaders (U-Boot, OP-TEE). Since all of these
> > already set <package>_WRAPPER_BLACKLIST to
> > $(PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST), the easiest and more robust way
> > would be to add TARGET_EXTRA_CFLAGS to
> > PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST itself. Is this possible?
>
> Untested, but I think, you can create rules/pre/blacklist.make with:
>
> PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST += TARGET_EXTRA_CFLAGS
>
> to your BSP (any filename is fine as long as it is in rules/pre/ and has a
> .make suffix).

Great. I can confirm that this works, thank you!

I have some questions:

1. It is not immediately obvious that one might need to take extra
precautions for "low level" (bootloader / kernel) packages. I mean, it
_is_ obvious in hindsight, but I have been using PTXdist for many
years and have developed BSP for several platforms, tweaking CFLAGS as
needed for each one, and I did not realize that these CFLAGS are not
"only" used for userspace packages. Perhaps a note in the docs could
be helpful? (If so, let me know and I will be happy to submit a patch)

2. Would it be useful to have a way to tweak
PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST from platformconfig (next to
toolchain options) ? The workaround you provided works great but it
was not immediately obvious either (to me :-))

Thanks again,

Guillermo



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

end of thread, other threads:[~2026-07-14 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-13 16:23 [ptxdist] How to add symbols to PTXDIST_LOWLEVEL_WRAPPER_BLACKLIST Guillermo Rodriguez Garcia
2026-07-14  6:11 ` Michael Olbrich
2026-07-14 18:22   ` Guillermo Rodriguez Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox