refactor: only support i686-linux for foundation gcc
This commit is contained in:
parent
193a52cbc8
commit
b315ae81f6
|
@ -83,7 +83,6 @@ in {
|
|||
}
|
||||
);
|
||||
in
|
||||
(builtins.trace "${package.name}: ${system}")
|
||||
built
|
||||
// {
|
||||
inherit (package) meta;
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
config,
|
||||
options,
|
||||
}:
|
||||
let
|
||||
inherit (config)
|
||||
}: let
|
||||
inherit
|
||||
(config)
|
||||
lib
|
||||
mirrors
|
||||
builders
|
||||
# These are the upstream foundational packages exported from the Aux Foundation project.
|
||||
|
||||
foundation
|
||||
packages
|
||||
;
|
||||
in
|
||||
{
|
||||
in {
|
||||
config.packages.foundation.gcc = {
|
||||
versions = {
|
||||
"latest" =
|
||||
{ config, meta }:
|
||||
{
|
||||
"latest" = {
|
||||
config,
|
||||
meta,
|
||||
}: {
|
||||
options = {
|
||||
src = lib.options.create {
|
||||
type = lib.types.derivation;
|
||||
|
@ -91,28 +91,7 @@ in
|
|||
builder = builders.basic;
|
||||
|
||||
env = {
|
||||
PATH =
|
||||
let
|
||||
gcc =
|
||||
if
|
||||
config.platform.build.triple == config.platform.host.triple
|
||||
# If we're on the same system then we can use the existing GCC instance.
|
||||
then
|
||||
foundation.stage2-gcc
|
||||
# Otherwise we are going to need a cross-compiler.
|
||||
else
|
||||
# TODO: Create a gcc-cross package.
|
||||
(meta.extend (args: {
|
||||
config = {
|
||||
platform = {
|
||||
build = config.platform.build.triple;
|
||||
host = config.platform.build.triple;
|
||||
target = lib.modules.override.force config.platform.host.triple;
|
||||
};
|
||||
};
|
||||
})).config.package;
|
||||
in
|
||||
lib.paths.bin [
|
||||
PATH = lib.paths.bin [
|
||||
foundation.stage2-gcc
|
||||
foundation.stage2-binutils
|
||||
foundation.stage2-gnumake
|
||||
|
@ -128,13 +107,17 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
phases =
|
||||
let
|
||||
host = lib'.systems.withBuildInfo config.platform.host;
|
||||
phases = let
|
||||
host = lib.systems.withBuildInfo config.platform.host;
|
||||
|
||||
mbits = if host.system.cpu.family == "x86" then if host.is64bit then "-m64" else "-m32" else "";
|
||||
in
|
||||
{
|
||||
mbits =
|
||||
if host.system.cpu.family == "x86"
|
||||
then
|
||||
if host.is64bit
|
||||
then "-m64"
|
||||
else "-m32"
|
||||
else "";
|
||||
in {
|
||||
unpack = lib.dag.entry.before ["patch"] ''
|
||||
# Unpack
|
||||
tar xf ${config.src}
|
||||
|
|
Loading…
Reference in a new issue