21 Oct 2024 |
Alyssa Ross | Name it after the triple passed as --target to binutils | 12:06:09 |
Alyssa Ross | In reply to @luckytethys:matrix.org No, at least I don't know how to do it with overrides. The existing one uses stdenv to figure out target , etc, while I need to specify it explicitly. Add a parameter that defaults to the stdenv one? | 12:06:19 |
Tethys Svensson | In reply to @qyliss:fairydust.space Name it after the triple passed as --target to binutils So e.g. aarch64-unknown-linux-gnu-binutils ? And then place it in top-level/all-packages.nix ? | 12:07:28 |
Tethys Svensson | In reply to @qyliss:fairydust.space Add a parameter that defaults to the stdenv one? I'll try to see if I can make that work | 12:07:36 |
Alyssa Ross | In reply to @luckytethys:matrix.org So e.g. aarch64-unknown-linux-gnu-binutils ? And then place it in top-level/all-packages.nix ? Yeah, I think so. | 12:08:20 |
Alyssa Ross | Maaaybe we could get away with aarch64-linux-binutils, I'm not sure | 12:08:29 |
Alyssa Ross | but we can always rename later | 12:08:32 |
Tethys Svensson | Actually, I don't know how to do that. The --target is set implicitly by the stdenv.mkDerivation , while my derivation passes --target explicitly. How do I unify those? | 12:08:40 |
Alyssa Ross | and I think it's probably better to just match what we asked binutils to build | 12:08:47 |
Alyssa Ross | Remove "target" from configurePlatforms and pass it explicitly. | 12:09:37 |
Tethys Svensson | Hmm, the derivation also uses a lot of other information from targetPlatform , like isAvr and isWindows . Should I try to create an object that matches the targetPlatform format? Isn't that almost as bad as my original approach? | 12:15:43 |
Alyssa Ross | Hmm, looking | 12:18:01 |
Alyssa Ross | It might be that some of this can be cleaned up | 12:18:24 |
Alyssa Ross | Generally we don't like conditionally applied patches like this | 12:20:38 |
Alyssa Ross | The iOS one looks like it just tells binutils to build for ios triples exactly the same as Darwin ones, so we could probably get rid of that by just passing a Darwin triple instead of an iOS one | 12:21:18 |
Alyssa Ross | The Windows one could just be applied unconditionally I'm pretty sure | 12:21:51 |
Alyssa Ross | As could the iOS one actually if we want to keep it | 12:22:02 |
Alyssa Ross | (The reason conditionally applied patches are bad, aside from bringing up this sort of situation, is that nobody will check they still work when updating binutils) | 12:22:26 |
Alyssa Ross | The Darwin one says "Remove the conditional with the next update" | 12:23:02 |
Tethys Svensson | As far as I can tell, these are the things targetPlatform is used in that derivation:
- Comparing with
hostPlatform to e.g. set a targetPrefix or set the stripDebugList
- For an assertion regarding if
enableGold is set for a targetPlatform where it doesn't make sense
- For pulling the src from a different place for
vc4-none
- For a lot of conditional patches
- To do some symlinks in
postInstall
- Implicitly used because of the
configurePlatforms
| 12:24:42 |
Alyssa Ross | Yeah | 12:25:01 |
Alyssa Ross | Lots of those checks are actually just checking whether it's a cross compile | 12:25:19 |
Alyssa Ross | Which will always be true for these new packages | 12:25:25 |
Alyssa Ross | AVR patch should also be unconditionally appliable | 12:27:03 |
Alyssa Ross | The optional dependencies for specific platforms look highly sus | 12:27:36 |
Alyssa Ross | It looks like autoreconfHook was added at the same time as the patch for iOS, but the patch doesn't look like it should need an autoreconf? | 12:29:16 |
Alyssa Ross | oh I do not like that vc4 is using some fork | 12:30:18 |
Alyssa Ross | which has been abandoned for 12 years | 12:31:04 |
Alyssa Ross | emilyyou removed a default-gcc-version override for vc4 recently. Do you know if anybody is still using it?
| 12:31:53 |
Alyssa Ross | Oh apparently nobody is, because the patches don't even apply to it lol | 12:32:19 |