forked from auxolotl/labs
refactor: remove target (#31)
WIP. Posting just to make sure people know this is something I'd like to do. Context: https://matrix.to/#/!PvnunzXUk4Vm1CmKS4:auxolotl.org/$bOm6iaBpWbo-KRJgo7FUZdeFIv9StzRHxklbx7OQ23g?via=auxolotl.org&via=matrix.org&via=catgirl.cloud Reasons: 1. Why should GCC inflict complication upon all of tidepool just because of its own architectural deficiencies? 2. Most other compilers are multi-target so it doesn't matter 2. Target is useless for 99.9% of packages and only leads to user confusion, especially since many compilers also call what would be host here "target". 3. Canadian-cross is not very well supported. GCC barely supports it, and is broken in many cases. Nixpkgs does not support it (regardless of what its API may imply) and no one has ever complained. Plan: 1. Remove most target related things. No reason to have it. 2. Add configuration parameter on GCC that selects its target What does this mean: This basically moves target to be a GCC-specific artifact rather than an official parameter every package must endure the cognitive load of. This is because it is. Nixpkgs plans on dumping target in the future as well because of this. Or at least making it an alias. If you want to create a compiler with a different target, then override GCC to do so. No need to pervade all of tidepool just for GCC. Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org> Reviewed-on: auxolotl/labs#31 Reviewed-by: vlinkz <vlinkz@snowflakeos.org> Co-authored-by: Ross Smyth <snix@treefroog.com> Co-committed-by: Ross Smyth <snix@treefroog.com>
This commit is contained in:
parent
8174d3a494
commit
be0d6bc0e1
54 changed files with 685 additions and 826 deletions
|
|
@ -25,12 +25,8 @@ in
|
|||
phasesWithHooks =
|
||||
let
|
||||
all = lib.lists.flatten [
|
||||
hooks.build.build
|
||||
hooks.build.host
|
||||
hooks.build.target
|
||||
hooks.host.host
|
||||
hooks.host.target
|
||||
hooks.target.target
|
||||
hooks.build
|
||||
hooks.host
|
||||
];
|
||||
in
|
||||
builtins.foldl' (
|
||||
|
|
@ -62,13 +58,11 @@ in
|
|||
"${foundation.stage2-bash}/bin/bash"
|
||||
else if system == "x86_64-linux" then
|
||||
"${
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "i686-linux" system system)
|
||||
.package
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "i686-linux" system).package
|
||||
}/bin/bash"
|
||||
else
|
||||
"${
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "x86_64-linux" system system)
|
||||
.package
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "x86_64-linux" system).package
|
||||
}/bin/bash";
|
||||
|
||||
built = builtins.derivation (
|
||||
|
|
@ -86,28 +80,20 @@ in
|
|||
PATH =
|
||||
let
|
||||
bins = lib.paths.bin (
|
||||
(lib.packages.dependencies.get dependencies.build.build)
|
||||
++ (lib.packages.dependencies.get dependencies.build.host)
|
||||
++ (lib.packages.dependencies.get dependencies.build.target)
|
||||
++ (lib.packages.dependencies.get dependencies.host.host)
|
||||
++ (lib.packages.dependencies.get dependencies.host.target)
|
||||
++ (lib.packages.dependencies.get dependencies.target.target)
|
||||
(lib.packages.dependencies.get dependencies.build)
|
||||
++ (lib.packages.dependencies.get dependencies.host)
|
||||
++ lib.lists.when (system == "i686-linux") [
|
||||
foundation.stage2-bash
|
||||
foundation.stage2-coreutils
|
||||
]
|
||||
++ lib.lists.when (system == "x86_64-linux") [
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "i686-linux" system system)
|
||||
.package
|
||||
(lib.packages.build packages.foundation.coreutils.versions."9.4-stage1" "i686-linux" system system)
|
||||
.package
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "i686-linux" system).package
|
||||
(lib.packages.build packages.foundation.coreutils.versions."9.4-stage1" "i686-linux" system).package
|
||||
]
|
||||
++ lib.lists.when (system != "i686-linux" && system != "x86_64-linux") [
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "x86_64-linux" system system)
|
||||
(lib.packages.build packages.foundation.bash.versions."5.2.15-stage1" "x86_64-linux" system).package
|
||||
(lib.packages.build packages.foundation.coreutils.versions."9.4-stage1" "x86_64-linux" system)
|
||||
.package
|
||||
(lib.packages.build packages.foundation.coreutils.versions."9.4-stage1" "x86_64-linux" system
|
||||
system
|
||||
).package
|
||||
]
|
||||
);
|
||||
in
|
||||
|
|
@ -165,7 +151,7 @@ in
|
|||
Review the phases printed above and resolve the cycle to proceed.
|
||||
|
||||
TIP: This can happen when you have two of the same dependency added as different dependencies
|
||||
such as `build.build` and `build.host`.
|
||||
such as `build` and `host`.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ in
|
|||
builtins.map (dependency: dependency.package) available;
|
||||
|
||||
build =
|
||||
build: host: target:
|
||||
builtins.mapAttrs (name: dep: (lib.packages.resolve dep).packages.${build}.${host}.${target});
|
||||
build: host: builtins.mapAttrs (name: dep: (lib.packages.resolve dep).packages.${build}.${host});
|
||||
|
||||
collect =
|
||||
package:
|
||||
|
|
@ -32,31 +31,13 @@ in
|
|||
let
|
||||
dependency = lib.packages.resolve dep;
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
getPropagatedDependencies dependency.deps.build.build ++ process dependency.deps.build.build;
|
||||
host = getPropagatedDependencies dependency.deps.build.host ++ process dependency.deps.build.host;
|
||||
target =
|
||||
getPropagatedDependencies dependency.deps.build.target ++ process dependency.deps.build.target;
|
||||
};
|
||||
host = {
|
||||
host = getPropagatedDependencies dependency.deps.host.host ++ process dependency.deps.host.host;
|
||||
target =
|
||||
getPropagatedDependencies dependency.deps.host.target ++ process dependency.deps.host.target;
|
||||
};
|
||||
target = {
|
||||
target =
|
||||
getPropagatedDependencies dependency.deps.target.target ++ process dependency.deps.target.target;
|
||||
};
|
||||
build = getPropagatedDependencies dependency.deps.build ++ process dependency.deps.build;
|
||||
host = getPropagatedDependencies dependency.deps.host ++ process dependency.deps.host;
|
||||
};
|
||||
in
|
||||
lib.lists.flatten [
|
||||
deps.build.build
|
||||
deps.build.host
|
||||
deps.build.target
|
||||
deps.host.host
|
||||
deps.host.target
|
||||
deps.target.target
|
||||
deps.build
|
||||
deps.host
|
||||
];
|
||||
|
||||
propagated = lib.attrs.mapToList getDeps dependencies;
|
||||
|
|
@ -66,28 +47,8 @@ in
|
|||
withoutNulls = deps: builtins.filter (dep: dep != null) deps;
|
||||
in
|
||||
{
|
||||
build = {
|
||||
build = withoutNulls (
|
||||
builtins.attrValues package.deps.build.build ++ process package.deps.build.build
|
||||
);
|
||||
host = withoutNulls (
|
||||
builtins.attrValues package.deps.build.host ++ process package.deps.build.host
|
||||
);
|
||||
target = withoutNulls (
|
||||
builtins.attrValues package.deps.build.target ++ process package.deps.build.target
|
||||
);
|
||||
};
|
||||
host = {
|
||||
host = withoutNulls (builtins.attrValues package.deps.host.host ++ process package.deps.host.host);
|
||||
target = withoutNulls (
|
||||
builtins.attrValues package.deps.host.target ++ process package.deps.host.target
|
||||
);
|
||||
};
|
||||
target = {
|
||||
target = withoutNulls (
|
||||
builtins.attrValues package.deps.target.target ++ process package.deps.target.target
|
||||
);
|
||||
};
|
||||
build = withoutNulls (builtins.attrValues package.deps.build ++ process package.deps.build);
|
||||
host = withoutNulls (builtins.attrValues package.deps.host ++ process package.deps.host);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -119,7 +80,6 @@ in
|
|||
type = lib.types.enum [
|
||||
"build"
|
||||
"host"
|
||||
"target"
|
||||
];
|
||||
writable = false;
|
||||
default.value = path;
|
||||
|
|
@ -134,15 +94,11 @@ in
|
|||
result.config;
|
||||
|
||||
build = process "build" [
|
||||
collected.build.build
|
||||
collected.build.host
|
||||
collected.build.target
|
||||
collected.build
|
||||
];
|
||||
host = process "host" [
|
||||
collected.host.host
|
||||
collected.host.target
|
||||
collected.host
|
||||
];
|
||||
target = process "target" [ collected.target.target ];
|
||||
in
|
||||
build
|
||||
// host
|
||||
|
|
@ -150,7 +106,6 @@ in
|
|||
inherit
|
||||
build
|
||||
host
|
||||
target
|
||||
package
|
||||
;
|
||||
|
||||
|
|
@ -159,9 +114,7 @@ in
|
|||
__toString =
|
||||
value:
|
||||
let
|
||||
all = builtins.mapAttrs (
|
||||
host: targets: builtins.mapAttrs (target: deps: builtins.map (dep: dep.package) deps) targets
|
||||
) collected;
|
||||
all = builtins.mapAttrs (host: deps: builtins.map (dep: dep.package) deps) collected;
|
||||
in
|
||||
builtins.toJSON (
|
||||
builtins.removeAttrs value [
|
||||
|
|
@ -190,36 +143,12 @@ in
|
|||
hooks;
|
||||
in
|
||||
{
|
||||
build = {
|
||||
build = process [
|
||||
"build"
|
||||
"build"
|
||||
];
|
||||
host = process [
|
||||
"build"
|
||||
"host"
|
||||
];
|
||||
target = process [
|
||||
"build"
|
||||
"target"
|
||||
];
|
||||
};
|
||||
host = {
|
||||
host = process [
|
||||
"host"
|
||||
"host"
|
||||
];
|
||||
target = process [
|
||||
"host"
|
||||
"target"
|
||||
];
|
||||
};
|
||||
target = {
|
||||
target = process [
|
||||
"target"
|
||||
"target"
|
||||
];
|
||||
};
|
||||
build = process [
|
||||
"build"
|
||||
];
|
||||
host = process [
|
||||
"host"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -263,7 +192,7 @@ in
|
|||
alias;
|
||||
|
||||
build =
|
||||
alias: build: host: target:
|
||||
alias: build: host:
|
||||
let
|
||||
package = lib.packages.resolve alias;
|
||||
|
||||
|
|
@ -277,36 +206,34 @@ in
|
|||
|
||||
buildSystem = lib.systems.withBuildInfo build;
|
||||
hostSystem = lib.systems.withBuildInfo host;
|
||||
targetSystem = lib.systems.withBuildInfo target;
|
||||
|
||||
platform = {
|
||||
build = lib.modules.override 75 build;
|
||||
host = lib.modules.override 75 host;
|
||||
target = lib.modules.override 75 target;
|
||||
};
|
||||
|
||||
built = package.extendTemporarily {
|
||||
inherit platform;
|
||||
};
|
||||
|
||||
support = lib.packages.supports package buildSystem.double hostSystem.double targetSystem.double;
|
||||
support = lib.packages.supports package buildSystem.double hostSystem.double;
|
||||
|
||||
result =
|
||||
if !support.compatible then
|
||||
builtins.throw "📦 [Aux Tidepool] Package `${identifier}` does not support the platform build=${buildSystem.double}, host=${hostSystem.double}, target=${targetSystem.double}."
|
||||
builtins.throw "📦 [Aux Tidepool] Package `${identifier}` does not support the platform build=${buildSystem.double}, host=${hostSystem.double}"
|
||||
else if support.broken then
|
||||
builtins.throw "📦 [Aux Tidepool] Package `${identifier}` is marked as broken and cannot be built."
|
||||
else
|
||||
built;
|
||||
in
|
||||
builtins.addErrorContext "📦 [Aux Tidepool] while building package `${identifier}` for platform build=${buildSystem.double}, host=${hostSystem.double}, target=${targetSystem.double}." result;
|
||||
builtins.addErrorContext "📦 [Aux Tidepool] while building package `${identifier}` for platform build=${buildSystem.double}, host=${hostSystem.double}" result;
|
||||
|
||||
supports =
|
||||
alias: build: host: target:
|
||||
alias: build: host:
|
||||
let
|
||||
package = lib.packages.resolve alias;
|
||||
matches = builtins.filter (
|
||||
platform: platform.build == build && platform.host == host && platform.target == target
|
||||
platform: platform.build == build && platform.host == host
|
||||
) package.platforms;
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,31 +12,26 @@ in
|
|||
# {
|
||||
# build = "x86_64-linux";
|
||||
# host = "x86_64-linux";
|
||||
# target = "x86_64-linux";
|
||||
# }
|
||||
#
|
||||
# {
|
||||
# build = "*";
|
||||
# host = "*";
|
||||
# target = "@host";
|
||||
# }
|
||||
#
|
||||
# {
|
||||
# build = "*";
|
||||
# host = ["x86_64-linux", "aarch64-linux"];
|
||||
# target = "@host";
|
||||
# }
|
||||
#
|
||||
# [
|
||||
# {
|
||||
# build = "*";
|
||||
# host = ["x86_64-linux", "aarch64-linux"];
|
||||
# target = "@host";
|
||||
# }
|
||||
# {
|
||||
# build = "i686-linux";
|
||||
# host = "@build";
|
||||
# target = "@host";
|
||||
# }
|
||||
# ]
|
||||
#
|
||||
|
|
@ -51,24 +46,13 @@ in
|
|||
let
|
||||
build = lib.platforms.expand spec spec.build;
|
||||
host = lib.platforms.expand spec spec.host;
|
||||
target = lib.platforms.expand spec spec.target;
|
||||
in
|
||||
builtins.concatMap (
|
||||
build:
|
||||
builtins.concatMap (
|
||||
host:
|
||||
builtins.map (target: {
|
||||
build = build;
|
||||
host = if host == "@build" then build else host;
|
||||
target =
|
||||
if target == "@host" then
|
||||
if host == "@build" then build else host
|
||||
else if target == "@build" then
|
||||
build
|
||||
else
|
||||
target;
|
||||
}) target
|
||||
) host
|
||||
builtins.map (host: {
|
||||
build = build;
|
||||
host = if host == "@build" then build else host;
|
||||
}) host
|
||||
) build
|
||||
) specs
|
||||
);
|
||||
|
|
|
|||
|
|
@ -293,8 +293,7 @@ in
|
|||
|
||||
platforms = {
|
||||
build = lib.types.attrs.of lib.types.platforms.host;
|
||||
host = lib.types.attrs.of lib.types.platforms.target;
|
||||
target = lib.types.attrs.of (lib.types.attrs.of lib.types.platforms.alias);
|
||||
host = lib.types.attrs.of lib.types.platforms.host;
|
||||
alias = lib.types.submodule {
|
||||
options = {
|
||||
stable = lib.options.create {
|
||||
|
|
@ -331,12 +330,6 @@ in
|
|||
type = lib.types.string;
|
||||
default.value = "@build";
|
||||
};
|
||||
|
||||
target = lib.options.create {
|
||||
description = "The target platform for the package.";
|
||||
type = lib.types.string;
|
||||
default.value = "@host";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
@ -491,49 +484,18 @@ in
|
|||
};
|
||||
|
||||
deps =
|
||||
build: host: target:
|
||||
build: host:
|
||||
lib.types.submodule {
|
||||
options = {
|
||||
build = {
|
||||
build = lib.options.create {
|
||||
description = "Dependencies which are created in the build environment and are executed in the build environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
|
||||
host = lib.options.create {
|
||||
description = "Dependencies which are created in the build environment and are executed in the host environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
|
||||
target = lib.options.create {
|
||||
description = "Dependencies which are created in the build environment and are executed in the target environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
build = lib.options.create {
|
||||
description = "Dependencies which are executed in the build environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
|
||||
host = {
|
||||
host = lib.options.create {
|
||||
description = "Dependencies which are executed in the host environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
|
||||
target = lib.options.create {
|
||||
description = "Dependencies which are executed in the host environment which produces code for the target environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
};
|
||||
|
||||
target = {
|
||||
target = lib.options.create {
|
||||
description = "Dependencies which are executed in the target environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
host = lib.options.create {
|
||||
description = "Dependencies which are executed in the host environment.";
|
||||
type = lib.types.dependencies;
|
||||
default.value = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -546,7 +508,6 @@ in
|
|||
let
|
||||
build = config.platform.build;
|
||||
host = config.platform.host;
|
||||
target = config.platform.target;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
|
@ -728,12 +689,6 @@ in
|
|||
type = lib.types.string;
|
||||
default.value = initial.host or "x86_64-linux";
|
||||
};
|
||||
|
||||
target = lib.options.create {
|
||||
description = "The target platform for the package.";
|
||||
type = lib.types.string;
|
||||
default.value = initial.target or "x86_64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
name = lib.options.create {
|
||||
|
|
@ -815,11 +770,7 @@ in
|
|||
type = lib.types.raw;
|
||||
writable = false;
|
||||
default.value = lib.attrs.generate lib.systems.doubles.all (
|
||||
build:
|
||||
lib.attrs.generate lib.systems.doubles.all (
|
||||
host:
|
||||
lib.attrs.generate lib.systems.doubles.all (target: lib.packages.build config build host target)
|
||||
)
|
||||
build: lib.attrs.generate lib.systems.doubles.all (host: lib.packages.build config build host)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -857,21 +808,11 @@ in
|
|||
|
||||
deps = lib.options.create {
|
||||
description = "The dependencies for the package.";
|
||||
type = deps build host target;
|
||||
type = deps build host;
|
||||
default.value = { };
|
||||
apply = value: {
|
||||
build = {
|
||||
build = lib.packages.dependencies.build build build build value.build.build;
|
||||
host = lib.packages.dependencies.build build build host value.build.host;
|
||||
target = lib.packages.dependencies.build build build target value.build.target;
|
||||
};
|
||||
host = {
|
||||
host = lib.packages.dependencies.build build host host value.host.host;
|
||||
target = lib.packages.dependencies.build build host target value.host.target;
|
||||
};
|
||||
target = {
|
||||
target = lib.packages.dependencies.build build target target value.target.target;
|
||||
};
|
||||
build = lib.packages.dependencies.build build build value.build;
|
||||
host = lib.packages.dependencies.build build host value.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,23 +13,20 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
];
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
||||
deps.host.host = {
|
||||
deps.host = {
|
||||
inherit (packages.aux) b;
|
||||
};
|
||||
|
||||
|
|
@ -41,7 +38,7 @@ in
|
|||
in
|
||||
{
|
||||
install = ''
|
||||
echo "a with b: ${config.deps.host.host.b.platform.host}" > $out
|
||||
echo "a with b: ${config.deps.host.b.platform.host}" > $out
|
||||
echo >> $out
|
||||
echo a=$out >> $out
|
||||
echo b=$AUX_B >> $out
|
||||
|
|
|
|||
|
|
@ -17,17 +17,14 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -37,10 +34,8 @@ in
|
|||
|
||||
deps = {
|
||||
build = {
|
||||
host = {
|
||||
c = packages.aux.c.extend {
|
||||
propagate = true;
|
||||
};
|
||||
c = packages.aux.c.extend {
|
||||
propagate = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,22 +17,18 @@ in
|
|||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "i686-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.bash.versions."5.2.15-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -47,8 +46,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -76,13 +75,16 @@ in
|
|||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,19 +10,34 @@ let
|
|||
package = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
inherit (config) settings;
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
settings = {
|
||||
target = lib.options.create {
|
||||
type = lib.types.nullish lib.types.string;
|
||||
default.value = null;
|
||||
};
|
||||
allTargets = lib.options.create {
|
||||
description = "Include all targets (dramatically increases size of binaries).";
|
||||
type = lib.types.bool;
|
||||
default.value = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
meta = {
|
||||
description = "Tools for manipulating binaries (linker, assembler, etc.)";
|
||||
|
|
@ -35,10 +50,6 @@ in
|
|||
build = "@linux";
|
||||
host = "@linux";
|
||||
}
|
||||
{
|
||||
build = "@linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
version = lib.strings.removeSuffix "-stage1" config.version;
|
||||
|
|
@ -24,7 +23,6 @@ let
|
|||
"--prefix=${builtins.placeholder "out"}"
|
||||
"--build=${platform.build.triple}"
|
||||
"--host=${platform.host.triple}"
|
||||
"--target=${platform.target.triple}"
|
||||
|
||||
"--with-sysroot=/"
|
||||
"--enable-deterministic-archives"
|
||||
|
|
@ -42,9 +40,30 @@ let
|
|||
"--with-lib-path=:"
|
||||
|
||||
"--disable-multilib"
|
||||
"--enable-64-bit-bfd"
|
||||
]
|
||||
++ lib.lists.when (config.settings.allTargets) [
|
||||
"--enable-target=all"
|
||||
]
|
||||
++ lib.lists.when (config.settings.target != null) [
|
||||
"--target=${(lib.systems.withBuildInfo config.settings.target).triple}"
|
||||
];
|
||||
in
|
||||
{
|
||||
options = {
|
||||
settings = {
|
||||
target = lib.options.create {
|
||||
type = lib.types.nullish lib.types.string;
|
||||
default.value = null;
|
||||
};
|
||||
allTargets = lib.options.create {
|
||||
description = "Include all targets (dramatically increases size of binaries).";
|
||||
type = lib.types.bool;
|
||||
default.value = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
meta = {
|
||||
description = "Tools for manipulating binaries (linker, assembler, etc.)";
|
||||
|
|
@ -55,16 +74,15 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
@ -75,8 +93,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -108,13 +126,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
// (lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.bison.versions."3.8.2-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -75,13 +74,16 @@ in
|
|||
gnum4 = packages.foundation.gnum4.versions."1.4.19-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.bzip2.versions."1.0.8-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
prefix = lib.strings.when (
|
||||
|
|
@ -49,8 +48,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -66,13 +65,16 @@ in
|
|||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
@ -89,10 +91,10 @@ in
|
|||
"CC=\"$CC\""
|
||||
]
|
||||
++ lib.lists.when (config.platform.build != config.platform.host) [
|
||||
"AR=\"${config.deps.build.host.binutils.package}/bin/${prefix}ar\""
|
||||
"RANLIB=\"${config.deps.build.host.binutils.package}/bin/${prefix}ranlib\""
|
||||
"STRIP=\"${config.deps.build.host.binutils.package}/bin/${prefix}strip\""
|
||||
"NM=\"${config.deps.build.host.binutils.package}/bin/${prefix}nm\""
|
||||
"AR=\"${config.deps.build.binutils-cross.package}/bin/${prefix}ar\""
|
||||
"RANLIB=\"${config.deps.build.binutils-cross.package}/bin/${prefix}ranlib\""
|
||||
"STRIP=\"${config.deps.build.binutils-cross.package}/bin/${prefix}strip\""
|
||||
"NM=\"${config.deps.build.binutils-cross.package}/bin/${prefix}nm\""
|
||||
]
|
||||
);
|
||||
in
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.coreutils.versions."9.4-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
|
|
@ -53,8 +52,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -82,13 +81,16 @@ in
|
|||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.diffutils.versions."3.10-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.findutils.versions."4.9.0-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gawk.versions."5.2.2-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@ let
|
|||
|
||||
package =
|
||||
if
|
||||
config.platform.build == config.platform.host && config.platform.host != config.platform.target
|
||||
config.platform.build == config.platform.host && config.platform.host != config.settings.target
|
||||
then
|
||||
packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
platform = lib.modules.overrides.force config.platform;
|
||||
settings.target = config.settings.target;
|
||||
}
|
||||
else if
|
||||
config.platform.build != config.platform.host && config.platform.host == config.platform.target
|
||||
config.platform.build != config.platform.host && config.platform.host == config.settings.target
|
||||
then
|
||||
packages.foundation.gcc.versions."13.2.0-stage3".extend {
|
||||
platform = lib.modules.overrides.force config.platform;
|
||||
|
|
@ -26,6 +27,14 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
settings.target = lib.options.create {
|
||||
type = lib.types.string;
|
||||
default.value = config.platform.host;
|
||||
description = "Target of the compiler";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
meta = {
|
||||
description = "GNU Compiler Collection.";
|
||||
|
|
@ -41,18 +50,10 @@ in
|
|||
build = "i686-linux";
|
||||
host = "@linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
hooks = package.hooks;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
target = lib.systems.withBuildInfo config.settings.target;
|
||||
};
|
||||
|
||||
prefix = lib.strings.when (
|
||||
|
|
@ -26,13 +26,12 @@ let
|
|||
];
|
||||
|
||||
configureFlags = [
|
||||
"LDFLAGS=--static"
|
||||
"--prefix=${builtins.placeholder "out"}"
|
||||
"--build=${platform.build.triple}"
|
||||
"--host=${platform.host.triple}"
|
||||
"--target=${platform.target.triple}"
|
||||
"--with-as=${config.deps.build.target.binutils.package}/bin/${prefix}as"
|
||||
"--with-ld=${config.deps.build.target.binutils.package}/bin/${prefix}ld"
|
||||
"--with-as=${config.deps.build.binutils-cross.package}/bin/${prefix}as"
|
||||
"--with-ld=${config.deps.build.binutils-cross.package}/bin/${prefix}ld"
|
||||
"--enable-languages=c,c++"
|
||||
"--disable-bootstrap"
|
||||
"--disable-libsanitizer"
|
||||
|
|
@ -74,6 +73,12 @@ in
|
|||
type = lib.types.string;
|
||||
description = "Version of isl.";
|
||||
};
|
||||
|
||||
settings.target = lib.options.create {
|
||||
type = lib.types.string;
|
||||
default.value = "x86_64-linux";
|
||||
description = "Target of the compiler";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
@ -86,11 +91,9 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -129,8 +132,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
|
|
@ -162,11 +165,13 @@ in
|
|||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
target = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// {
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.settings.target;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hooks = ctx: {
|
||||
|
|
@ -178,12 +183,8 @@ in
|
|||
export CXX='${config.package}/bin/${prefix}g++ ${
|
||||
builtins.concatStringsSep " " (ctx.host."foundation:cflags")
|
||||
}'
|
||||
export CC_FOR_TARGET='${config.package}/bin/${prefix}gcc ${
|
||||
builtins.concatStringsSep " " (ctx.target."foundation:cflags")
|
||||
}'
|
||||
export CXX_FOR_TARGET='${config.package}/bin/${prefix}g++ ${
|
||||
builtins.concatStringsSep " " (ctx.target."foundation:cflags")
|
||||
}'
|
||||
export CC_FOR_TARGET=$CC
|
||||
export CXX_FOR_TARGET=$CXX
|
||||
alias gcc='$CC'
|
||||
alias g++='$CXX'
|
||||
'';
|
||||
|
|
@ -210,10 +211,6 @@ in
|
|||
'';
|
||||
|
||||
configure = ''
|
||||
echo "--configure: ${builtins.concatStringsSep " " configureFlags}"
|
||||
ls -la ${config.deps.build.build.binutils.package}/bin
|
||||
ls -la ${config.deps.build.build.gcc.package}/bin
|
||||
|
||||
# Configure
|
||||
mkdir build
|
||||
cd build
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
target = lib.systems.withBuildInfo config.settings.target;
|
||||
};
|
||||
|
||||
prefix = lib.strings.when (
|
||||
|
|
@ -30,9 +30,9 @@ let
|
|||
];
|
||||
|
||||
gccFlags = [
|
||||
"-Wl,-dynamic-linker=${config.deps.target.target.glibc.dynamicLinker}"
|
||||
"-L${config.deps.target.target.glibc.package}/lib"
|
||||
"-B${config.deps.target.target.glibc.package}/lib"
|
||||
"-Wl,-dynamic-linker=${config.deps.host.glibc.dynamicLinker}"
|
||||
"-L${config.deps.host.glibc.package}/lib"
|
||||
"-B${config.deps.host.glibc.package}/lib"
|
||||
"-L${config.package.outPath}${libPrefix}/lib"
|
||||
"-B${config.package.outPath}${libPrefix}/lib"
|
||||
];
|
||||
|
|
@ -42,16 +42,16 @@ let
|
|||
"--build=${platform.build.triple}"
|
||||
"--host=${platform.host.triple}"
|
||||
"--target=${platform.target.triple}"
|
||||
"--with-as=${config.deps.build.target.binutils.package}/bin/${prefix}as"
|
||||
"--with-ld=${config.deps.build.target.binutils.package}/bin/${prefix}ld"
|
||||
"--with-as=${config.deps.build.binutils-cross.package}/bin/${prefix}as"
|
||||
"--with-ld=${config.deps.build.binutils-cross.package}/bin/${prefix}ld"
|
||||
"--enable-languages=c,c++"
|
||||
"--disable-libsanitizer"
|
||||
"--disable-lto"
|
||||
"--disable-multilib"
|
||||
"--with-headers=${config.deps.target.target.glibc.package}/include"
|
||||
"--with-headers=${config.deps.host.glibc.package}/include"
|
||||
"--with-build-sysroot=/"
|
||||
"--with-native-system-header-dir=${config.deps.target.target.glibc.package}/include"
|
||||
"--with-build-time-tools=${config.deps.build.target.binutils.package}/bin"
|
||||
"--with-native-system-header-dir=${config.deps.host.glibc.package}/include"
|
||||
"--with-build-time-tools=${config.deps.build.binutils-cross.package}/bin"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
|
@ -75,6 +75,12 @@ in
|
|||
type = lib.types.string;
|
||||
description = "Version of isl.";
|
||||
};
|
||||
|
||||
settings.target = lib.options.create {
|
||||
type = lib.types.string;
|
||||
default.value = "x86_64-linux";
|
||||
description = "Target of the compiler";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
@ -87,11 +93,9 @@ in
|
|||
platforms = [
|
||||
{
|
||||
build = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -130,8 +134,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
|
|
@ -163,24 +167,25 @@ in
|
|||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
target = {
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// {
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.settings.target;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
target = {
|
||||
target = {
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1";
|
||||
host = {
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1".extend {
|
||||
platform.host = lib.modules.overrides.force config.settings.target;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
env = {
|
||||
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${config.deps.target.target.glibc.dynamicLinker} -B${config.deps.target.target.glibc.package}/lib";
|
||||
LDFLAGS_FOR_TARGET = "-L$(pwd)/${platform.target.triple}/libgcc -L${config.deps.target.target.glibc.package}/lib";
|
||||
LIBRARY_PATH = "${config.deps.target.target.glibc.package}/lib";
|
||||
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${config.deps.host.glibc.dynamicLinker} -B${config.deps.host.glibc.package}/lib";
|
||||
LDFLAGS_FOR_TARGET = "-L$(pwd)/${platform.target.triple}/libgcc -L${config.deps.host.glibc.package}/lib";
|
||||
LIBRARY_PATH = "${config.deps.host.glibc.package}/lib";
|
||||
};
|
||||
|
||||
hooks = ctx: {
|
||||
|
|
@ -192,12 +197,8 @@ in
|
|||
export CXX='${config.package}/bin/${prefix}g++ ${
|
||||
builtins.concatStringsSep " " (gccFlags ++ ctx.host."foundation:cflags")
|
||||
}'
|
||||
export CC_FOR_TARGET='${config.package}/bin/${prefix}gcc ${
|
||||
builtins.concatStringsSep " " (gccFlags ++ ctx.target."foundation:cflags")
|
||||
}'
|
||||
export CXX_FOR_TARGET='${config.package}/bin/${prefix}g++ ${
|
||||
builtins.concatStringsSep " " (gccFlags ++ ctx.target."foundation:cflags")
|
||||
}'
|
||||
export CC_FOR_TARGET=$CC
|
||||
export CXX_FOR_TARGET=$CXX
|
||||
alias gcc='$CC'
|
||||
alias g++='$CXX'
|
||||
'';
|
||||
|
|
@ -230,9 +231,9 @@ in
|
|||
|
||||
# TODO(vlinkz) Hack to fix missing crti.o and crtn.o. Figure out how to properly find their paths.
|
||||
mkdir gcc
|
||||
ln -sv ${config.deps.target.target.glibc.package}/lib/{crti.o,crtn.o} gcc
|
||||
ln -sv ${config.deps.host.glibc.package}/lib/{crti.o,crtn.o} gcc
|
||||
mkdir -p ${platform.target.triple}/libstdc++-v3/src
|
||||
ln -sv ${config.deps.target.target.glibc.package}/lib/{crti.o,crtn.o} ${platform.target.triple}/libstdc++-v3/src
|
||||
ln -sv ${config.deps.host.glibc.package}/lib/{crti.o,crtn.o} ${platform.target.triple}/libstdc++-v3/src
|
||||
|
||||
bash ../configure ${builtins.concatStringsSep " " configureFlags}
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -11,10 +11,15 @@ let
|
|||
package = packages.foundation.gcc.versions."13.2.0-stage3".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.target == "x86_64-linux" then "i686-linux" else "x86_64-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
@ -22,9 +21,9 @@ let
|
|||
];
|
||||
|
||||
gccFlags = [
|
||||
"-Wl,-dynamic-linker=${config.deps.host.host.glibc.dynamicLinker}"
|
||||
"-L${config.deps.host.host.glibc.package}/lib"
|
||||
"-B${config.deps.host.host.glibc.package}/lib"
|
||||
"-Wl,-dynamic-linker=${config.deps.host.glibc.dynamicLinker}"
|
||||
"-L${config.deps.host.glibc.package}/lib"
|
||||
"-B${config.deps.host.glibc.package}/lib"
|
||||
"-L${config.package.outPath}/lib"
|
||||
"-B${config.package.outPath}/lib"
|
||||
];
|
||||
|
|
@ -33,13 +32,13 @@ let
|
|||
"--prefix=${builtins.placeholder "out"}"
|
||||
"--build=${platform.build.triple}"
|
||||
"--host=${platform.host.triple}"
|
||||
"--target=${platform.target.triple}"
|
||||
"--target=${platform.host.triple}"
|
||||
"--enable-languages=c,c++"
|
||||
"--disable-lto"
|
||||
"--disable-bootstrap"
|
||||
"--disable-libsanitizer"
|
||||
"--disable-multilib"
|
||||
"--with-native-system-header-dir=${config.deps.host.host.glibc.package}/include"
|
||||
"--with-native-system-header-dir=${config.deps.host.glibc.package}/include"
|
||||
"--with-gxx-include-dir=${builtins.placeholder "out"}/include/c++/${config.version}/"
|
||||
"--with-build-sysroot=/"
|
||||
];
|
||||
|
|
@ -65,6 +64,11 @@ in
|
|||
type = lib.types.string;
|
||||
description = "Version of isl.";
|
||||
};
|
||||
|
||||
target.triple = lib.options.create {
|
||||
type = lib.types.string;
|
||||
description = "Target of GCC";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
@ -120,8 +124,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
|
|
@ -155,29 +159,30 @@ in
|
|||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host = {
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1";
|
||||
};
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
env = rec {
|
||||
CFLAGS_FOR_BUILD = "-Wl,-dynamic-linker -Wl,${config.deps.build.build.glibc.dynamicLinker} -B${config.deps.build.build.glibc.package}/lib";
|
||||
LDFLAGS_FOR_BUILD = "-L${config.deps.build.build.gcc.package}/lib -L${config.deps.build.build.glibc.package}/lib -Wl,-rpath,${config.deps.build.build.gcc.package}/lib -Wl,-rpath,${config.deps.build.build.glibc.package}/lib";
|
||||
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${config.deps.host.host.glibc.dynamicLinker} -B${config.deps.host.host.glibc.package}/lib";
|
||||
LDFLAGS_FOR_TARGET = "-L$(pwd)/${platform.target.triple}/libgcc -L${config.deps.host.host.glibc.package}/lib";
|
||||
CFLAGS_FOR_BUILD = "-Wl,-dynamic-linker -Wl,${config.deps.build.glibc.dynamicLinker} -B${config.deps.build.glibc.package}/lib";
|
||||
LDFLAGS_FOR_BUILD = "-L${config.deps.build.gcc.package}/lib -L${config.deps.build.glibc.package}/lib -Wl,-rpath,${config.deps.build.gcc.package}/lib -Wl,-rpath,${config.deps.build.glibc.package}/lib";
|
||||
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${config.deps.host.glibc.dynamicLinker} -B${config.deps.host.glibc.package}/lib";
|
||||
LDFLAGS_FOR_TARGET = "-L$(pwd)/${platform.host.triple}/libgcc -L${config.deps.host.glibc.package}/lib";
|
||||
CFLAGS = CFLAGS_FOR_TARGET;
|
||||
LDFLAGS = LDFLAGS_FOR_TARGET;
|
||||
LIBRARY_PATH = "${config.deps.host.host.glibc.package}/lib";
|
||||
LIBRARY_PATH = "${config.deps.host.glibc.package}/lib";
|
||||
};
|
||||
|
||||
hooks = ctx: {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
@ -22,9 +21,9 @@ let
|
|||
];
|
||||
|
||||
gccFlags = [
|
||||
"-Wl,-dynamic-linker=${config.deps.host.host.glibc.dynamicLinker}"
|
||||
"-L${config.deps.host.host.glibc.package}/lib"
|
||||
"-B${config.deps.host.host.glibc.package}/lib"
|
||||
"-Wl,-dynamic-linker=${config.deps.host.glibc.dynamicLinker}"
|
||||
"-L${config.deps.host.glibc.package}/lib"
|
||||
"-B${config.deps.host.glibc.package}/lib"
|
||||
"-L${config.package.outPath}/lib"
|
||||
"-B${config.package.outPath}/lib"
|
||||
];
|
||||
|
|
@ -33,14 +32,13 @@ let
|
|||
"--prefix=${builtins.placeholder "out"}"
|
||||
"--build=${platform.build.triple}"
|
||||
"--host=${platform.host.triple}"
|
||||
"--target=${platform.target.triple}"
|
||||
"--enable-languages=c,c++"
|
||||
"--disable-lto"
|
||||
"--disable-bootstrap"
|
||||
"--disable-libsanitizer"
|
||||
"--disable-multilib"
|
||||
"--with-build-sysroot=/"
|
||||
"--with-native-system-header-dir=${config.deps.host.host.glibc.package}/include"
|
||||
"--with-native-system-header-dir=${config.deps.host.glibc.package}/include"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
|
@ -110,68 +108,54 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-stage1-passthrough";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
build =
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-stage1-passthrough";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage3-passthrough";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host =
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage3-passthrough";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host =
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
glibc = packages.foundation.glibc.versions."2.38-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1-passthrough";
|
||||
};
|
||||
};
|
||||
host =
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
glibc = packages.foundation.glibc.versions."2.38-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1-passthrough";
|
||||
};
|
||||
};
|
||||
|
||||
env = {
|
||||
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${config.deps.host.host.glibc.dynamicLinker}";
|
||||
LIBRARY_PATH = "${config.deps.host.host.glibc.package}/lib";
|
||||
CFLAGS_FOR_TARGET = "-Wl,-dynamic-linker -Wl,${config.deps.host.glibc.dynamicLinker}";
|
||||
LIBRARY_PATH = "${config.deps.host.glibc.package}/lib";
|
||||
};
|
||||
|
||||
hooks = ctx: {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -42,26 +41,24 @@ in
|
|||
|
||||
deps = {
|
||||
build = {
|
||||
build = {
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
python = packages.foundation.python.versions."3.12.0-bootstrap";
|
||||
bison = packages.foundation.bison.versions."3.8.2-bootstrap";
|
||||
};
|
||||
host = {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
linux-headers = packages.foundation.linux-headers.versions."6.5.6-stage1";
|
||||
};
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
python = packages.foundation.python.versions."3.12.0-bootstrap";
|
||||
bison = packages.foundation.bison.versions."3.8.2-bootstrap";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
};
|
||||
host = {
|
||||
linux-headers = packages.foundation.linux-headers.versions."6.5.6-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -81,8 +78,8 @@ in
|
|||
--prefix=$out \
|
||||
--build=${platform.build.triple} \
|
||||
--host=${platform.host.triple} \
|
||||
--with-headers=${config.deps.build.host.linux-headers.package}/include \
|
||||
--with-binutils=${config.deps.build.host.binutils.package}/${platform.target.triple}/bin
|
||||
--with-headers=${config.deps.host.linux-headers.package}/include \
|
||||
--with-binutils=${config.deps.build.binutils.package}/bin
|
||||
'';
|
||||
|
||||
build = ''
|
||||
|
|
@ -93,7 +90,7 @@ in
|
|||
install = ''
|
||||
# Install
|
||||
make -j $NIX_BUILD_CORES install
|
||||
ln -sv $(ls -d ${config.deps.build.host.linux-headers.package}/include/* | grep -v scsi\$) $out/include/
|
||||
ln -sv $(ls -d ${config.deps.host.linux-headers.package}/include/* | grep -v scsi\$) $out/include/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.glibc.versions."2.38-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -54,8 +53,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
bzip2 = packages.foundation.bzip2.versions."1.0.8-bootstrap";
|
||||
|
|
@ -97,25 +96,29 @@ in
|
|||
}
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
glibc = packages.foundation.glibc.versions."2.38-stage1-passthrough";
|
||||
};
|
||||
host = {
|
||||
linux-headers = packages.foundation.linux-headers.versions."6.5.6-stage1";
|
||||
}
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage1";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
host = {
|
||||
linux-headers = packages.foundation.linux-headers.versions."6.5.6-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
dynamicLinker =
|
||||
"${config.package.outPath}/lib/"
|
||||
+ (
|
||||
if platform.target.double == "x86_64-linux" then
|
||||
if platform.host.double == "x86_64-linux" then
|
||||
"ld-linux-x86-64.so.2"
|
||||
else if platform.target.double == "aarch64-linux" then
|
||||
else if platform.host.double == "aarch64-linux" then
|
||||
"ld-linux-aarch64.so.1"
|
||||
else if platform.target.double == "riscv64-linux" then
|
||||
else if platform.host.double == "riscv64-linux" then
|
||||
"ld-linux-riscv64-lp64d.so.1"
|
||||
else
|
||||
"ld-linux.so.2"
|
||||
|
|
@ -134,10 +137,10 @@ in
|
|||
"--prefix=$out"
|
||||
"--build=${platform.build.triple}"
|
||||
"--host=${platform.host.triple}"
|
||||
"--with-headers=${config.deps.build.host.linux-headers.package}/include"
|
||||
"--with-headers=${config.deps.host.linux-headers.package}/include"
|
||||
]
|
||||
++ lib.lists.when (config.platform.build != config.platform.host) [
|
||||
"--with-binutils=${config.deps.build.host.binutils.package}/${platform.target.triple}/bin"
|
||||
"--with-binutils=${config.deps.build.binutils-cross.package}/${platform.host.triple}/bin"
|
||||
]
|
||||
);
|
||||
in
|
||||
|
|
@ -166,15 +169,15 @@ in
|
|||
"make \"localedata/install-locales\" \"localedir=$out/lib/locale\""
|
||||
else
|
||||
''
|
||||
mkdir -p $TMPDIR/${config.deps.build.build.glibc.package}/lib/locale
|
||||
mkdir -p $TMPDIR/${config.deps.build.glibc.package}/lib/locale
|
||||
sed -i -e \
|
||||
's,^$(rtld-prefix) $(common-objpfx)locale/localedef,localedef --prefix=''${TMPDIR} --${platform.host.system.cpu.endian.name}-endian,' \
|
||||
../localedata/Makefile
|
||||
make SHELL='sh -x' "localedata/install-locales" "localedir=$out/lib/locale"
|
||||
cp -r $TMPDIR/${config.deps.build.build.glibc.package}/lib/locale $out/lib
|
||||
cp -r $TMPDIR/${config.deps.build.glibc.package}/lib/locale $out/lib
|
||||
''
|
||||
}
|
||||
ln -sv $(ls -d ${config.deps.build.host.linux-headers.package}/include/* | grep -v scsi\$) $out/include/
|
||||
ln -sv $(ls -d ${config.deps.host.linux-headers.package}/include/* | grep -v scsi\$) $out/include/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gnugrep.versions."3.11-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gnum4.versions."1.4.19-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gnumake.versions."4.4.1-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
@ -51,8 +50,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
|
||||
{
|
||||
|
|
@ -83,13 +82,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gnupatch.versions."2.7-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,10 +45,9 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
|
|
@ -78,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gnused.versions."4.9-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gnutar.versions."1.35-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,10 +45,9 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
|
|
@ -78,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.gzip.versions."1.13-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -46,8 +45,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -77,13 +76,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ let
|
|||
package = packages.foundation.linux-headers.versions."6.5.6-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -20,7 +19,7 @@ in
|
|||
|
||||
platforms = {
|
||||
build = "@linux";
|
||||
target = "@linux";
|
||||
host = "@linux";
|
||||
};
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
@ -31,43 +30,38 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
build = (
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gzip = packages.foundation.gzip.versions."1.13-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gzip = packages.foundation.gzip.versions."1.13-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
@ -80,7 +74,7 @@ in
|
|||
make -j $NIX_BUILD_CORES V=1 \
|
||||
"CC=''${CC_FOR_TARGET:-''${CC}}" \
|
||||
"HOSTCC=$CC" \
|
||||
ARCH=${platform.target.linux.arch} \
|
||||
ARCH=${platform.host.linux.arch} \
|
||||
headers
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.musl.versions."1.2.4-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
@ -35,10 +35,6 @@ in
|
|||
build = "@linux";
|
||||
host = "@linux";
|
||||
}
|
||||
{
|
||||
build = "@linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
builder = builders.foundation.passthrough.extend {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
in
|
||||
|
|
@ -28,18 +27,10 @@ in
|
|||
build = "i686-linux";
|
||||
host = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "i686-linux";
|
||||
target = "x86_64-linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
host = "@linux";
|
||||
}
|
||||
{
|
||||
build = "x86_64-linux";
|
||||
target = "@linux";
|
||||
}
|
||||
];
|
||||
|
||||
builder = builders.foundation.basic;
|
||||
|
|
@ -50,8 +41,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -73,20 +64,22 @@ in
|
|||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
bash = packages.foundation.bash.versions."5.2.15-stage1-passthrough";
|
||||
};
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
target = lib.attrs.when (config.platform.host != config.platform.target) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
host = {
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
bash = packages.foundation.bash.versions."5.2.15-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
# target = lib.attrs.when (config.platform.host != config.platform.target) {
|
||||
# gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
# binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
# };
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
bash = packages.foundation.bash.versions."5.2.15-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -103,7 +96,7 @@ in
|
|||
patch = ''
|
||||
# Patch
|
||||
# https://github.com/ZilchOS/bootstrap-from-tcc/blob/2e0c68c36b3437386f786d619bc9a16177f2e149/using-nix/2a3-intermediate-musl.nix
|
||||
sed -i 's|/bin/sh|${config.deps.build.build.bash.package}/bin/bash|' \
|
||||
sed -i 's|/bin/sh|${config.deps.build.bash.package}/bin/bash|' \
|
||||
tools/*.sh
|
||||
# patch popen/system to search in PATH instead of hardcoding /bin/sh
|
||||
sed -i 's|posix_spawn(&pid, "/bin/sh",|posix_spawnp(\&pid, "sh",|' \
|
||||
|
|
@ -118,7 +111,6 @@ in
|
|||
--prefix=$out \
|
||||
--build=${platform.build.triple} \
|
||||
--host=${platform.host.triple} \
|
||||
--target=${platform.target.triple} \
|
||||
--syslibdir=$out/lib \
|
||||
--enable-wrapper
|
||||
'';
|
||||
|
|
@ -133,9 +125,9 @@ in
|
|||
make -j $NIX_BUILD_CORES install
|
||||
sed -i 's|/bin/sh|${
|
||||
if (config.platform.build != config.platform.host) then
|
||||
config.deps.host.host.bash.package
|
||||
config.deps.host.bash.package
|
||||
else
|
||||
config.deps.build.build.bash.package
|
||||
config.deps.build.bash.package
|
||||
}/bin/bash|' $out/bin/*
|
||||
ln -s ../lib/libc.so $out/bin/ldd
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
@ -49,56 +48,53 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
python = packages.foundation.python.versions."3.12.0-stage1";
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-bootstrap";
|
||||
gnused = packages.foundation.gnused.versions."4.9-bootstrap";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-bootstrap";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-bootstrap";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-bootstrap";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-bootstrap";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-bootstrap";
|
||||
xz = packages.foundation.xz.versions."5.4.3-bootstrap";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-bootstrap";
|
||||
binutils = packages.foundation.binutils.versions."2.41-bootstrap";
|
||||
}
|
||||
else
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-stage1-passthrough";
|
||||
gnupatch = packages.foundation.gnupatch.versions."2.7-stage1-passthrough";
|
||||
gnused = packages.foundation.gnused.versions."4.9-stage1-passthrough";
|
||||
gnutar = packages.foundation.gnutar.versions."1.35-stage1-passthrough";
|
||||
gnugrep = packages.foundation.gnugrep.versions."3.11-stage1-passthrough";
|
||||
gawk = packages.foundation.gawk.versions."5.2.2-stage1-passthrough";
|
||||
diffutils = packages.foundation.diffutils.versions."3.10-stage1-passthrough";
|
||||
findutils = packages.foundation.findutils.versions."4.9.0-stage1-passthrough";
|
||||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
python = packages.foundation.python.versions."3.12.0-stage1";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
host = {
|
||||
host = {
|
||||
zlib =
|
||||
if (config.platform.build == "i686-linux" && config.platform.build == config.platform.host) then
|
||||
packages.foundation.zlib.versions."1.3-bootstrap"
|
||||
else
|
||||
packages.foundation.zlib.versions."1.3-stage1";
|
||||
};
|
||||
zlib =
|
||||
if (config.platform.build == "i686-linux" && config.platform.build == config.platform.host) then
|
||||
packages.foundation.zlib.versions."1.3-bootstrap"
|
||||
else
|
||||
packages.foundation.zlib.versions."1.3-stage1";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -124,7 +120,7 @@ in
|
|||
"--host=${platform.host.triple}"
|
||||
]
|
||||
++ lib.lists.when (config.platform.build != config.platform.host) [
|
||||
"--with-build-python=\"${config.deps.build.build.python.package}/bin/python3\""
|
||||
"--with-build-python=\"${config.deps.build.python.package}/bin/python3\""
|
||||
"ac_cv_buggy_getaddrinfo=no"
|
||||
"ac_cv_file__dev_ptmx=yes"
|
||||
"ac_cv_file__dev_ptc=yes"
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ let
|
|||
package = packages.foundation.xz.versions."5.4.3-stage1".extend {
|
||||
platform = {
|
||||
build = lib.modules.overrides.force (
|
||||
if config.platform.build != config.platform.target then
|
||||
config.platform.build
|
||||
else if config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux" then
|
||||
"i686-linux"
|
||||
if (config.platform.build == config.platform.host) then
|
||||
if (config.platform.build == "x86_64-linux" || config.platform.build == "i686-linux") then
|
||||
"i686-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
else
|
||||
"x86_64-linux"
|
||||
config.platform.build
|
||||
);
|
||||
host = lib.modules.overrides.force config.platform.host;
|
||||
target = lib.modules.overrides.force config.platform.target;
|
||||
};
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -48,8 +47,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -73,13 +72,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
phases = {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ let
|
|||
platform = {
|
||||
build = lib.systems.withBuildInfo config.platform.build;
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
target = lib.systems.withBuildInfo config.platform.target;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
@ -45,8 +44,8 @@ in
|
|||
};
|
||||
|
||||
deps = {
|
||||
build = {
|
||||
build =
|
||||
build =
|
||||
(
|
||||
if (config.platform.build == "i686-linux") then
|
||||
{
|
||||
gnumake = packages.foundation.gnumake.versions."4.4.1-bootstrap";
|
||||
|
|
@ -66,13 +65,16 @@ in
|
|||
xz = packages.foundation.xz.versions."5.4.3-stage1-passthrough";
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage4";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1-passthrough";
|
||||
};
|
||||
|
||||
host = lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2";
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1";
|
||||
}
|
||||
)
|
||||
// lib.attrs.when (config.platform.build != config.platform.host) {
|
||||
gcc = packages.foundation.gcc.versions."13.2.0-stage2".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
binutils = packages.foundation.binutils.versions."2.41-stage1".extend {
|
||||
settings.target = config.platform.host;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
context = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue