File builders/riscv64-binutils-0/builder.sh deleted (index 1bd083e..0000000) |
1 |
|
src_name=binutils |
|
2 |
|
version=2.36.1 |
|
3 |
|
archive_name=$src_name-$version.tar.xz |
|
4 |
|
url0=http://ftpmirror.gnu.org/$src_name/$archive_name |
|
5 |
|
|
|
6 |
|
slot=0 |
|
7 |
|
target_arch=riscv64 |
|
8 |
|
# linux-gnu counts as 1, gnu as gnu libc, or glibc, could become musl |
|
9 |
|
target_triple=$target_arch-unknown-linux-gnu |
|
10 |
|
|
|
11 |
|
pkg_dir=$pkgs_dir_root/$src_name-$version |
|
12 |
|
rm -Rf $pkg_dir |
|
13 |
|
mkdir -p $pkgs_dir_root |
|
14 |
|
cp -f $src_dir_root/$archive_name $pkgs_dir_root |
|
15 |
|
cd $pkgs_dir_root |
|
16 |
|
tar xf $archive_name |
|
17 |
|
|
|
18 |
|
build_dir=$builds_dir_root/$pkg_name |
|
19 |
|
rm -Rf $build_dir |
|
20 |
|
mkdir -p $build_dir |
|
21 |
|
cd $build_dir |
|
22 |
|
|
|
23 |
|
export "CC=gcc -B/nyan/glibc/current/lib -L/nyan/glibc/current/lib -Wl,-rpath-link,/nyan/glibc/current/lib -static-libgcc" |
|
24 |
|
export 'CFLAGS=-O2 -pipe -fPIC' |
|
25 |
|
$pkg_dir/configure \ |
|
26 |
|
--target=$target_triple \ |
|
27 |
|
--prefix=/nyan/$target_arch-$src_name/$slot \ |
|
28 |
|
--disable-shared \ |
|
29 |
|
--disable-nls \ |
|
30 |
|
--disable-gold \ |
|
31 |
|
--disable-checks \ |
|
32 |
|
--with-mmap |
|
33 |
|
unset CFLAGS |
|
34 |
|
unset CC |
|
35 |
|
|
|
36 |
|
make -j $threads_n |
|
37 |
|
make install |
|
38 |
|
|
|
39 |
|
# cleanup and tidying |
|
40 |
|
rm -Rf /nyan/$target_arch-$src_name/$slot/share/info |
|
41 |
|
rm -Rf /nyan/$target_arch-$src_name/$slot/share/man |
|
42 |
|
rmdir -p /nyan/$target_arch-$src_name/$slot/share || true |
|
43 |
|
find /nyan/$target_arch-$src_name/$slot -type f -name '*.la' | xargs rm -f |
|
44 |
|
find /nyan/$target_arch-$src_name/$slot -type f | while IFS= read -r f; do if file $f | egrep 'ELF.+(shared|executable)' >/dev/null; then strip -s $f; fi; done |
|
45 |
|
|
|
46 |
|
rm -Rf $build_dir $pkg_dir |
|
File builders/rv64/binutils-2.41/builder.sh added (mode: 100644) (index 0000000..78ed59b) |
|
1 |
|
src_name=binutils |
|
2 |
|
version=2.41 |
|
3 |
|
slot=$version |
|
4 |
|
archive_name=$src_name-$version.tar.xz |
|
5 |
|
url0=http://ftpmirror.gnu.org/$src_name/$archive_name |
|
6 |
|
|
|
7 |
|
target_arch=riscv64 |
|
8 |
|
# linux-gnu counts as 1, gnu as gnu libc, or glibc, could become musl |
|
9 |
|
target_triple=$target_arch-unknown-linux-gnu |
|
10 |
|
|
|
11 |
|
pkg_dir=$pkgs_dir_root/rv64/$src_name-$version |
|
12 |
|
rm -Rf $pkg_dir |
|
13 |
|
mkdir -p $pkgs_dir_root/rv64 |
|
14 |
|
cp -f $src_dir_root/$archive_name $pkgs_dir_root/rv64 |
|
15 |
|
cd $pkgs_dir_root/rv64 |
|
16 |
|
tar xf $archive_name |
|
17 |
|
|
|
18 |
|
build_dir=$builds_dir_root/rv64/$pkg_name |
|
19 |
|
rm -Rf $build_dir |
|
20 |
|
mkdir -p $build_dir |
|
21 |
|
cd $build_dir |
|
22 |
|
|
|
23 |
|
# Usual autotools/meson/cmake crap. |
|
24 |
|
mkdir $build_dir/bin |
|
25 |
|
cat >$build_dir/bin/makeinfo <<EOF |
|
26 |
|
#!/bin/sh |
|
27 |
|
printf "Makeinfo crap detected!\n" |
|
28 |
|
EOF |
|
29 |
|
chmod +x $build_dir/bin/makeinfo |
|
30 |
|
|
|
31 |
|
PATH_SAVED=$PATH |
|
32 |
|
export PATH="\ |
|
33 |
|
$build_dir/bin:\ |
|
34 |
|
/nyan/make/current/bin:\ |
|
35 |
|
$PATH\ |
|
36 |
|
" |
|
37 |
|
|
|
38 |
|
# We should create a compiler driver wrapper to please libtool/cmake/meson crap. |
|
39 |
|
# --static is a libtool special keyword to force building static binaries, because libtool is whole |
|
40 |
|
# compiler driver by itself. |
|
41 |
|
export "CC=\ |
|
42 |
|
/opt/toolchains/x64/elf/binutils-gcc/current/bin/x86_64-pc-linux-gnu-gcc \ |
|
43 |
|
-isystem /nyan/glibc/current/include \ |
|
44 |
|
-isystem /nyan/linux-headers/current/include \ |
|
45 |
|
-I/nyan/zlib/current/include \ |
|
46 |
|
-B/nyan/glibc/current/lib \ |
|
47 |
|
-L/nyan/glibc/current/lib \ |
|
48 |
|
-L/nyan/zlib/current/lib \ |
|
49 |
|
-Wl,-s -static-libgcc \ |
|
50 |
|
--static" |
|
51 |
|
export 'CFLAGS=-O2 -pipe -fPIC -ftls-model=global-dynamic' |
|
52 |
|
export AR=/opt/toolchains/x64/elf/binutils-gcc/current/bin/x86_64-pc-linux-gnu-gcc-ar |
|
53 |
|
$pkg_dir/configure \ |
|
54 |
|
--target=$target_triple \ |
|
55 |
|
--prefix=/nyan/toolchains/rv64/$src_name/$slot \ |
|
56 |
|
--program-prefix=$target_triple- \ |
|
57 |
|
--enable-gold=no \ |
|
58 |
|
--enable-gprofng=no \ |
|
59 |
|
--with-system-zlib \ |
|
60 |
|
--with-static-standard-libraries \ |
|
61 |
|
--disable-multilib \ |
|
62 |
|
--disable-plugins \ |
|
63 |
|
--enable-serial-host-configure \ |
|
64 |
|
--enable-serial-build-configure \ |
|
65 |
|
--enable-serial-target-configure \ |
|
66 |
|
--enable-year2038 \ |
|
67 |
|
--with-mmap \ |
|
68 |
|
--disable-libctf \ |
|
69 |
|
--disable-rpath \ |
|
70 |
|
--disable-nls \ |
|
71 |
|
--disable-checks |
|
72 |
|
unset CC |
|
73 |
|
unset CFLAGS |
|
74 |
|
unset AR |
|
75 |
|
|
|
76 |
|
make -j $threads_n |
|
77 |
|
make install |
|
78 |
|
|
|
79 |
|
# cleanup and tidying |
|
80 |
|
export PATH=$PATH_SAVED |
|
81 |
|
unset PATH_SAVED |
|
82 |
|
rm -Rf $build_dir $pkg_dir |