Created
January 17, 2018 20:31
-
-
Save jvvv/2fd19dfda12a522af7adce60b4cfeaa4 to your computer and use it in GitHub Desktop.
Crux port for gcc7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: The GNU Compiler Collection | |
# URL: http://gcc.gnu.org | |
# Maintainer: CRUX System Team, core-ports at crux dot nu | |
# Depends on: zlib libmpc | |
name=gcc7 | |
version=7.3.0-RC-20180117 | |
release=1-local | |
source=(https://gcc.gnu.org/pub/gcc/snapshots/$version/gcc-$version.tar.xz \ | |
gcc-nocheck-fixincludes.patch gcc-4.7.3-multilib-dirs.patch) | |
build() { | |
patch -d gcc-$version -p1 -i $SRC/gcc-nocheck-fixincludes.patch | |
patch -d gcc-$version -p1 -i $SRC/gcc-4.7.3-multilib-dirs.patch | |
sed -i -e "s/7.2.1/$version/" gcc-$version/gcc/BASE-VER | |
mkdir build | |
cd build | |
../gcc-$version/configure \ | |
--prefix=/opt/$name \ | |
--libexecdir=/opt/$name/lib \ | |
--enable-languages=c,c++,objc \ | |
--enable-threads=posix \ | |
--enable-__cxa_atexit \ | |
--enable-clocale=gnu \ | |
--enable-shared \ | |
--disable-nls \ | |
--with-x=no \ | |
--with-system-zlib \ | |
--disable-multilib \ | |
--enable-default-pie \ | |
--enable-default-ssp \ | |
--with-pkgversion="CRUX-x86_64" | |
make bootstrap | |
make -j1 DESTDIR=$PKG install | |
ln -sf gcc $PKG/opt/$name/bin/cc | |
ln -sf g++ $PKG/opt/$name/bin/c++ | |
mv $PKG/opt/gcc7/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} \ | |
$PKG/opt/gcc7/lib/gcc/*/$version/include/ | |
rm -r $PKG/opt/gcc7/share/{info,gcc-$version} | |
rm -r $PKG/opt/gcc7/bin/*-linux-gnu-* | |
rm -r $PKG/opt/gcc7/lib/gcc/*/$version/{install-tools,include-fixed} | |
install -d -m 0755 $PKG/opt/$name/share/gdb/auto-load/usr/lib | |
mv $PKG/opt/$name/lib/libstdc++.so.*-gdb.py $PKG/opt/$name/share/gdb/auto-load/usr/lib | |
sed -i "s|-L$SRC[^ ]* ||g" $PKG/opt/gcc7/lib/{libstdc++.la,libsupc++.la} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment