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