!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

245 Members
81 Servers

Load older messages


SenderMessageTime
10 Sep 2024
@qyliss:fairydust.spaceAlyssa Ross

A cross compiler would be pkgsCross.x86_64-unknown-redox.stdenv.cc or pkgsCross.x86_64-unknown-redox.buildPackages.gcc13

11:48:31
@matthewcroughan:defenestrate.itmatthewcroughan changed their display name from matthewcroughan - going to nix.camp to matthewcroughan.15:53:35
11 Sep 2024
@zmitchell:matrix.orgzmitchell

Ah, it looks like relibc was recently removed from nixpkgs due to lack of maintenance. It also looks like Redox has their own patched Rust compiler.

I'm sifting through the nixpkgs source right now to try to figure out where I would swap out the URL pointing at rustc sources, but I'm a little confused by the layout. In pkgs/build-support/rust I see a bootstrap.nix that calls binary.nix, and that seems to download compiler binaries. But also in pkgs/development/compilers/rust it looks like rustc.nix is where we actually build rustc, but it takes a rustc argument?

19:07:59
12 Sep 2024
@qyliss:fairydust.spaceAlyssa RossYes, it uses the bootstrap rustc to build itself08:20:01
@qyliss:fairydust.spaceAlyssa RossI'd first try to see how far you can get using the non-patched Rust compiler, which does have Redox targets08:20:19
@qyliss:fairydust.spaceAlyssa RossI'd be hesitant to add a patched rustc to Nixpkgs, because the last one made maintaining normal rustc more difficult.08:20:39
@zmitchell:matrix.orgzmitchellI wouldn't be adding the patched rustc to nixpkgs exactly for that reason. It also seems like their patched rustc exists because there's something missing from the upstream compiler. I'm not up to speed on that particular issue.15:16:35
@zmitchell:matrix.orgzmitchellMy plan at the moment is get the patched rustc/cargo/etc packaged in their respective repositories, then replace the upstream versions via overlay in order to build relibc. That artifact can be exposed to nixpkgs.15:18:07
@qyliss:fairydust.spaceAlyssa RossHow?15:18:21
@qyliss:fairydust.spaceAlyssa RossYou can't use Nix code from elsewhere in Nixpkgs15:18:28
@zmitchell:matrix.orgzmitchellI'm not sure what you mean15:18:41
@qyliss:fairydust.spaceAlyssa RossWhat does "that artifact can be exposed to Nixpkgs" mean?15:18:56
@zmitchell:matrix.orgzmitchellI mean build it as a precompiled binary as it was previously done in https://github.com/NixOS/nixpkgs/pull/9356815:20:07
@qyliss:fairydust.spaceAlyssa RossWell that's what I was talking about15:20:58
@qyliss:fairydust.spaceAlyssa RossThat was removed because it got in the way of normal rustc15:21:04
@qyliss:fairydust.spaceAlyssa RossSince it used the same infrastructure15:21:10
@zmitchell:matrix.orgzmitchellOk, I misunderstood15:21:29
@qyliss:fairydust.spaceAlyssa RossI think you should see how far you can get with upstream rustc first15:21:49
@zmitchell:matrix.orgzmitchellSure, that's more of a Redox<->Rust Project conversation though instead of a Redox<->Nixpkgs conversation, and as a new contributor I'm not sure exactly what the limitations are that led them to maintain their own fork in the first place. I'll have to do more digging.15:23:05
@zmitchell:matrix.orgzmitchellHow does providing relibc as a precompiled binary for Redox interfere with normal rustc?15:26:02
@qyliss:fairydust.spaceAlyssa RossSorry, maybe I misunderstood15:27:11
@qyliss:fairydust.spaceAlyssa RossI thought you were talking about Redox rustc as a precompiled binary15:27:26
@qyliss:fairydust.spaceAlyssa RossWhat would be the point of having relibc as a precompiled binary though? If you need a special Rust compiler, presumably you need it for more than just libc.15:28:01
@zmitchell:matrix.orgzmitchellUltimately we're trying to get Redox support in GCC so that you can compile non-Rust programs to run on Redox. We have a two-commit patch for adding Redox support, but as far as I can tell you need a supported libc for the platform as well. 15:29:56
@qyliss:fairydust.spaceAlyssa RossSo you're not interested in building Rust programs for Redox?15:30:36
@zmitchell:matrix.orgzmitchellNot using Rust in nixpkgs at the moment.15:31:03
@qyliss:fairydust.spaceAlyssa RossYou have a project to specifically build GCC that targets Redox, using Nixpkgs?15:31:27
@qyliss:fairydust.spaceAlyssa RossAnd you only want to do what you need to make that workr?15:31:39
@qyliss:fairydust.spaceAlyssa Ross * 15:31:43
@zmitchell:matrix.orgzmitchell I mean I don't want to speak for the long term plans of the whole project, but all I'm trying to do right now is be able to cross compile some packages in Nixpkgs to run on Redox. 15:32:52

Show newer messages


Back to Room ListRoom Version: 6