summaryrefslogtreecommitdiff
path: root/etc/imports/binutils.TARGETS
blob: 617f86d29ffa561ce1865f4ff3d6446669bac415 (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
{ "files": {"type": "install", "deps": [["TREE", null, "."]]}
, "binutils":
  { "type": "export"
  , "target": "binutils binaries"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  }
, "multi-target strip":
  { "type": "export"
  , "target": "multi-target strip binary"
  , "flexible_config": ["ARCH", "TARGET_ARCH", "TOOLCHAIN_CONFIG", "ENV"]
  }
, "binutils binaries":
  { "type": ["@", "rules", "CC/foreign/shell", "data"]
  , "project": ["files"]
  , "cmds":
    [ "export NJOBS=$(nproc --all 2>/dev/null || echo 1)"
    , "unset LDFLAGS"
    , "if [ -f /lib/ld-musl-$(uname -m).so.1 ]; then"
    , "  ln -s /lib/ld-musl-$(uname -m).so.1 ${TMPDIR}/ldd"
    , "  export PATH=$PATH:${TMPDIR}"
    , "fi"
    , "mkdir build"
    , "cd build"
    , "../configure --prefix=/ --disable-nls --enable-gprofng=no --disable-werror --enable-deterministic-archives --enable-plugins --enable-gold >configure.log 2>&1 || (cat configure.log && exit 1)"
    , "${MAKE} -j${NJOBS} MAKEINFO=true >build.log 2>&1 || (cat configure.log build.log && exit 1)"
    , "${MAKE} -j${NJOBS} MAKEINFO=true DESTDIR=${DESTDIR} install-strip >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
    , "find ${DESTDIR} -type f -name '*.la' -exec sed -i 's|'$(pwd)'|/build|g' {} \\;"
    ]
  , "out_dirs": ["."]
  }
, "multi-target strip binary":
  { "type": ["@", "rules", "CC/foreign/shell", "data"]
  , "project": ["files"]
  , "cmds":
    [ "export NJOBS=$(nproc --all 2>/dev/null || echo 1)"
    , "unset LDFLAGS"
    , "if [ -f /lib/ld-musl-$(uname -m).so.1 ]; then"
    , "  ln -s /lib/ld-musl-$(uname -m).so.1 ${TMPDIR}/ldd"
    , "  export PATH=$PATH:${TMPDIR}"
    , "fi"
    , "mkdir build"
    , "cd build"
    , "../configure --prefix=/ --enable-targets=all --enable-deterministic-archives --disable-nls --disable-gprofng --disable-ld --disable-gdb --disable-werror >configure.log 2>&1 || (cat configure.log && exit 1)"
    , "${MAKE} -j${NJOBS} MAKEINFO=true all-binutils >build.log 2>&1 || (cat configure.log build.log && exit 1)"
    , "${MAKE} -j${NJOBS} MAKEINFO=true DESTDIR=${DESTDIR} install-strip-binutils >>build.log 2>&1 || (cat configure.log build.log && exit 1)"
    ]
  , "outs": ["bin/strip"]
  }
}