Go to file
Yann E. MORIN 3b7c7e6106 support/scripts: fix fix-rpath
Commit 134900401f (support/scripts/fix-rpath: parallelize patching
files) broke the rpath fixup, because it improperly quoted or expanded
variables:

  - $@ was expanded in the main() context, rather than in the sub-bash
    as expected, propagating incorrect parameters to patch_file();

  - an array was passed without array expansion, so only the first item
    was passed; that was in turn assigned to a string, anyway loosign
    the array. Liuckily, we only ever put a single item in that array,
    so that worked by chance.

We fix that by inverting the parameters to patch_elf(), where the extra
args are passed last, so we can put as many we want in the future. We
also pass every variables as positional parameters outside the bash -c
command, which allows us proper quoting of all variables, specifically
of the extra args array which now comes last.

The ultralong line was split, too, in a hopefully easier-to-read form.

Fixing all that also required fixing the many shellcheck issues at the
same time (wome were pre-existing before 134900401f).

While at it, expand two TABs into spaces like the rest of the script.

Note: shellcheck does not seem to warn when a variable expansion will be
used as the command to run, i.e. ${PATCHELF} does not trigger the
quoting error. Still, for consistency, we also double-quote it (we know
it is a single word, as it is already double-quoted once in the script).

Fixes: 134900401f

Cc: Victor Dumas <dumasv.dev@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2023-08-07 23:20:31 +02:00
arch arch/Config.in.x86: consolidate Geode CPU targets 2023-08-01 23:16:02 +02:00
board configs/snps_arc700_nsim_defconfig: add ARC700 target for nSIM 2023-08-06 22:47:32 +02:00
boot boot/barebox: add optional dependencies on host-openssl and host-libusb 2023-07-28 22:40:39 +02:00
configs configs/snps_arc700_nsim_defconfig: add ARC700 target for nSIM 2023-08-06 22:47:32 +02:00
docs support/download: add support to exclude svn externals 2023-08-06 16:35:52 +02:00
fs fs/cpio: allow users to provide their own dracut modules 2023-02-06 22:46:35 +01:00
linux {linux, linux-headers}: bump 5.{4, 10, 15}.x / 6.{1, 4}.x series 2023-07-27 23:36:31 +02:00
package package/pkg-cmake: fix late expansion in infra 2023-08-07 19:37:32 +02:00
support support/scripts: fix fix-rpath 2023-08-07 23:20:31 +02:00
system package/systemd: bump linux-headers dependency to 4.14 2023-08-02 21:18:16 +02:00
toolchain toolchain/toolchain-external/toolchain-external-custom: add gcc 13 version selection 2023-07-28 22:04:49 +02:00
utils utils/docker-run: fix running when CWD is not MAIN_DIR 2023-07-31 20:56:57 +02:00
.checkpackageignore support/scripts: fix fix-rpath 2023-08-07 23:20:31 +02:00
.clang-format .clang-format: initial import from Linux 5.15.6 2022-01-01 15:01:13 +01:00
.defconfig
.flake8 Revert ".flake8: fix check for 80/132 columns" 2021-01-02 17:38:20 +01:00
.gitignore
.gitlab-ci.yml .gitlab-ci.yml: update Docker image to use 2023-02-07 18:15:00 +01:00
.shellcheckrc utils/check-package: improve shellcheck reproducibility 2022-07-25 23:52:47 +02:00
CHANGES Update for 2023.08-rc1 2023-08-05 23:03:28 +02:00
Config.in package/sam-ba: drop 32bit host lib requirement 2023-07-30 23:41:44 +02:00
Config.in.legacy package/gdb: remove gdb 10.x 2023-08-06 16:41:25 +02:00
COPYING
DEVELOPERS configs/snps_arc700_nsim_defconfig: add ARC700 target for nSIM 2023-08-06 22:47:32 +02:00
Makefile support/scripts/fix-rpath: parallelize patching files 2023-08-06 23:27:31 +02:00
Makefile.legacy
README docs: move the IRC channel away from Freenode 2021-05-29 22:16:23 +02:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches