4 # TBD: this define should be put in system or current srcpkg.
5 # if no TOOLCHAIN specified, use default value under toolchain/${MACHINE}/default.imi
8 inc toolchain/${TOOLCHAIN}.imi
10 MACHTYPE="${MACHINE}-${OS}-${VENDOR}"
12 MACHTYPE=${MACHTYPE//^-/}
13 MACHTYPE=${MACHTYPE//-$/}
14 MACHTYPE=${MACHTYPE//--/}
15 #MACHTYPE=${MACHTYPE:=${MACHINE}.imi}
20 # DIR_PFX, and toolchain-info.
21 # ignored if file not exist.
23 inc toolchain/${MACHTYPE}.imi
25 [[ -n "$DIR_PFX" && "${DIR_PFX: -1:1}" != '/' ]] && DIR_PFX+="/"
27 [[ -n "${MACHTYPE}" ]] && MACHTYPE="${MACHTYPE}-"
28 CROSS="${DIR_PFX}${MACHTYPE}"
33 LINK="${CROSS}${LINK}"
34 SLIB="${CROSS}${SLIB}"
35 DLIB="${CROSS}${DLIB}"
36 RANLIB="${CROSS}${RANLIB}"
38 STRIP="${CROSS}${STRIP}"
39 OBJDUMP="${CROSS}${OBJDUMP}"
40 OBJCOPY="${CROSS}${OBJCOPY}"
41 READELF="${CROSS}${READELF}"
43 SIZE="${CROSS}${SIZE}"
44 GCOV="${CROSS}${GCOV}"
46 GPROF="${CROSS}${GPROF}"
47 ADDR2LINE="${CROSS}${ADDR2LINE}"
57 # DIR_PFX=${DIR_PFX:="${DIR_PFX}/"}
59 # MACHTYPE="${MACHINE}-${OS}-${VENDOR}"
60 # MACHTYPE="${MACHTYPE//--/-}"
61 # [[ "${MACHTYPE: -1:1}" == '-' ]] && MACHTYPE="${MACHTYPE:0:-1}"
62 # [[ "${MACHTYPE:0:1}" == '-' ]] && MACHTYPE="${MACHTYPE:1}"