File x64/elf/glibc.sh added (mode: 100755) (index 0000000..2ae81a0) |
|
1 |
|
#!/bin/sh |
|
2 |
|
|
|
3 |
|
# The glibc is lost. With the help of the ELF design failures, their manic abuse of GNU versioning, |
|
4 |
|
# mandating a recent gcc compiler... actually many recent gnu only tools, this is just a text-book |
|
5 |
|
# case of planned obsolescence. |
|
6 |
|
|
|
7 |
|
# In the end, you don't really have more freedom than with msft windows. At least it has the decency |
|
8 |
|
# to cost 0 and nobody should be paid for that work. If anybody is, this is a scam. |
|
9 |
|
|
|
10 |
|
# Downgraded to obsolete/scam and should be replaced. |
|
11 |
|
|
|
12 |
|
# This is not a host != build script. |
|
13 |
|
|
|
14 |
|
glibc_version=2.38 |
|
15 |
|
|
|
16 |
|
set -e |
|
17 |
|
top_dir=$(readlink -f $(dirname $0)) |
|
18 |
|
top_src_dir=/root/nyanlinux/src |
|
19 |
|
top_build_dir=/run/x64/elf/glibc |
|
20 |
|
install_dir=/nyan/glibc/$glibc_version |
|
21 |
|
jobs_n=11 |
|
22 |
|
|
|
23 |
|
printf "TOP_DIR=$top_dir\n" |
|
24 |
|
printf "TOP_SRC_DIR=$top_src_dir\n" |
|
25 |
|
printf "TOP_BUILD_DIR=$top_build_dir\n" |
|
26 |
|
printf "INSTALL_DIR=$install_dir\n" |
|
27 |
|
printf "USING $jobs_n PARALLEL JOBS\n" |
|
28 |
|
#--------------------------------------------------------------------------------------------------- |
|
29 |
|
rm -Rf $top_build_dir |
|
30 |
|
mkdir -p $top_build_dir |
|
31 |
|
cd $top_build_dir |
|
32 |
|
#--------------------------------------------------------------------------------------------------- |
|
33 |
|
(. $top_dir/glibc/bison.sh) & |
|
34 |
|
(. $top_dir/glibc/gawk.sh) & |
|
35 |
|
(. $top_dir/glibc/grep.sh) & |
|
36 |
|
wait |
|
37 |
|
. $top_dir/glibc/glibc.sh |
|
38 |
|
. $top_dir/glibc/fix_install.sh |
File x64/elf/glibc/bison.sh added (mode: 100644) (index 0000000..dbdc923) |
|
1 |
|
export PATH="\ |
|
2 |
|
:/nyan/busybox/current/sbin:/nyan/busybox/current/bin\ |
|
3 |
|
:/opt/toolchains/x64/elf/binutils-gcc/current/bin\ |
|
4 |
|
:/nyan/m4/current/bin\ |
|
5 |
|
:/nyan/make/current/bin\ |
|
6 |
|
" |
|
7 |
|
|
|
8 |
|
rm -Rf $top_build_dir/build-system-bison |
|
9 |
|
mkdir $top_build_dir/build-system-bison |
|
10 |
|
cd $top_build_dir/build-system-bison |
|
11 |
|
#-------------------------------------------------------------------------------------------------- |
|
12 |
|
cp $top_src_dir/bison-3.8.2.tar.xz ./ |
|
13 |
|
tar xf bison-3.8.2.tar.xz |
|
14 |
|
|
|
15 |
|
mkdir ./build |
|
16 |
|
cd ./build |
|
17 |
|
|
|
18 |
|
# It really wants everything there. |
|
19 |
|
export CC="gcc \ |
|
20 |
|
-isystem /nyan/linux-headers/current/include -isystem /nyan/glibc/current/include \ |
|
21 |
|
-O2 -pipe -static-libgcc \ |
|
22 |
|
-B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \ |
|
23 |
|
" |
|
24 |
|
|
|
25 |
|
$top_build_dir/build-system-bison/bison-3.8.2/configure \ |
|
26 |
|
--prefix=$top_build_dir/sdk \ |
|
27 |
|
--enable-threads=posix \ |
|
28 |
|
--disable-rpath \ |
|
29 |
|
--disable-nls |
|
30 |
|
unset CC |
|
31 |
|
make -j $jobs_n |
|
32 |
|
make install |
|
33 |
|
|
|
34 |
|
cd $top_build_dir |
File x64/elf/glibc/fix_install.sh added (mode: 100644) (index 0000000..dc8cc7e) |
|
1 |
|
rm -f $install_dir/bin/ld.so |
|
2 |
|
mkdir -p $install_dir/lib64 |
|
3 |
|
mv -f $install_dir/lib/ld-linux-x86-64.so.2 $install_dir/lib64 |
|
4 |
|
|
|
5 |
|
/opt/toolchains/x64/elf/binutils-gcc/current/bin/strip -s \ |
|
6 |
|
$install_dir/bin/gencat \ |
|
7 |
|
$install_dir/bin/getconf \ |
|
8 |
|
$install_dir/bin/getent \ |
|
9 |
|
$install_dir/bin/iconv \ |
|
10 |
|
$install_dir/bin/locale \ |
|
11 |
|
$install_dir/bin/localedef \ |
|
12 |
|
$install_dir/bin/makedb \ |
|
13 |
|
$install_dir/bin/pcprofiledump \ |
|
14 |
|
$install_dir/bin/pldd \ |
|
15 |
|
$install_dir/bin/sprof \ |
|
16 |
|
$install_dir/bin/zdump \ |
|
17 |
|
\ |
|
18 |
|
$install_dir/lib/audit/*.so \ |
|
19 |
|
$install_dir/lib/gconv/*.so \ |
|
20 |
|
$install_dir/lib/libBrokenLocale.so.1 \ |
|
21 |
|
$install_dir/lib/libanl.so.1 \ |
|
22 |
|
$install_dir/lib/libc.so.6 \ |
|
23 |
|
$install_dir/lib/libdl.so.2 \ |
|
24 |
|
$install_dir/lib/libm.so.6 \ |
|
25 |
|
$install_dir/lib/libmvec.so.1 \ |
|
26 |
|
$install_dir/lib/libnsl.so.1 \ |
|
27 |
|
$install_dir/lib/libnss_compat.so.2 \ |
|
28 |
|
$install_dir/lib/libnss_db.so.2 \ |
|
29 |
|
$install_dir/lib/libnss_dns.so.2 \ |
|
30 |
|
$install_dir/lib/libnss_files.so.2 \ |
|
31 |
|
$install_dir/lib/libnss_hesiod.so.2 \ |
|
32 |
|
$install_dir/lib/libpthread.so.0 \ |
|
33 |
|
$install_dir/lib/libresolv.so.2 \ |
|
34 |
|
$install_dir/lib/librt.so.1 \ |
|
35 |
|
$install_dir/lib/libthread_db.so.1 \ |
|
36 |
|
$install_dir/lib/libutil.so.1 \ |
|
37 |
|
\ |
|
38 |
|
$install_dir/lib64/ld-linux-x86-64.so.2 \ |
|
39 |
|
\ |
|
40 |
|
$install_dir/libexec/getconf/POSIX_V6_LP64_OFF64 \ |
|
41 |
|
$install_dir/libexec/getconf/POSIX_V7_LP64_OFF64 \ |
|
42 |
|
$install_dir/libexec/getconf/XBS5_LP64_OFF64 \ |
|
43 |
|
\ |
|
44 |
|
$install_dir/sbin/iconvconfig \ |
|
45 |
|
$install_dir/sbin/ldconfig \ |
|
46 |
|
$install_dir/sbin/sln \ |
|
47 |
|
$install_dir/sbin/zic |
File x64/elf/glibc/gawk.sh added (mode: 100644) (index 0000000..16a7dfd) |
|
1 |
|
export PATH="\ |
|
2 |
|
:/nyan/busybox/current/sbin:/nyan/busybox/current/bin\ |
|
3 |
|
:/opt/toolchains/x64/elf/binutils-gcc/current/bin\ |
|
4 |
|
:/nyan/make/current/bin\ |
|
5 |
|
" |
|
6 |
|
|
|
7 |
|
rm -Rf $top_build_dir/build-system-gawk |
|
8 |
|
mkdir $top_build_dir/build-system-gawk |
|
9 |
|
cd $top_build_dir/build-system-gawk |
|
10 |
|
#-------------------------------------------------------------------------------------------------- |
|
11 |
|
cp $top_src_dir/gawk-5.2.2.tar.xz ./ |
|
12 |
|
tar xf gawk-5.2.2.tar.xz |
|
13 |
|
|
|
14 |
|
mkdir ./build |
|
15 |
|
cd ./build |
|
16 |
|
|
|
17 |
|
# It really wants everything there. |
|
18 |
|
export CC="gcc \ |
|
19 |
|
-isystem /nyan/linux-headers/current/include -isystem /nyan/glibc/current/include \ |
|
20 |
|
-O2 -pipe -static-libgcc \ |
|
21 |
|
-B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \ |
|
22 |
|
" |
|
23 |
|
$top_build_dir/build-system-gawk/gawk-5.2.2/configure \ |
|
24 |
|
--prefix=$top_build_dir/sdk \ |
|
25 |
|
--disable-mpfr \ |
|
26 |
|
--disable-pma \ |
|
27 |
|
--enable-threads=posix \ |
|
28 |
|
--disable-rpath \ |
|
29 |
|
--disable-nls \ |
|
30 |
|
--disable-extensions |
|
31 |
|
unset CC |
|
32 |
|
make -j $jobs_n |
|
33 |
|
make install |
|
34 |
|
|
|
35 |
|
cd $top_build_dir |
File x64/elf/glibc/glibc.sh added (mode: 100644) (index 0000000..150d4e7) |
|
1 |
|
export PATH="\ |
|
2 |
|
$top_build_dir/sdk/bin\ |
|
3 |
|
:/nyan/busybox/current/sbin:/nyan/busybox/current/bin\ |
|
4 |
|
:/opt/toolchains/x64/elf/binutils-gcc/current/bin\ |
|
5 |
|
:/nyan/nyanbison/current/sbin\ |
|
6 |
|
:/nyan/python/current/bin\ |
|
7 |
|
:/nyan/make/current/bin" |
|
8 |
|
|
|
9 |
|
rm -Rf $top_build_dir/target-system-glibc |
|
10 |
|
mkdir $top_build_dir/target-system-glibc |
|
11 |
|
cd $top_build_dir/target-system-glibc |
|
12 |
|
#-------------------------------------------------------------------------------------------------- |
|
13 |
|
cp -f $top_src_dir/glibc-$glibc_version.tar.xz ./ |
|
14 |
|
tar xf glibc-$glibc_version.tar.xz |
|
15 |
|
|
|
16 |
|
mkdir ./build |
|
17 |
|
cd ./build |
|
18 |
|
#--------------------------------------------------------------------------------------------------- |
|
19 |
|
export LDFLAGS='-static-libgcc' |
|
20 |
|
$top_build_dir/target-system-glibc/glibc-$glibc_version/configure \ |
|
21 |
|
--prefix=$install_dir \ |
|
22 |
|
--with-headers=/nyan/linux-headers/current/include \ |
|
23 |
|
--enable-stack-protector=no \ |
|
24 |
|
--disable-build-nscd \ |
|
25 |
|
--disable-nscd |
|
26 |
|
unset LDFLAGS |
|
27 |
|
make -j $jobs_n |
|
28 |
|
make install |
File x64/elf/glibc/grep.sh added (mode: 100644) (index 0000000..4afd6d9) |
|
1 |
|
export PATH="\ |
|
2 |
|
:/nyan/busybox/current/sbin:/nyan/busybox/current/bin\ |
|
3 |
|
:/opt/toolchains/x64/elf/binutils-gcc/current/bin\ |
|
4 |
|
:/nyan/make/current/bin\ |
|
5 |
|
" |
|
6 |
|
|
|
7 |
|
rm -Rf $top_build_dir/build-system-gnu-grep |
|
8 |
|
mkdir $top_build_dir/build-system-gnu-grep |
|
9 |
|
cd $top_build_dir/build-system-gnu-grep |
|
10 |
|
#-------------------------------------------------------------------------------------------------- |
|
11 |
|
cp $top_src_dir/grep-3.11.tar.xz ./ |
|
12 |
|
tar xf grep-3.11.tar.xz |
|
13 |
|
|
|
14 |
|
mkdir ./build |
|
15 |
|
cd ./build |
|
16 |
|
|
|
17 |
|
# It really wants everything there. |
|
18 |
|
export CC="gcc \ |
|
19 |
|
-isystem /nyan/linux-headers/current/include -isystem /nyan/glibc/current/include \ |
|
20 |
|
-O2 -pipe -static-libgcc \ |
|
21 |
|
-B/nyan/glibc/current/lib -L/nyan/glibc/current/lib \ |
|
22 |
|
" |
|
23 |
|
$top_build_dir/build-system-gnu-grep/grep-3.11/configure \ |
|
24 |
|
--prefix=$top_build_dir/sdk \ |
|
25 |
|
--enable-threads=posix \ |
|
26 |
|
--disable-rpath \ |
|
27 |
|
--disable-nls \ |
|
28 |
|
--disable-perl-regexp |
|
29 |
|
unset CC |
|
30 |
|
make -j $jobs_n |
|
31 |
|
make install |
|
32 |
|
|
|
33 |
|
cd $top_build_dir |