wok-next view gcc54/receipt @ rev 20472

Add new LFS packages meson, ninja; py3k -> python3; gcc49, gcc54, gcc61: fix $ARCH_ARGS, --disable-multilib; misc. unsuccessful patches...
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Mar 10 13:48:53 2018 +0200 (2018-03-10)
parents c37be8966f03
children d958fec46c9f
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gcc54"
4 VERSION="5.4.0"
5 CATEGORY="development"
6 SHORT_DESC="The GNU Compiler Collection"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://gcc.gnu.org/"
11 TARBALL="gcc-$VERSION.tar.bz2"
12 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
14 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
15 # for cookutils that are not used by tazwok/cook-toolchain since it installs
16 # and uses its own copy.
17 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
18 SPLIT="gcc54-lib-base"
20 compile_rules() {
21 case $ARCH in
22 arm*) ARCH_ARGS="--with-tune=armv6";;
23 i?86) ARCH_ARGS="--with-tune=$ARCH";;
24 x86_64) ARCH_ARGS="--with-tune=nocona";;
25 esac
27 pkgversion="SliTaz"
28 languages="c,c++"
30 # Use libiberty.a from binutils.
31 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
33 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
35 mkdir -p ../gcc-build && cd ../gcc-build
37 $src/configure \
38 --libexecdir=/usr/lib \
39 --enable-nls \
40 --enable-languages=${languages} \
41 --enable-shared \
42 --with-system-zlib \
43 --enable-clocale=gnu \
44 --enable-objc-gc \
45 --enable-__cxa_atexit \
46 --enable-lto \
47 --enable-threads=posix \
48 --disable-bootstrap \
49 --program-suffix=-54 \
50 --libdir=/usr/libgcc54 \
51 --with-pkgversion="$pkgversion" \
52 --disable-multilib \
53 $ARCH_ARGS \
54 $CONFIGURE_ARGS &&
55 make && make install
56 }
58 genpkg_rules() {
59 case $PACKAGE in
60 gcc54)
61 mkdir -p $fs/usr/share
62 cp -a $install/usr/bin $fs/usr
64 # Copy all libs. Do not hide gcc-lib-base.
65 cp -a $install/usr/lib* $fs/usr
67 # Include files.
68 cp -a $install/usr/include $fs/usr
70 # Remove build directory.
71 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
72 rm -rf $WOK/$PACKAGE/$PACKAGE-build
73 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
74 TAGS="compiler C C++"
75 ;;
76 gcc54-lib-base)
77 mkdir -p $fs/usr/lib
78 cp -a $install/usr/libgcc54/libgcc_s.so* $fs/usr/lib
79 cp -a $install/usr/libgcc54/libstdc++.so* $fs/usr/lib
80 rm -f $fs/usr/lib/*-gdb.py
81 CAT="development|base libraries, libgcc_s and libstdc++"
82 PROVIDE="gcc-lib-base"
83 ;;
84 esac
85 }
87 post_remove_gcc54_lib_base() {
88 cd "$1/usr/lib"
89 ln -s libstdc++.so.6.*.* libstdc++.so.6
90 ln -s libstdc++.so.6.*.* libstdc++.so
91 cd - >/dev/null
92 }