Move to /usr prefix.

- This is much more standard and replaces /image in sysa and is the
  standard in sysc (avoids many issues).
- GCC needs to have a file created for some unknown reason.
- Checksums updated.
This commit is contained in:
fosslinux 2021-07-26 15:25:15 +10:00
parent ddd4f1bc81
commit b93a931a53
104 changed files with 659 additions and 722 deletions

25
sysc/gcc-4.7.4/checksums Normal file
View file

@ -0,0 +1,25 @@
8f4b1c859ad99f4ef17970dafb4c7b818a4e01744c4a1e7d632c09598bea737d /image/bin/cpp
4b522a12cdc654809e796e41062de1d48458626060ec0fac492f9a4757df38da /image/bin/gcc
8e7bde329795793d2d2f71c5d011376ab93a7673645ea44c0d9aee7e8bb9f058 /image/bin/gcc-ar
ede1d40ad93ab8daf788b1362ce1deb4946865398e991725487f25af66a42bed /image/bin/gcc-nm
d93e0b44788e1111073f9ced886e9b41b906075ddcdf73a1cf911cc72b1bcbde /image/bin/gcc-ranlib
1657ba8afdac845ddfa8842efa5e7bf3cfc9be23aa31f6265e3f43eead1316d4 /image/bin/gcov
77adc8cb0648cd8b3546254e7277d16a04b18fe643b889352717c361cc8a4309 /image/libexec/gcc/i386-unknown-linux-musl/4.7.4/cc1
a96e1cd5eff7904cfcd260e859a65bf38c45eafe3f81b7df537e0bb68543e856 /image/libexec/gcc/i386-unknown-linux-musl/4.7.4/collect2
4dd787d729d8d57434fb7cfaf2a7a42dfca2bdf665e6e5246fb56e4cee0f10fd /image/libexec/gcc/i386-unknown-linux-musl/4.7.4/lto-wrapper
b85d6aabe0ffa30cc2fa1f6a1c899256b4051086c566d9c75299c6b2f6cbd618 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtbegin.o
db6caa96b09785d820b2b5a6fc0e2c49dc1980a18b6a6472aa2ccdb5f38fef57 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtbeginS.o
b85d6aabe0ffa30cc2fa1f6a1c899256b4051086c566d9c75299c6b2f6cbd618 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtbeginT.o
42a533b816b6c060f4269a310112bde2e07329cb3c2fa5b21bbad6d2d03e90b5 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtend.o
e5059cb3aaec30653dfb2cbc09ee555218d276d6b49b1ddc05ba8c4d63e3edfb /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtendS.o
042ed2a9c7c8ea05291f79d30ad6f2bb61a9d1a58494ee835e1cb5473b5b5b4b /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtfastmath.o
135b6793737d181031ac9042fd42c38f7c627468447f9c90f687156968282c6f /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtprec32.o
67ea5a6dc10582c4b4c3f53763c7408874c625e054dc4f7137206a1c927bc0b5 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtprec64.o
412c06a772f2bceaef31514685c7634358b9d7a5e01b30c3b1aef2dd24ad68f9 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/crtprec80.o
65082b00fb62e18e816e99a533835a5025794907b8f4d8b5075d3a607249ab08 /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/libgcc.a
af7c0180e5f5854947414ff8f4dac6dcc8b853cb56e592be367760fd4869829d /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/libgcov.a
f0b8f0639b0d596a6028b2eb4f1b738d2ef41243a652083bbb59ade32d0e5a7f /image/lib/musl/libstdc++.a
9ed64bd654c3a9be96e4d60637a9e65183cd94c32f946d5a88370ee9228f280a /image/lib/musl/libstdc++.a-gdb.py
b82cbc46d5977ba01330dc2091656f13df5391a14afcecc729269ceab7fa7706 /image/lib/musl/libstdc++.la
f209ea28cf192f18817724f462402d5d7c307ed2c5256ffe462e93478b751d4d /image/lib/musl/libsupc++.a
963b895bf80dccc967cde0a03e9de439cad6f25fd912e0e7765cd2924768a5ac /image/lib/musl/libsupc++.la

127
sysc/gcc-4.7.4/gcc-4.7.4.sh Executable file
View file

