wok view gcc/receipt @ rev 24149

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