-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild
executable file
·68 lines (55 loc) · 1.34 KB
/
build
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
62
63
64
65
66
67
68
#!/bin/sh
set -x
ORIGIN_DIR=$(pwd)
ROOTDIR=$(dirname $(realpath $0))
echo $ROOTDIR
export MAKEFLAGS=-j` nproc`
export CFLAGS="-g3 -O0"
export CXXFLAGS="-g3 -O0"
#export CCASFLAGS="-O0"
export LIBCFLAGS="-g3 -O0"
#export CFLAGS_FOR_TARGET="-g3 -O0"
export PREFIX="$ROOTDIR/opt/libc"
GCCDIR=$(realpath ../abanu-toolchain/opt/gcc-8.2.0-cross/bin)
echo $GCCDIR
export PATH=$GCCDIR:"$PATH"
wget https://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz
wget https://ftp.gnu.org/gnu/autoconf/autoconf-2.65.tar.gz
tar xvf automake-1.11.tar.gz
tar xvf autoconf-2.65.tar.gz
cd $ROOTDIR
mkdir -p automake-build
cd automake-build
../automake-1.11/configure --prefix=$PREFIX
make && make install
cd $ROOTDIR
mkdir -p autoconf-build
cd autoconf-build
../autoconf-2.65/configure --prefix=$PREFIX
make && make install
export PATH=$PREFIX/bin:"$PATH"
echo $PATH
autoconf --version
automake --version
SYSROOT=$PREFIX
# make symbolic link:
cd $GCCDIR
ln i686-elf-ar i686-abanu-ar
ln i686-elf-as i686-abanu-as
ln i686-elf-gcc i686-abanu-gcc
ln i686-elf-gcc i686-abanu-cc
ln i686-elf-ranlib i686-abanu-ranlib
cd $ROOTDIR
cd $ROOTDIR
mkdir -p newlib-build
cd $ROOTDIR/newlib/newlib/libc/sys
autoconf
cd abanu
pwd
autoreconf
cd $ROOTDIR/newlib-build
../newlib/configure --prefix=$PREFIX --target=i686-abanu --enable-target-optspace
make all
echo $ROOTDIR
echo $SYSROOT
make install