summaryrefslogtreecommitdiff
path: root/build-essential/stage1-binutils.bst
blob: 8c89c7ce2f467c9a2d419ec314b2ab372d62014e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
kind: autotools

sources:
- kind: git
  url: upstream:binutils-tarball
  track: binutils-2.25
  ref: 5500a97a2ad1735db5b35bc51cfb825c1f4c38df

depends:
- build-essential/gnome-platform.bst
- build-essential/gnome-sdk.bst

variables:
  prefix: /tools

environment:
  PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin

config:
  configure-commands:
  # We set the sysroot location dynamically at runtime by passing
  # `--sysroot` to GCC, so we need to build a linker with sysroot support.
  # We set it to a non-existent directory as a safety net to avoid looking
  # at the host dirs in case we forget to set the sysroot.  Setting the
  # lib path is vital to avoid the tools we build linking to the libraries
  # on the host system; the '=' makes the path we give relative to the
  # sysroot, which we can then set at runtime by passing -Wl,--sysroot to
  # GCC.  Although nothing should be installed on /lib64, we configure the
  # linker to look at that directory as well to make things more robust
  # (currently GCC installs libraries to this directory at least on
  # x86_64).

  - |
    %{configure} --disable-nls --disable-werror \
      --build=$(sh config.guess) \
      --host=$(sh config.guess) \
      --target=%{target-stage1} \
      --with-sysroot=/nonexistentdir --with-lib-path="=%{prefix}/lib:=%{prefix}/lib64"