| 13 Jan 2024 |
John Ericson | and I think I have a better fix for that too, since the CVS thing doesn't really look darwin-specific | 01:49:20 |
Alyssa Ross | Did we ever fix FreeBSD? | 09:45:23 |
Alyssa Ross | It regressed with the LLVM update | 09:45:29 |
samueldr | so uh, I have a weird exotic thing I might need some hints or help, and there's enough gaps in my knowledge of cross in general that I'm not even sure where to start from (the trivial attempts failed for different reasons at different stages) | 23:07:14 |
samueldr | it's a target that uses --target=i386-unknown-gnu from stock 2.95.3 gcc, which works with current binutils configured for the same target, but the system libraries to link with are all just binaries | 23:08:55 |
samueldr | I have built their SDK samples through a (bad) Nix setup though | 23:09:35 |
samueldr | I can't expect many things from Nixpkgs to work, if anyhing other than the toolchain, but my goal here is (as a learning experience, there's no stakes here) to try and use as much of the Nixpkgs tooling to get stuff building, and I'm not exactly sure where to start from | 23:11:11 |
raitobezarius | what is your desired next step? | 23:18:06 |
raitobezarius | build a package with that? | 23:18:08 |
samueldr | with the target/host platform dance handled through Nixpkgs machinery | 23:18:33 |
raitobezarius | I guess the first goal is to have a "system" for it in nixpkgs so that you could do import <nixpkgs> { system = "my-weird-target"; } ? | 23:18:36 |
raitobezarius | to do that you can hm | 23:18:43 |
samueldr | you can do it directly at Nixpkgs import without a name for the weird target | 23:18:58 |
raitobezarius | yes | 23:19:04 |
raitobezarius | but do you want to add the platform for it or I misunderstood completely what you are asking for :< ? | 23:19:18 |
samueldr | but there's one of the places I hit my head against: what should I do about the libc? | 23:19:19 |
raitobezarius | ah! | 23:19:23 |
samueldr | I probably won't upstream it in Nixpkgs as it would be undue burden for a mostly dead platform | 23:19:39 |
samueldr | (ever heard of BTRON and B-right/V?) | 23:19:47 |
raitobezarius | (never) | 23:19:50 |
samueldr | (it's fascinating) | 23:19:59 |
raitobezarius | I think we have this switch case | 23:20:09 |
raitobezarius | libc =
/**/ if final.isDarwin then "libSystem"
else if final.isMinGW then "msvcrt"
else if final.isWasi then "wasilibc"
else if final.isRedox then "relibc"
else if final.isMusl then "musl"
else if final.isUClibc then "uclibc"
else if final.isAndroid then "bionic"
else if final.isLinux /* default */ then "glibc"
else if final.isFreeBSD then "fblibc"
else if final.isNetBSD then "nblibc"
else if final.isAvr then "avrlibc"
else if final.isGhcjs then null
else if final.isNone then "newlib"
# TODO(@Ericson2314) think more about other operating systems
else "native/impure";
| 23:20:11 |
samueldr | yes | 23:20:16 |
samueldr | with carefulling in an overlay this can be overriden outside of Nixpkgs | 23:20:27 |
raitobezarius | hmm; so what is the problem with the libc precisely? | 23:20:47 |
samueldr | libcCrossChooser =
name:
#if name == "3bv" then final.targetPackages.bvgsdk_libc or final.bvgsdk_libc
if name == "3bv" then final.buildPackages.bvgsdk_libc or final.buildPackages.bvgsdk_libc
else super.libcCrossChooser name
;
| 23:20:57 |
raitobezarius | like you want to be able to have a meaningful overlay of nixpkgs with your libc? | 23:20:58 |
raitobezarius | hm right the cross chooser | 23:21:14 |
samueldr | In reply to @samueldr:matrix.org so uh, I have a weird exotic thing I might need some hints or help, and there's enough gaps in my knowledge of cross in general that I'm not even sure where to start from (the trivial attempts failed for different reasons at different stages) I'm not exactly sure what even makes sense here | 23:21:21 |