wok-next annotate gcc/receipt @ rev 21375
updated mpd (0.17.2 -> 0.21.22)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Apr 16 13:45:16 2020 +0100 (2020-04-16) |
parents | d03cdb2a688a |
children |
rev | line source |
---|---|
al@19743 | 1 # SliTaz package receipt v2. |
pankso@9 | 2 |
al@20436 | 3 # Note, currently first pass is broken. Sorry. |
pankso@9 | 4 PACKAGE="gcc" |
al@21060 | 5 VERSION="8.2.0" |
pankso@204 | 6 CATEGORY="development" |
al@19743 | 7 SHORT_DESC="The GNU Compiler Collection" |
al@21020 | 8 MAINTAINER="devel@slitaz.org" |
pascal@15000 | 9 LICENSE="GPL2" |
al@19561 | 10 WEB_SITE="http://gcc.gnu.org/" |
al@21060 | 11 LFS="http://www.linuxfromscratch.org/lfs/view/development/chapter06/gcc.html" |
al@19743 | 12 |
al@20436 | 13 TARBALL="$PACKAGE-$VERSION.tar.xz" |
al@20436 | 14 WGET_URL="http://ftp.gnu.org/gnu/gcc/gcc-$VERSION/$TARBALL" |
pankso@9 | 15 |
al@19570 | 16 BUILD_DEPENDS="mpc-library-dev mpfr-dev gmp-dev elfutils-dev zlib-dev" |
al@21082 | 17 SPLIT="$PACKAGE-debug $PACKAGE-lib-base $PACKAGE-lib-math libgfortran \ |
al@21082 | 18 gfortran libgomp libobjc libatomic $PACKAGE" |
al@21060 | 19 COOKOPTS="skip-log-errors" |
pankso@9704 | 20 |
al@20436 | 21 if [ "$2" == "--first-pass" -o "$3" == "--first-pass" ]; then |
al@20436 | 22 STAGE='first' |
al@20436 | 23 SPLIT='' |
al@20436 | 24 fi |
al@20436 | 25 |
al@20176 | 26 compile_rules() { |
al@20176 | 27 # Handle cross compilation (native i486/ARM gcc) |
al@20176 | 28 case "$ARCH" in |
al@20176 | 29 i?86) |
al@21060 | 30 ARCH_ARGS="--with-arch=$ARCH --with-tune=generic --enable-cld" |
al@20176 | 31 pkgversion="SliTaz" |
al@20436 | 32 languages="c,c++,objc,fortran" |
al@20436 | 33 sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in |
al@20436 | 34 ;; |
al@20436 | 35 x86_64) |
al@20436 | 36 ARCH_ARGS="" |
al@20436 | 37 pkgversion="SliTaz64" |
al@20436 | 38 languages="c,c++,objc,fortran" |
al@20436 | 39 sed -i.orig '/m64=/ s|lib64|lib|' gcc/config/i386/t-linux64 |
al@20436 | 40 ;; |
al@20176 | 41 esac |
gokhlayeh@8181 | 42 |
pankso@3185 | 43 # Use libiberty.a from binutils. |
pankso@12267 | 44 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1 |
pankso@12541 | 45 |
al@20436 | 46 case "$STAGE" in |
al@20436 | 47 first) |
al@20436 | 48 echo "cook: configure GCC for: toolchain first pass" |
pankso@12541 | 49 |
al@20436 | 50 mkdir build |
al@20436 | 51 cd build |
al@20436 | 52 ../configure \ |
al@20436 | 53 --with-newlib \ |
al@20436 | 54 --without-headers \ |
pankso@10012 | 55 --disable-nls \ |
al@20436 | 56 --disable-shared \ |
al@20436 | 57 --disable-multilib \ |
al@20436 | 58 --disable-decimal-float \ |
al@20436 | 59 --disable-threads \ |
al@20436 | 60 --disable-libatomic \ |
al@20436 | 61 --disable-libgomp \ |
al@20436 | 62 --disable-libmpx \ |
al@20436 | 63 --disable-libquadmath \ |
al@20436 | 64 --disable-libssp \ |
al@20436 | 65 --disable-libvtv \ |
al@20436 | 66 --disable-libstdcxx \ |
pankso@10030 | 67 --enable-languages=c,c++ \ |
al@20436 | 68 $CONFIGURE_ARGS |
al@19743 | 69 ;; |
pankso@9704 | 70 *) |
pankso@9704 | 71 echo "cook: configure GCC for: final/full build" |
al@20436 | 72 |
al@20436 | 73 mkdir build |
al@20436 | 74 cd build |
al@20436 | 75 SED=sed \ |
al@20436 | 76 ../configure \ |
al@20436 | 77 --enable-languages=$languages \ |
al@20436 | 78 --disable-multilib \ |
al@20436 | 79 --disable-bootstrap \ |
al@21060 | 80 --disable-libmpx \ |
pankso@10012 | 81 --with-system-zlib \ |
pankso@16319 | 82 --with-pkgversion="$pkgversion" \ |
al@20436 | 83 $CONFIGURE_ARGS $ARCH_ARGS |
al@19743 | 84 ;; |
al@19743 | 85 esac && |
al@21020 | 86 make && |
al@21020 | 87 make install || return 1 |
al@20436 | 88 |
al@20445 | 89 mkdir -p $install/lib |
al@20436 | 90 ln -sv ../usr/bin/cpp $install/lib |
al@20445 | 91 |
al@20436 | 92 ln -sv gcc $install/usr/bin/cc |
al@20445 | 93 |
al@20436 | 94 install -v -dm755 $install/usr/lib/bfd-plugins |
al@20436 | 95 ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/$VERSION/liblto_plugin.so \ |
al@20436 | 96 $install/usr/lib/bfd-plugins/ |
al@20436 | 97 |
al@19743 | 98 |
al@20436 | 99 # Place the debugging symbols for selected libraries in separate files. |
al@20436 | 100 # This debugging information is needed if running regression tests that use valgrind or gdb. |
al@20436 | 101 # http://www.linuxfromscratch.org/lfs/view/stable/chapter06/strippingagain.html |
al@20436 | 102 |
al@20436 | 103 [ "$STAGE" == 'first' ] || |
al@21060 | 104 for i in libquadmath.so.0.0.0 libstdc++.so.6.0.25 libitm.so.1.0.0 \ |
al@20436 | 105 libatomic.so.1.2.0; do |
al@20436 | 106 cd $install/usr/lib/ |
al@20436 | 107 objcopy --only-keep-debug $i $i.dbg |
al@20436 | 108 strip --strip-unneeded $i |
al@20436 | 109 objcopy --add-gnu-debuglink=$i.dbg $i |
al@20436 | 110 done |
pankso@9 | 111 } |
pankso@9 | 112 |
al@20176 | 113 genpkg_rules() { |
al@20436 | 114 case $STAGE in |
al@20436 | 115 first) |
al@20436 | 116 # single package 'gcc' on the first stage |
al@20436 | 117 copy @std @dev |
al@20436 | 118 DEPENDS="glibc-base gmp mpc-library mpfr zlib binutils elfutils" |
al@20436 | 119 CAT="development|first pass" |
al@20436 | 120 TAGS="LFS compiler C" |
al@20436 | 121 return 0 |
al@20436 | 122 ;; |
al@20436 | 123 esac |
al@20436 | 124 |
al@19743 | 125 case $PACKAGE in |
al@21082 | 126 gcc-debug) |
al@21082 | 127 copy *.dbg |
al@21082 | 128 ;; |
al@19743 | 129 gcc-lib-base) |
al@21082 | 130 copy libgcc_s.so* libstdc++.so* @rm |
al@20436 | 131 rm $fs/usr/lib*/*.py |
al@20176 | 132 CAT="libs|base libraries" |
al@19835 | 133 DEPENDS="glibc-base" |
al@19743 | 134 ;; |
al@19743 | 135 gcc-lib-math) |
al@21082 | 136 copy libquadmath.so* @rm |
al@20176 | 137 CAT="libs|math libraries" |
al@19835 | 138 DEPENDS="glibc-base" |
al@19743 | 139 ;; |
al@19743 | 140 libgfortran) |
al@19743 | 141 copy libgfortran.so* |
al@19743 | 142 CAT="libdevel|fortran runtime" |
al@19835 | 143 DEPENDS="gcc-lib-base gcc-lib-math glibc-base" |
al@19835 | 144 ;; |
al@19835 | 145 gfortran) |
al@20176 | 146 copy *gfortran libgfortran.* f951 finclude/ @rm |
al@19835 | 147 CAT="development|fortran extension" |
al@19835 | 148 TAGS="compiler fortran" |
al@19835 | 149 DEPENDS="libgfortran gcc glibc-base gmp mpc-library mpfr zlib" |
al@19743 | 150 ;; |
al@19743 | 151 libgomp) |
al@19743 | 152 copy libgomp.so* |
al@20176 | 153 CAT="libs|API specification for parallel programming" |
al@19835 | 154 DEPENDS="glibc-base" |
al@19743 | 155 ;; |
al@19743 | 156 libobjc) |
al@19743 | 157 copy libobjc.so* |
al@19765 | 158 CAT="libdevel|API for gcc object" |
al@19835 | 159 DEPENDS="gcc-lib-base glibc-base" |
al@19835 | 160 ;; |
al@20176 | 161 libatomic) |
al@21082 | 162 copy libatomic.so* @rm |
al@20176 | 163 CAT="libs|libatomic" |
al@20176 | 164 DEPENDS=" " |
al@20176 | 165 ;; |
al@19835 | 166 gcc) |
al@20436 | 167 copy @std @dev @rm |
al@20176 | 168 DEPENDS="gcc-lib-base libgomp libobjc libatomic \ |
al@19835 | 169 glibc-base gmp mpc-library mpfr zlib binutils elfutils" |
al@19835 | 170 SUGGESTED="python" |
al@20436 | 171 TAGS="LFS compiler C" |
al@19743 | 172 ;; |
al@19743 | 173 esac |
pankso@9 | 174 } |