@ -0,0 +1,127 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
# SPDX-License-Identifier: GPL-3.0-or-later
src_prepare() {
default
# Generated using gperf
rm gcc/cp/cfns.h
# Regenerating top level Makefile requires GNU Autogen and hence Guile,
# but it is not essential for building gcc.
rm configure Makefile.in fixincludes/fixincl.x
# Regenerate aclocal.m4 files
# grep "generated automatically by aclocal" */aclocal.m4 -l | sed -e 's#/aclocal.m4##' | tr "\n" " " | sed -e 's/ $/\n/'
for dir in intl libcpp libdecnumber; do
cd $dir
rm aclocal.m4
AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 aclocal-1.11 --acdir=../config
cd ..
done
cd gcc
rm aclocal.m4
AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 aclocal-1.11 --acdir=../config
cd ..
cd fixincludes
rm aclocal.m4
AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 aclocal-1.11 --acdir=../gcc
cd ..
for dir in boehm-gc libffi libgfortran libgo libgomp libitm libjava libmudflap libobjc libquadmath libssp lto-plugin zlib; do
cd $dir
rm aclocal.m4
AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 aclocal-1.11
cd ..
done
cd libstdc++-v3
ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 autoreconf-2.64 -fi
cd ..
# Regenerate configure scripts
# Find all folders with configure script and rebuild them. At the moment we exclude boehm-gc folder due to
# an error but we don't use that directory anyway (it's only needed for Objective C)
for dir in $(ls */configure | sed 's#/configure##' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do
cd $dir
rm configure
autoconf-2.64 || autoconf-2.64
cd ..
done
# Regenerate Makefile.in
# Find all folders with Makefile.am and rebuild them. At the moment we exclude boehm-gc folder.
for dir in $(ls */Makefile.am | sed 's#/Makefile.am##' | tr "\n" " " | sed -e 's/ $/\n/' -e 's/^boehm-gc //'); do
cd $dir
rm Makefile.in
AUTOCONF=autoconf-2.64 AUTOM4TE=autom4te-2.64 automake-1.11
cd ..
done
for dir in libdecnumber libcpp libiberty gcc; do
cd $dir
rm -f config.in
autoheader-2.64
cd ..
done
# Rebuild libtool files
rm config.guess config.sub ltmain.sh
libtoolize
cp "${PREFIX}/"/share/automake-1.15/config.sub .
# Workaround for bison being too new
rm intl/plural.c
# Rebuild flex generated files
rm gcc/gengtype-lex.c
# Remove translation catalogs
find . -name '*.gmo' -delete
# Pre-built texinfo files
find . -name '*.info' -delete
}
src_configure() {
mkdir build
cd build
for dir in libiberty libcpp libdecnumber gcc libgcc libstdc++-v3; do
mkdir $dir
cd $dir
../../$dir/configure \
--prefix="${PREFIX}" \
--libdir="${PREFIX}"/lib/musl \
--build=i386-unknown-linux-musl \
--target=i386-unknown-linux-musl \
--host=i386-unknown-linux-musl \
--disable-shared \
--program-transform-name= \
--enable-languages=c,c++ \
--disable-sjlj-exceptions
cd ..
done
cd ..
}
src_compile() {
ln -s . build/build-i386-unknown-linux-musl
for dir in libiberty libcpp libdecnumber gcc; do
# We have makeinfo now but it is not happy with gcc .info files, so skip it
make -C build/$dir LIBGCC2_INCLUDES=-I"${PREFIX}/include" \
STMP_FIXINC= GMPLIBS="-lmpc -lmpfr -lgmp" MAKEINFO=true
done
# host_subdir is necessary because we have slightly different build directory layout
make -C build/libgcc PATH="${PATH}:../gcc" CC=../gcc/xgcc \
host_subdir=build CFLAGS="-I../gcc/include -I/${PREFIX}/include"
make -C build/libstdc++-v3 PATH="${PATH}:${PWD}/build/gcc" \
CXXFLAGS="-I${PWD}/build/gcc/include -I ${PREFIX}/include"
}
src_install() {
make -C build/gcc install STMP_FIXINC= DESTDIR="${DESTDIR}" MAKEINFO=true
make -C build/libgcc install DESTDIR="${DESTDIR}" host_subdir=build
make -C build/libstdc++-v3 install DESTDIR="${DESTDIR}"
}

View file

@ -0,0 +1,17 @@
SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
SPDX-License-Identifier: GPL-3.0-or-later
Add support for *-linux-musl triplet.
--- libstdc++-v3/configure.host 2021-07-07 10:00:23.934848223 +0100
+++ libstdc++-v3/configure.host 2021-07-07 10:00:36.295195348 +0100
@@ -242,6 +242,9 @@
freebsd*)
os_include_dir="os/bsd/freebsd"
;;
+ linux-musl*)
+ os_include_dir="os/generic"
+ ;;
gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
if [ "$uclibc" = "yes" ]; then
os_include_dir="os/uclibc"

View file

@ -0,0 +1,36 @@
SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
SPDX-License-Identifier: GPL-3.0-or-later
Remove dependency on gperf.
--- gcc/cp/except.c 2021-07-07 18:24:36.561530121 +0100
+++ gcc/cp/except.c 2021-07-07 18:27:18.035681929 +0100
@@ -987,8 +987,6 @@
exception, unless it calls a program-supplied function that
throws an exception. */
-#include "cfns.h"
-
int
nothrow_libfn_p (const_tree fn)
{
@@ -1007,7 +1005,7 @@
unless the system headers are playing rename tricks, and if
they are, we don't want to be confused by them. */
id = DECL_NAME (fn);
- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
+ return 0;
}
/* Returns nonzero if an exception of type FROM will be caught by a
--- gcc/cp/Make-lang.in 2021-07-07 18:24:36.571530380 +0100
+++ gcc/cp/Make-lang.in 2021-07-07 18:26:47.154887799 +0100
@@ -313,7 +313,7 @@
cp/rtti.o: cp/rtti.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) convert.h \
$(TARGET_H) $(C_PRAGMA_H) gt-cp-rtti.h intl.h
cp/except.o: cp/except.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
- cp/cfns.h $(TREE_INLINE_H) $(TARGET_H) gt-cp-except.h
+ $(TREE_INLINE_H) $(TARGET_H) gt-cp-except.h
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) $(TM_P_H)
cp/pt.o: cp/pt.c $(CXX_TREE_H) $(TM_H) cp/decl.h cp/cp-objcp-common.h \
toplev.h $(TREE_INLINE_H) pointer-set.h gt-cp-pt.h vecprim.h intl.h \