wok-next view gcc6/receipt @ rev 21153

Small updates.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Jan 31 16:45:41 2019 +0200 (2019-01-31)
parents d958fec46c9f
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gcc6"
4 VERSION="6.4.0"
5 CATEGORY="development"
6 SHORT_DESC="The GNU Compiler Collection"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://gcc.gnu.org/"
10 REPOLOGY="gcc"
12 TARBALL="gcc-$VERSION.tar.xz"
13 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
15 # We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
16 # for cookutils that are not used by tazwok/cook-toolchain since it installs
17 # and uses its own copy.
18 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev"
19 SPLIT="$PACKAGE-lib-base"
21 compile_rules() {
22 case $ARCH in
23 i?86)
24 ARCH_ARGS="--with-tune=$ARCH"
25 export CFLAGS="-march=i486 -Os -pipe"
26 export CXXFLAGS="$CFLAGS"
27 ;;
28 x86_64)
29 ARCH_ARGS="--with-tune=nocona"
30 export CFLAGS="-march=nocona -Os -pipe"
31 export CXXFLAGS="$CFLAGS"
32 ;;
33 esac
35 echo "CFLAGS : $CFLAGS"
36 echo "LDFLAGS : $LDFLAGS"
38 pkgversion="SliTaz"
39 languages="c,c++"
41 # Use libiberty.a from binutils.
42 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
44 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
46 mkdir -p ../gcc-build
47 cd ../gcc-build
49 $src/configure \
50 --libexecdir=/usr/lib \
51 --enable-nls \
52 --enable-languages=$languages \
53 --enable-shared \
54 --with-system-zlib \
55 --enable-clocale=gnu \
56 --enable-objc-gc \
57 --enable-__cxa_atexit \
58 --enable-lto \
59 --enable-threads=posix \
60 --disable-bootstrap \
61 --program-suffix=-6 \
62 --libdir=/usr/libgcc6 \
63 --with-pkgversion="$pkgversion" \
64 --disable-multilib \
65 $ARCH_ARGS \
66 $CONFIGURE_ARGS &&
67 make &&
68 make install
69 }
71 genpkg_rules() {
72 case $PACKAGE in
73 gcc6)
74 mkdir -p $fs/usr/share
75 cp -a $install/usr/bin $fs/usr
77 # Copy all libs. Do not hide gcc-lib-base.
78 cp -a $install/usr/lib* $fs/usr
80 # Include files.
81 cp -a $install/usr/include $fs/usr
83 # Remove build directory.
84 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
85 rm -rf $WOK/$PACKAGE/$PACKAGE-build
86 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
87 TAGS="compiler C C++"
88 ;;
89 gcc6-lib-base)
90 mkdir -p $fs/usr/lib
91 cp -a $install/usr/libgcc61/libgcc_s.so* $fs/usr/lib
92 cp -a $install/usr/libgcc61/libstdc++.so* $fs/usr/lib
93 rm -f $fs/usr/lib/*-gdb.py
94 CAT="development|base libraries, libgcc_s and libstdc++"
95 PROVIDE="gcc-lib-base"
96 ;;
97 esac
98 }
100 post_remove_gcc6_lib_base() {
101 cd "$1/usr/lib"
102 ln -s libstdc++.so.6.*.* libstdc++.so.6
103 ln -s libstdc++.so.6.*.* libstdc++.so
104 cd - >/dev/null
105 }