diff options
author | Zhaofeng Li <hello@zhaofeng.li> | 2021-12-16 21:06:07 -0800 |
---|---|---|
committer | Zhaofeng Li <hello@zhaofeng.li> | 2022-06-06 21:34:52 -0700 |
commit | 8807cab81b09fa3c1d611e44a3ba4ac446d09f08 (patch) | |
tree | bb8c99832774371f1941552f8b5a620ff44ae334 | |
parent | 6919d2ed24e18a5dde6479c77532181eca4c9322 (diff) | |
download | nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.tar nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.tar.gz nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.tar.bz2 nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.tar.lz nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.tar.xz nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.tar.zst nixpkgs-8807cab81b09fa3c1d611e44a3ba4ac446d09f08.zip |
libffi: Pass --build and --host to configure script
Without this, building `libffi` would do something horrible when natively targeting `armv5tel-linux` on an `aarch64-linux` machine using the 32-bit compatibility sub-mode: ``` $ nix-build --system armv5tel-linux -A libffi --check [...] checking build system type... aarch64-unknown-linux-gnu checking host system type... aarch64-unknown-linux-gnu checking target system type... aarch64-unknown-linux-gnu [...] $ file result/lib/libffi.so.8.1.0 result/lib/libffi.so.8.1.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped $ nm result/lib/libffi.so.8.1.0 | grep ffi_call U ffi_call ``` Correct arch-specific code wouldn't be built at all, with the resulting binary subtly broken.
-rw-r--r-- | pkgs/development/libraries/libffi/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libffi/default.nix b/pkgs/development/libraries/libffi/default.nix index 7387a4a1f06..43661198b28 100644 --- a/pkgs/development/libraries/libffi/default.nix +++ b/pkgs/development/libraries/libffi/default.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + configurePlatforms = [ "build" "host" ]; + configureFlags = [ "--with-gcc-arch=generic" # no detection of -march= or -mtune= "--enable-pax_emutramp" |