-
Notifications
You must be signed in to change notification settings - Fork 11
/
manual-build-avr.sh
executable file
·55 lines (39 loc) · 1.24 KB
/
manual-build-avr.sh
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
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Simple script for manual building of local gcc+avr-libc.
BB_ARCH=avr
REGRESSION_RECIPIENTS="dinuxbg@gmail.com"
# Do not send any email for this session
Mail()
{
true
}
bb_daily_target_test()
{
local PREV_BUILD_TAG=${1}
local BUILD_TAG=${2}
bb_clean
local GCC_TOT=`cd gcc && git rev-parse HEAD`
local BINUTILS_TOT=`cd binutils && git rev-parse HEAD`
local AVRLIBC_TOT=`cd avrlibc && git rev-parse HEAD`
echo "gcc ${GCC_TOT}" >> ${LOGDIR}/${BUILD_TAG}/versions.txt
echo "binutils ${BINUTILS_TOT}" >> ${LOGDIR}/${BUILD_TAG}/versions.txt
echo "avr-libc ${AVRLIBC_TOT}" >> ${LOGDIR}/${BUILD_TAG}/versions.txt
# Build binutils
bb_config binutils "--disable-gdb --target=avr"
bb_make binutils "-j`nproc`"
bb_make binutils "install"
export PATH=${PREFIX}/bin:${PATH}
bb_config gcc "--target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2"
bb_make gcc "-j`nproc`"
bb_make gcc "install"
# Libc
(cd ${WORKSPACE}/avrlibc && ./bootstrap) || error "failed to bootstrap avr-libc source"
bb_config avrlibc '--host=avr'
bb_make avrlibc "-j`nproc`"
bb_make avrlibc "install"
}
. `dirname ${0}`/buildbot-lib.sh
bb_init ${@}
bb_daily_build