forked from mvaisakh/gcc-build
-
Notifications
You must be signed in to change notification settings - Fork 2
/
resources.sh
executable file
·48 lines (44 loc) · 1.46 KB
/
resources.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
#!/usr/bin/env bash
echo "*****************************************"
echo "* Download GCC & Binutils *"
echo "*****************************************"
MASTER=false
for ARGS in $@; do
case $ARGS in
master)
MASTER=true
;;
esac
done
export MASTER
download() {
if ${MASTER}; then
git clone --depth=1 -b master git://sourceware.org/git/binutils-gdb.git binutils
git clone --depth=1 -b master git://gcc.gnu.org/git/gcc.git gcc
git clone --depth=1 -b dev https://github.com/facebook/zstd zstd
cd gcc
git apply -3 \
../patches/0001* \
../patches/0002* \
../patches/0003* \
|| (echo " * Failed to apply patches * " && exit 1)
else
git clone --depth=1 -b binutils-2_43-branch git://sourceware.org/git/binutils-gdb.git binutils
git clone --depth=1 -b releases/gcc-14 git://gcc.gnu.org/git/gcc.git gcc
git clone --depth=1 -b v1.5.6 https://github.com/facebook/zstd zstd
cd gcc
git apply -3 \
../patches/0001* \
../patches/0002* \
../patches/0003* \
|| (echo " * Failed to apply patches * " && exit 1)
fi
./contrib/download_prerequisites
mkdir -p ../kernel
cd ../kernel
git init .
git remote add origin https://github.com/mengkernel/kernel_xiaomi_sm8250.git
cd ..
sed -i '/^development=/s/true/false/' binutils/bfd/development.sh
}
download