Revert "builder: add gccWrapper for openwrt < 19"

This reverts commit 372494478d.
This commit is contained in:
Astro 2022-06-01 18:24:03 +02:00
parent 0bafd92406
commit eeca2576db
1 changed files with 9 additions and 17 deletions

View File

@ -32,25 +32,14 @@ let
inherit (import ./files.nix {
inherit pkgs release target variant sha256 feedsSha256 packagesArch;
}) arch variantPackages variantFiles feedsPackages;
gccWrapper = pkgs.runCommand "gcc-wrapper" {} ''
mkdir -p $out/bin
for i in ${pkgs.gcc.cc}/bin/*-gnu-gcc*; do
ln -s ${pkgs.gcc}/bin/gcc $out/bin/$(basename "$i")
done
for i in ${pkgs.gcc.cc}/bin/*-gnu-{g++,c++}*; do
ln -s ${pkgs.gcc}/bin/g++ $out/bin/$(basename "$i")
done
'';
in
stdenv.mkDerivation {
name = lib.concatStringsSep "-" ([
"openwrt" release
]
++ lib.optional (extraImageName != null) extraImageName
++ [ target variant profile ]);
] ++
lib.optional (extraImageName != null) extraImageName ++
[ target variant profile ]);
src = variantFiles."openwrt-imagebuilder-${release}-${target}-${variant}.${hostPlatform.uname.system}-${hostPlatform.uname.processor}.tar.xz";
@ -76,11 +65,14 @@ stdenv.mkDerivation {
zlib unzip bzip2
ncurses which rsync git file getopt wget
bash perl python3
]
++ lib.optional (!lib.versionAtLeast release "21") python2
++ lib.optional (!lib.versionAtLeast release "19") gccWrapper;
] ++
lib.optional (!lib.versionAtLeast release "21") python2;
buildPhase = ''
${lib.optionalString (!lib.versionAtLeast release "19") ''
# Hack around broken check for gcc
touch staging_dir/host/.prereq-build
''}
make image SHELL=${runtimeShell} \
PROFILE="${profile}" \
PACKAGES="${lib.concatStringsSep " " packages}" \