Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtool: fix /usr/bin/file impurity affecting cross-compilation #166722

Closed
wants to merge 1 commit into from
Closed

libtool: fix /usr/bin/file impurity affecting cross-compilation #166722

wants to merge 1 commit into from

Commits on Mar 31, 2022

  1. libtool: fix /usr/bin/file impurity affecting cross-compilation

    libtool's libtool.m4 script assumes that `file` is available, and can
    be found at `/usr/bin/file` (this path is hardwired).  Furthermore,
    the script with this assumption is vendored into the ./configure
    scripts of an enormous number of packages.
    
    This commit makes two changes:
    
      * It adds a `substituteInPlace` in the `libtool` expression so that
        autoreconfHook'ed packages will find `file` in the correct
        location.  This is currently guarded by a check for
        cross-compilation in order to prevent mass-rebuilds.
    
      * It adds a top-level `fixPathToUsrBinFileInConfigureScript` to
        `substituteInPlace` the `./configure` script of packages directly,
        for use with packages which would break if autoreconfHook'ed.
    
    This commit allows the mips64el-linux-gnuabi64 bootstrap-files to be
    built in a sandbox (as required by Hydra) by implementing the two
    changes above, adding `autoreconfHook` to `gmp`, `pcre`, `isl`, and
    `libmpc`, as well as adding `fixPathToUsrBinFileInConfigureScript` to
    `mpfr` (since `mpfr` breaks if autoreconf'ed with the latest
    autotools); this was verified with:
    
    ```
      nix-build \
        --option sandbox true \
        --option fallback false \
        pkgs/top-level/release-cross.nix \
        -A bootstrapTools.mips64el-linux-gnuabi64.build
    ```
    Adam Joseph committed Mar 31, 2022
    Configuration menu
    Copy the full SHA
    5117d4a View commit details
    Browse the repository at this point in the history