Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295417

Pass $AR to binutils cross-build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • infrastructure
    • None
    • b20

      While adapting my CI to build hsdis automatically, I realized that sometimes we miss the proper $AR for binutils cross-build. Configure would then fail like:

      ```
      $ CXX=aarch64-linux-gnu-g++ CC=aarch64-linux-gnu-gcc sh ./configure --with-debug-level=fastdebug --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64 --with-boot-jdk=/home/shade/Install/jdk19u-ea --with-hsdis=binutils --with-binutils-src=binutils-2.38
      ...
      /usr/bin/bash: line 1: aarch64-unknown-linux-gnu-ar: command not found
      gmake[1]: *** [Makefile:254: libiberty.a] Error 127
      gmake[1]: Leaving directory '/home/shade/trunks/jdk/build/linux-aarch64-server-fastdebug/configure-support/binutils/libiberty'
      gmake: *** [Makefile:9220: all-libiberty] Error 2
      configure: Automatic building of binutils failed on make. Try building it manually
      configure: error: Cannot continue
      configure exiting with result code 1
      ```

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: