mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-28 19:52:43 -09:00
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, asbd035872be(package/Makefile.in: Use "-z text" instead of "-Wl, -z, text") demonstrates (later amended by3a39e706a9). 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>