first commit
This commit is contained in:
3
src/gcc/.gitignore
vendored
Normal file
3
src/gcc/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.cache/
|
||||
dist/
|
||||
root/
|
2
src/gcc/changes.md
Normal file
2
src/gcc/changes.md
Normal file
@ -0,0 +1,2 @@
|
||||
# 14.1.0
|
||||
First version
|
52
src/gcc/pkg.sh
Normal file
52
src/gcc/pkg.sh
Normal file
@ -0,0 +1,52 @@
|
||||
# general info
|
||||
NAME="gcc"
|
||||
DESC="Collection of compilers from the GNU Project"
|
||||
VERSION="14.1.0"
|
||||
|
||||
# required files
|
||||
FILES=("https://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.xz")
|
||||
HASHES=("e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840")
|
||||
|
||||
# install and build depends
|
||||
DEPENDS=("gcc-libs" "binutils" "mpc" "zstd")
|
||||
BUILD=()
|
||||
|
||||
build(){
|
||||
tar xf "${NAME}-${VERSION}.tar.xz"
|
||||
cd "${NAME}-${VERSION}"
|
||||
|
||||
sed -e '/m64=/s/lib64/lib/' \
|
||||
-i.orig gcc/config/i386/t-linux64
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
../configure --prefix=/usr \
|
||||
LD=ld \
|
||||
--enable-languages=c,c++ \
|
||||
--enable-default-pie \
|
||||
--enable-default-ssp \
|
||||
--disable-multilib \
|
||||
--disable-bootstrap \
|
||||
--disable-fixincludes \
|
||||
--with-system-zlib
|
||||
|
||||
make && make DESTDIR="${ROOTDIR}" install
|
||||
|
||||
ln -svr "${ROOTDIR}/usr/bin/cpp" "${ROOTDIR}/usr/lib"
|
||||
ln -sv gcc.1 "${ROOTDIR}/usr/share/man/man1/cc.1"
|
||||
|
||||
mkdir -pv "${ROOTDIR}/usr/lib/bfd-plugins"
|
||||
ln -sfv "../../libexec/gcc/$(gcc -dumpmachine)/${VERSION}/liblto_plugin.so" \
|
||||
"${ROOTDIR}/usr/lib/bfd-plugins/"
|
||||
|
||||
mkdir -pv "${ROOTDIR}/usr/share/gdb/auto-load/usr/lib"
|
||||
mv -v "${ROOTDIR}/usr/lib/"*gdb.py "${ROOTDIR}/usr/share/gdb/auto-load/usr/lib"
|
||||
|
||||
# these are part of the gcc-libs
|
||||
rm "${ROOTDIR}/usr/lib/"*.so*
|
||||
rm "${ROOTDIR}/usr/lib/"*.la*
|
||||
rm "${ROOTDIR}/usr/lib/"*.a*
|
||||
rm -r "${ROOTDIR}/usr/share/locale"
|
||||
|
||||
cd ../.. && rm -r "${NAME}-${VERSION}"
|
||||
}
|
Reference in New Issue
Block a user