summaryrefslogtreecommitdiff
path: root/elements/gnu-toolchain/stage2-linux-api-headers.bst
blob: 6759687129329e014158b90f76e47a86da2f6678 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
kind: manual

sources:
- kind: git
  url: upstream:linux
  track: v4.11
  ref: a351e9b9fc24e982ec2f0e76379a49826036da12

depends:
- filename: gnu-toolchain/stage1.bst
  type: build

variables:
  prefix: /tools
  kernel-arch: unsupported

arches:
  armv5:
    variables:
      kernel-arch: arm
  armv7b:
    variables:
      kernel-arch: arm
  armv7l:
    variables:
      kernel-arch: arm
  armv7lhf:
    variables:
      kernel-arch: arm
  armv8l64:
    variables:
      kernel-arch: arm64
  armv8b64:
    variables:
      kernel-arch: arm64
  ppc64b:
    variables:
      kernel-arch: powerpc
  ppc64l:
    variables:
      kernel-arch: powerpc
  x86_32:
    variables:
      kernel-arch: i386
  x86_64:
    variables:
      kernel-arch: x86_64

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

config:
  install-commands:
  - |
    if [ '%{kernel-arch}' == 'unsupported' ]; then
        echo "Error: unsupported architecture: %{bst-target-arch}" >&2
        exit 1
    fi
    ARCH=%{kernel-arch} make INSTALL_HDR_PATH=dest headers_install
  - install -d "%{install-root}%{includedir}"
  - cp -r dest/include/* "%{install-root}%{includedir}"