wok-current annotate gcc/receipt @ rev 24538

updated fbcat (0.5.1 -> 0.5.2)
author Hans-G?nter Theisgen
date Wed Feb 23 15:14:49 2022 +0100 (2022-02-23)
parents 02c70d036ea0
children 544e47246b33
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="gcc"
pankso@12541 4 VERSION="4.6.3"
pankso@204 5 CATEGORY="development"
erkan@19462 6 SHORT_DESC="The GNU Compiler Collection."
pankso@9 7 MAINTAINER="pankso@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
pankso@9 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@9 10 WEB_SITE="http://gcc.gnu.org/"
pankso@5269 11 WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
pascal@13033 12 TAGS="compiler C"
pankso@16319 13 #HOST_ARCH="i486 arm"
pankso@9 14
gokhlayeh@11383 15 DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
pankso@16319 16 BUILD_DEPENDS="mpc-library mpfr-dev gmp-dev elfutils-dev"
pankso@9704 17
pankso@16319 18 # Handle cross compilation (native i486/ARM gcc)
pankso@16319 19 case "$ARCH" in
pankso@16319 20 i?86)
pankso@16319 21 ARCH_ARGS="--with-tune=$ARCH"
pankso@16319 22 pkgversion="SliTaz"
pankso@16319 23 languages="c,c++,objc,fortran" ;;
pankso@16319 24 arm*)
pankso@16319 25 pkgversion="SliTaz ARM"
pankso@16319 26 languages="c,c++" ;;
pankso@16319 27 esac
gokhlayeh@8181 28
pankso@9 29 # Rules to configure and make the package.
pankso@9 30 compile_rules()
pankso@9 31 {
pankso@9704 32 # Package slitaz-toolchain use 'cook --options' when rebuilding
pankso@9707 33 # the full SliTaz toolchain.
pascal@20892 34 [ "$2" = "--first-pass" ] && opt=$2
pascal@20892 35 [ "$3" = "--first-pass" ] && opt=$3
pankso@12541 36
pankso@3185 37 # Use libiberty.a from binutils.
pankso@12267 38 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
pankso@12541 39
pankso@16319 40 case "$ARCH" in
pankso@16319 41 i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
pankso@12267 42 esac
pankso@12541 43
pankso@12267 44 #sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
pankso@12541 45
pankso@9704 46 mkdir -p ../gcc-build && cd ../gcc-build
pankso@10036 47
pankso@10036 48 # This is the default GCC and we want a native build to cross compile after.
pankso@10036 49 # SliTaz target i486 host so we need a native i486 build for GCC.
pankso@9704 50 case "$opt" in
pankso@9704 51 --first-pass)
pankso@9704 52 # Used by slitaz-toolchain when rebuilding the full toolchain.
pankso@9704 53 echo "cook: configure GCC for: toolchain first pass"
pankso@10012 54 $src/configure \
pankso@10012 55 --libexecdir=/usr/lib \
pankso@10012 56 --disable-nls \
pankso@10012 57 --enable-shared \
pankso@10030 58 --enable-languages=c,c++ \
pankso@10012 59 --disable-libstdcxx-pch \
pankso@10012 60 --enable-__cxa_atexit \
pankso@10012 61 --enable-clocale=gnu \
pankso@10012 62 --enable-threads=posix \
pankso@10036 63 --disable-bootstrap \
pankso@16319 64 ${CONFIGURE_ARGS} &&
pankso@10012 65 make && make install ;;
pankso@9704 66 *)
pankso@10036 67 # Used by default to produce a full featured X86 GCC compiler.
pankso@9704 68 echo "cook: configure GCC for: final/full build"
pankso@10012 69 $src/configure \
pankso@10012 70 --libexecdir=/usr/lib \
pankso@10012 71 --enable-nls \
pankso@16319 72 --enable-languages=${languages} \
pankso@10012 73 --enable-shared \
pankso@10012 74 --with-system-zlib \
pankso@10012 75 --enable-clocale=gnu \
pankso@10012 76 --enable-objc-gc \
pankso@10012 77 --enable-__cxa_atexit \
pankso@10012 78 --enable-lto \
pankso@10012 79 --enable-threads=posix \
pankso@10036 80 --disable-bootstrap \
pankso@16319 81 --with-pkgversion="$pkgversion" \
pankso@16319 82 ${CONFIGURE_ARGS} ${ARCH_ARGS} &&
pankso@10012 83 make && make install ;;
pankso@9704 84 esac
pankso@9 85 }
pankso@9 86
pankso@9 87 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 88 genpkg_rules()
pankso@9 89 {
pankso@9 90 mkdir -p $fs/usr/share
pankso@12267 91 cp -a $install/usr/bin $fs/usr
pankso@12541 92
pankso@9704 93 # Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in
pankso@10036 94 # the gcc-lib-base package.
pankso@12267 95 cp -a $install/usr/lib $fs/usr
pankso@10025 96 rm -f $fs/usr/lib/libgcc_s.so*
pankso@10025 97 rm -f $fs/usr/lib/libstdc++.so*
pankso@10025 98 rm -f $fs/usr/lib/libgomp.so*
pankso@10025 99 rm -f $fs/usr/lib/libobjc.so*
slaxemulator@9781 100
gokhlayeh@8181 101 # Include files.
pankso@12267 102 cp -a $install/usr/include $fs/usr
pankso@12541 103
pankso@10036 104 # Gfortran goes in gfortran package.
gokhlayeh@8181 105 rm -f $fs/usr/bin/*gfortran
gokhlayeh@8181 106 rm -f $fs/usr/lib/libgfortran*
gokhlayeh@8181 107 rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
gokhlayeh@8181 108 rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
pankso@12541 109
gokhlayeh@8181 110 # Remove build directory.
pankso@9706 111 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
pankso@9706 112 rm -rf $WOK/$PACKAGE/$PACKAGE-build
pankso@9 113 }
pankso@9 114
pankso@9 115 # Post install commands for Tazpkg.
pankso@9 116 post_install()
pankso@9 117 {
pascal@18730 118 [ -f "$1/lib/cpp" ] ||
pascal@18730 119 ln -s ../usr/bin/cpp "$1/lib"
pascal@18730 120 [ -f "$1/usr/bin/cc" ] ||
pascal@18730 121 ln -s gcc "$1/usr/bin/cc"
pankso@9 122 }