Files
buildroot/toolchain
Yann E. MORIN 4738cdae83 toolchain/wrapper: move -ztext from LDFLAGS to toolchain wrapper
Passing linker flags via LDFLAGS is notoriously fragile: packages either
use LDFLAGS with the gcc frontend, or directly with ld. This means that
care must be taken to only pass flags that are recognised by both gcc
and ld, which usually proves a bit challenging, as bd035872be
(package/Makefile.in: Use "-z text" instead of "-Wl, -z, text")
demonstrates (later amended by 3a39e706a9).

It turns out that we already have a better, robust way of passing
LDFLAGS via the gcc frontend: the toolchain wrapper, which we already use
to pass relro for example.

We can revert back to using -Wl,-z,text, as we're sure this is going to
be a call to the gcc frontend (the wrapper is not used for ld), which
makes it consistent with the other similar args for -z relro and -z now.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: J. Neuschäfer <j.neuschaefer@gmx.net>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
2026-10-11 20:23:48 +02:00
..
…