| 21 Aug 2023 |
trofi | Yes. | 06:01:18 |
trofi | There is normally no reason to add -fPIC when one builds an executable. There is -fPIE for the equivalent which is a little bit more efficient. | 06:02:12 |
rhelmot | hm. I'm a little confused because while compiling the failing derivation (xz) I'm seeing -fPIC in some units but not others | 06:09:56 |
rhelmot | I don't see anything related to hardening or pic or pie in that derivation | 06:11:07 |
trofi | You will not see -fPIC option added by nixpkgs unless you use NIX_DEBUG=. The ones you see are probably added explicitly by autotools/libtool. THat's how everyone else gets correct -fPIC values. | 06:14:09 |
rhelmot | oooooooh | 06:14:58 |
rhelmot | how do I set NIX_DEBUG? | 06:17:22 |
trofi | you can plug it into your derivation as NIX_DEBUG="1"; as another variable, or do an usual .overrideAttrs. | 06:20:11 |
rhelmot | okay, thank you! | 06:20:45 |
rhelmot | ah shit I see. it's mad about freebsd's libpthread.a | 06:29:49 |
| 23 Aug 2023 |
artemis | anyone know how i might cross build an armv6 image? (targeting pi zero) | 11:37:55 |
artemis | theres a `pkgs.pkgsCross.armv7l-hf-multiplatform` that works for the pi2 but i dont see an armv6 | 11:38:17 |
@linus:schreibt.jetzt | artemis: pkgsCross.raspberryPi is intended to work on all pis AFAIU | 11:40:01 |
artemis | oh i didnt know that existed | 11:40:13 |
artemis | ill give it a try | 11:40:23 |
@linus:schreibt.jetzt | (but aarch64 is preferable on the newer ones that support it) | 11:40:28 |
@linus:schreibt.jetzt | (since it has binary cache coverage on native builds) | 11:40:41 |
artemis | naturally | 11:41:15 |
artemis | pkgsCross.raspberryPi does indeed seem to be downloading an armv6 compiler. cool | 11:41:50 |
artemis | why is that named raspberryPi instead of something more generic | 11:42:18 |
@linus:schreibt.jetzt | historical reasons, mostly | 11:47:43 |
@linus:schreibt.jetzt | there's a raspberrypi "platform" in nixpkgs which also defines things like a kernel defconfig | 11:47:53 |
@linus:schreibt.jetzt | there are plans to make pkgsCross more consistent, afaik | 11:48:22 |
artemis | tangentially to this, can i nix-copy-closure (or whatever i actually want if its not this?) to just like, a mounted partition | 11:53:33 |
@linus:schreibt.jetzt | nix copy --to /foo will copy things to /foo/nix/store | 11:54:00 |
artemis | sweet ok | 11:54:06 |
@linus:schreibt.jetzt | using chroot stuff | 11:54:15 |