23 Apr 2025 |
dramforever | i'm not surprised that arm's gcc is different from what we have in nixpkgs | 16:28:16 |
dramforever | or newlib | 16:28:23 |
rosssmyth | arm's gcc is just upstream gcc with some config flags afaik. | 16:28:40 |
rosssmyth | Download 14.2.rel1-x86_64-arm-none-eabi-manifest.txt | 16:30:29 |
rosssmyth | that's the manifest | 16:30:34 |
rosssmyth | * that's the config manifest | 16:31:04 |
rosssmyth | There should be some sort of solution. The arm-embedded gcc supports multiple arches, the mainly limiter is the libc. Clang has some way of only rebuilding compiler-rt for different targets. Even rebuilding the libc would be acceptable. | 16:33:12 |
dramforever | i'm not familiar with gcc internals, but i guess we can have some sort of database of "base" gccs | 16:36:47 |
dramforever | the main difference between gcc and clang in this regard is that one single clang can support all targets | 16:37:03 |
rosssmyth | Yes, Clang is sane. But right now a clang stdenv can't be built for arm-embedded | 16:39:08 |
rosssmyth | Redacted or Malformed Event | 16:39:55 |
rosssmyth | * Yes, Clang is sane. But right now a clang stdenv can't be built for arm-embedded | 16:41:47 |
dramforever | can you confirm that arm-embedded has ever worked before? | 16:41:52 |
dramforever | to me it doesn't seem like pkgsCross.arm-embedded.stdenv.cc should successfully build for -mcpu=cortex-m0 | 16:43:12 |
dramforever | it is effectively an unimplemented case | 16:43:29 |
dramforever | * it is effectively an unimplemented case in nixpkgs | 16:43:34 |
rosssmyth | Define "worked" | 16:44:09 |
dramforever | successfully produce a program for cortex-m0 | 16:44:35 |
rosssmyth | I showed you how I have done it, and it compiled successfully. I have not flashed any firmware, and inspecting the objdump it would have failed to flash. | 16:44:42 |
rosssmyth | I also just opened an issue because the armv6-m machinery is messed up and doesn't generate the correct gcc | 16:45:12 |
rosssmyth | * I also just opened an issue because the armv6-m machinery is messed up and doesn't generate the correct gcc wrapper | 16:45:19 |
dramforever | maybe i misunderstood but did you ever have an old version of nixpkgs that had a working pkgsCross.arm-embedded.stdenv.cc | 16:46:29 |
dramforever | again, as in, produce code correctly for cortex-m0 | 16:46:46 |
rosssmyth | no | 16:46:50 |
dramforever | okay thanks for clarifying | 16:47:01 |
dramforever | this is the thing i'm getting
../.././newlib/libm/math/e_atanh.c:73:1: sorry, unimplemented: '-fstack-check=specific' for Thumb-1
| 16:47:41 |
dramforever | and like, tens of other errors on other similar functions | 16:47:52 |
rosssmyth | Ok | 16:48:48 |
dramforever | that's (import ./. { crossSystem = { config = "armv6m-none-eabi"; libc = "newlib"; gcc.float-abi = "softfp"; gcc.cpu = "cortex-m0"; }; }).stdenv.cc on aca270648ecaa9450a6feb34ff2d995e0b0a3444 | 16:49:16 |
rosssmyth | There are many broken things in how arm seems to be handled in generating a stdenv | 16:49:22 |