From a519d9fbe2ef3c4cbe8bde1ea885269d6ec2542c Mon Sep 17 00:00:00 2001 From: novenary Date: Sat, 18 Jan 2025 14:01:25 +0200 Subject: [PATCH] openwrt: fix gcc-{ar,nm,ranlib} symlinks These should absoluetly not point to the gcc wrapper, they are thin wrappers around the binutils tools that are necessary to make LTO work. This fix link failures in apk, where Meson would (I assume) see a broken x86_64-unknown-linux-gnu-gcc-ar (or a missing gcc-ar), and fall back to the unwrapped ar. --- envs/openwrt/shell.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/envs/openwrt/shell.nix b/envs/openwrt/shell.nix index ea202d8..34a85ce 100644 --- a/envs/openwrt/shell.nix +++ b/envs/openwrt/shell.nix @@ -11,6 +11,7 @@ let for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i") done + ln -sf ${pkgs.gcc.cc}/bin/{,*-gnu-}gcc-{ar,nm,ranlib} $out/bin ''; fhs = pkgs.buildFHSUserEnv {