[arch-commits] Commit in gcc-multilib/trunk (PKGBUILD)

Jan Steffens heftig at nymeria.archlinux.org
Thu Nov 28 21:19:21 UTC 2013


    Date: Thursday, November 28, 2013 @ 22:19:21
  Author: heftig
Revision: 101599

4.8.2-5, a major rewrite

Modified:
  gcc-multilib/trunk/PKGBUILD

----------+
 PKGBUILD |  250 ++++++++++++++++++++++++++++++++++---------------------------
 1 file changed, 140 insertions(+), 110 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-11-28 20:54:48 UTC (rev 101598)
+++ PKGBUILD	2013-11-28 21:19:21 UTC (rev 101599)
@@ -7,7 +7,8 @@
 
 pkgname=('gcc-multilib' 'gcc-libs-multilib' 'lib32-gcc-libs' 'gcc-fortran-multilib' 'gcc-objc-multilib' 'gcc-ada-multilib' 'gcc-go-multilib')
 pkgver=4.8.2
-pkgrel=4
+_pkgver=4.8
+pkgrel=5
 #_snapshot=4.8-20130725
 pkgdesc="The GNU Compiler Collection for multilib"
 arch=('x86_64')
@@ -32,6 +33,8 @@
   _basedir=gcc-${pkgver}
 fi
 
+_libdir="usr/lib/gcc/$CHOST/$pkgver"
+
 prepare() {
   cd ${srcdir}/${_basedir}
 
@@ -71,19 +74,17 @@
       --enable-shared --enable-threads=posix \
       --with-system-zlib --enable-__cxa_atexit \
       --disable-libunwind-exceptions --enable-clocale=gnu \
-      --disable-libstdcxx-pch \
+      --disable-libstdcxx-pch --disable-libssp \
       --enable-gnu-unique-object --enable-linker-build-id \
       --enable-cloog-backend=isl --disable-cloog-version-check \
-      --enable-lto --enable-gold --enable-ld=default \
-      --enable-plugin --with-plugin-ld=ld.gold \
-      --with-linker-hash-style=gnu --disable-install-libiberty \
-      --enable-multilib --disable-libssp --disable-werror \
+      --enable-lto --enable-plugin \
+      --with-linker-hash-style=gnu \
+      --enable-multilib --disable-werror \
       --enable-checking=release
   make
   
   # make documentation
-  cd $CHOST/libstdc++-v3
-  make doc-man-doxygen
+  make -C $CHOST/libstdc++-v3/doc doc-man-doxygen
 }
 
 check() {
@@ -98,6 +99,38 @@
   ${srcdir}/${_basedir}/contrib/test_summary
 }
 
+package_lib32-gcc-libs()
+{
+  pkgdesc="Runtime libraries shipped by GCC (32-bit)"
+  depends=('lib32-glibc>=2.17')
+  options=('!emptydirs')
+
+  cd ${srcdir}/gcc-build
+
+  make -C $CHOST/32/libgcc DESTDIR=${pkgdir} install-shared
+  rm ${pkgdir}/${_libdir}/32/libgcc_eh.a
+
+  for lib in libmudflap \
+             libgomp \
+             libitm \
+             libatomic \
+             libstdc++-v3/src \
+             libquadmath \
+             libgfortran \
+             libsanitizer/asan; do
+    make -C $CHOST/32/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
+  done
+
+  make -C $CHOST/32/libobjc DESTDIR=${pkgdir} install-libs
+
+  # remove stuff in gcc-libs-multilib
+  rm -r ${pkgdir}/usr/lib
+
+  # Install Runtime Library Exception
+  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
+    ${pkgdir}/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION
+}
+
 package_gcc-libs-multilib()
 {
   pkgdesc="Runtime libraries shipped by GCC for multilib"
@@ -104,34 +137,41 @@
   depends=('glibc>=2.17' "lib32-gcc-libs=$pkgver-$pkgrel")
   provides=("gcc-libs=$pkgver-$pkgrel")
   conflicts=('gcc-libs')
+  options=('!emptydirs')
   install=gcc-libs.install
 
   cd ${srcdir}/gcc-build
-  make -j1 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
-  for lib in libmudflap libgomp libstdc++-v3/src libitm libsanitizer/asan; do
-    make -j1 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
+  
+  make -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared
+  rm ${pkgdir}/${_libdir}/libgcc_eh.a
+  
+  for lib in libmudflap \
+             libgomp \
+             libitm \
+             libatomic \
+             libstdc++-v3/src \
+             libquadmath \
+             libgfortran \
+             libsanitizer/asan; do
+    make -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
   done
 
   [[ $CARCH == "x86_64" ]] && \
-    make -j1 -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
+    make -C $CHOST/libsanitizer/tsan DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
+
+  make -C $CHOST/libobjc DESTDIR=${pkgdir} install-libs
   
-  make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
-  make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info
-  make -j1 -C $CHOST/libitm DESTDIR=${pkgdir} install-info
+  make -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install
 
-  make -j1 DESTDIR=${pkgdir} install-target-libquadmath  
-  make -j1 DESTDIR=${pkgdir} install-target-libgfortran
-  make -j1 DESTDIR=${pkgdir} install-target-libobjc
+  for lib in libgomp \
+             libitm \
+             libquadmath; do
+    make -C $CHOST/$lib DESTDIR=${pkgdir} install-info
+  done
 
-  # remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc}
-  rm -r ${pkgdir}/usr/lib/{gcc/,libgfortran.spec}
-
   # remove stuff in lib32-gcc-libs
   rm -r ${pkgdir}/usr/lib32
 
-  # remove static libraries
-  find ${pkgdir} -name *.a -delete
-  
   # Install Runtime Library Exception
   install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
     ${pkgdir}/usr/share/licenses/gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION
@@ -148,30 +188,50 @@
   install=gcc.install
 
   cd ${srcdir}/gcc-build
+
+  make -C gcc DESTDIR=${pkgdir} install-driver install-cpp install-gcc-ar \
+    c++.install-common install-headers install-plugin install-lto-wrapper
+
+  install -m755 gcc/gcov $pkgdir/usr/bin/
+  install -m755 -t $pkgdir/${_libdir}/ gcc/{cc1,cc1plus,collect2,lto1}
+
+  make -C $CHOST/libgcc DESTDIR=${pkgdir} install
+  make -C $CHOST/32/libgcc DESTDIR=${pkgdir} install
+  rm ${pkgdir}/usr/lib{,32}/libgcc_s.so*
   
-  make -j1 DESTDIR=${pkgdir} install
+  make -C $CHOST/libstdc++-v3/src DESTDIR=${pkgdir} install
+  make -C $CHOST/libstdc++-v3/include DESTDIR=${pkgdir} install
+  make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install
+  make -C $CHOST/libstdc++-v3/python DESTDIR=${pkgdir} install
+  make -C $CHOST/32/libstdc++-v3/src DESTDIR=${pkgdir} install
+  make -C $CHOST/32/libstdc++-v3/include DESTDIR=${pkgdir} install
+  make -C $CHOST/32/libstdc++-v3/libsupc++ DESTDIR=${pkgdir} install
 
   install -d $pkgdir/usr/share/gdb/auto-load/usr/lib
   mv $pkgdir{,/usr/share/gdb/auto-load}/usr/lib/libstdc++.so.6.0.18-gdb.py
+  rm ${pkgdir}/usr/lib{,32}/libstdc++.so*
 
-  # unfortunately it is much, much easier to install the lot and clean-up the mess...
-  rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
-  rm $pkgdir/usr/lib{,32}/*.so*
-  rm $pkgdir/usr/lib{,32}/lib{atomic,gfortran,go{,begin},objc}.a
-  rm $pkgdir/usr/lib/libiberty.a
-  rm $pkgdir/usr/lib{,32}/libgfortran.spec
-  rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{{,32/}ada{include,lib},finclude,include/objc}
-  rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1}
-  rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{,32/}{libcaf_single,libgfortranbegin}.a
-  rm -r $pkgdir/usr/lib{,32}/go
-  rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath,libitm}.info
-  rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
-  rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
+  make DESTDIR=${pkgdir} install-fixincludes
+  make -C gcc DESTDIR=${pkgdir} install-mkheaders
+  make -C lto-plugin DESTDIR=${pkgdir} install
 
-  # remove static libraries - note libstdc++.a is needed for the binutils and glibc testsuite
-  rm $pkgdir/usr/lib{,32}/lib{asan,gomp,itm,mudflap{,th},quadmath}.a
-  [[ $CARCH = "x86_64" ]] && rm $pkgdir/usr/lib/libtsan.a
+  make -C $CHOST/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS \
+    install-nodist_libsubincludeHEADERS
+  make -C $CHOST/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
+  make -C $CHOST/libmudflap DESTDIR=${pkgdir} install-nobase_libsubincludeHEADERS
+  make -C $CHOST/libquadmath DESTDIR=${pkgdir} install-nodist_libsubincludeHEADERS
+  make -C $CHOST/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
+  make -C $CHOST/32/libgomp DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
+  make -C $CHOST/32/libitm DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
+  make -C $CHOST/32/libsanitizer/asan DESTDIR=${pkgdir} install-nodist_toolexeclibHEADERS
 
+  make -C gcc DESTDIR=${pkgdir} install-man install-info
+  rm ${pkgdir}/usr/share/man/man1/{gccgo,gfortran}.1
+  rm ${pkgdir}/usr/share/info/{gccgo,gfortran,gnat-style,gnat_rm,gnat_ugn}.info
+
+  make -C libcpp DESTDIR=${pkgdir} install
+  make -C gcc DESTDIR=${pkgdir} install-po
+
   # many packages expect this symlinks
   ln -s gcc ${pkgdir}/usr/bin/cc
 
@@ -205,13 +265,11 @@
   chmod 755 $pkgdir/usr/bin/c{8,9}9
 
   # install the libstdc++ man pages
-  install -dm755 ${pkgdir}/usr/share/man/man3
-  install -m644 -t ${pkgdir}/usr/share/man/man3 \
-    ${CHOST}/libstdc++-v3/doc/doxygen/man/man3/*.3
+  make -C $CHOST/libstdc++-v3/doc DESTDIR=$pkgdir doc-install-man
 
   # Install Runtime Library Exception
-  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
-    ${pkgdir}/usr/share/licenses/gcc-multilib/RUNTIME.LIBRARY.EXCEPTION
+  install -d ${pkgdir}/usr/share/licenses/gcc-multilib/
+  ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-multilib/
 }
 
 package_gcc-fortran-multilib()
@@ -224,24 +282,17 @@
   install=gcc-fortran.install
 
   cd ${srcdir}/gcc-build
-  make -j1 DESTDIR=$pkgdir install-target-libgfortran
-  make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
-  make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
-  install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
+  make -C $CHOST/libgfortran DESTDIR=$pkgdir install-{{caf,my}execlibLTLIBRARIES,toolexeclibDATA}
+  make -C $CHOST/32/libgfortran DESTDIR=$pkgdir install-{{caf,my}execlibLTLIBRARIES,toolexeclibDATA}
+  make -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS
+  make -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info}
+  install -Dm755 gcc/f951 $pkgdir/${_libdir}/f951
 
   ln -s gfortran ${pkgdir}/usr/bin/f95
 
-  # remove files included in gcc-libs or gcc and unnneeded static lib
-  rm ${pkgdir}/usr/lib{,32}/lib{gfortran,gcc_s}.so*
-  rm ${pkgdir}/usr/lib{,32}/libquadmath.{a,so*}
-  rm ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/{,32/}{*.o,libgc*}
-  rm ${pkgdir}/usr/share/info/libquadmath.info
-  rm -r ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/include
-  rm ${pkgdir}/usr/lib{,32}/libgfortran.a
-
   # Install Runtime Library Exception
-  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
-    ${pkgdir}/usr/share/licenses/gcc-fortran-multilib/RUNTIME.LIBRARY.EXCEPTION
+  install -d ${pkgdir}/usr/share/licenses/gcc-fortran-multilib/
+  ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-fortran-multilib/
 }
 
 package_gcc-objc-multilib()
@@ -252,18 +303,13 @@
   conflicts=('gcc-objc')
 
   cd ${srcdir}/gcc-build
-  make -j1 DESTDIR=$pkgdir install-target-libobjc
-  install -dm755 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
-  install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
+  make DESTDIR=$pkgdir -C $CHOST/libobjc install-headers
+  install -dm755 $pkgdir/${_libdir}
+  install -m755 gcc/cc1obj{,plus} $pkgdir/${_libdir}/
 
-  # remove files included in gcc-libs or gcc
-  rm ${pkgdir}/usr/lib{,32}/lib{gcc_s,objc}.so*
-  rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{,32/}{*.o,lib*}
-  rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/unwind.h
-
   # Install Runtime Library Exception
-  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
-    ${pkgdir}/usr/share/licenses/gcc-objc-multilib/RUNTIME.LIBRARY.EXCEPTION
+  install -d ${pkgdir}/usr/share/licenses/gcc-objc-multilib/
+  ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-objc-multilib/
 }
 
 package_gcc-ada-multilib()
@@ -276,18 +322,30 @@
   install=gcc-ada.install
 
   cd ${srcdir}/gcc-build/gcc
-  make -j1 DESTDIR=$pkgdir ada.install-{common,info}
-  install -m755 gnat1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver
+  make DESTDIR=$pkgdir ada.install-{common,info}
+  install -m755 gnat1 $pkgdir/${_libdir}
 
   cd ../$CHOST/32/libada
-  make -j1 DESTDIR=${pkgdir} INSTALL="install" \
+  make DESTDIR=${pkgdir} INSTALL="install" \
     INSTALL_DATA="install -m644" install-gnatlib
 
   ln -s gcc ${pkgdir}/usr/bin/gnatgcc
 
+  # insist on dynamic linking
+  mv ${pkgdir}/${_libdir}/adalib/libgna{rl,t}-${_pkgver}.so ${pkgdir}/usr/lib
+  ln -s libgnarl-${_pkgver}.so ${pkgdir}/usr/lib/libgnarl.so
+  ln -s libgnat-${_pkgver}.so ${pkgdir}/usr/lib/libgnat.so
+  rm ${pkgdir}/${_libdir}/adalib/libgna{rl,t}.*
+
+  install -d ${pkgdir}/usr/lib32/
+  mv ${pkgdir}/${_libdir}/32/adalib/libgna{rl,t}-${_pkgver}.so ${pkgdir}/usr/lib32
+  ln -s libgnarl-${_pkgver}.so ${pkgdir}/usr/lib32/libgnarl.so
+  ln -s libgnat-${_pkgver}.so ${pkgdir}/usr/lib32/libgnat.so
+  rm ${pkgdir}/${_libdir}/32/adalib/libgna{rl,t}.*
+
   # Install Runtime Library Exception
-  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
-    ${pkgdir}/usr/share/licenses/gcc-ada-multilib/RUNTIME.LIBRARY.EXCEPTION
+  install -d ${pkgdir}/usr/share/licenses/gcc-ada-multilib/
+  ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-ada-multilib/
 }
 
 package_gcc-go-multilib()
@@ -300,42 +358,14 @@
   install=gcc-go.install
 
   cd ${srcdir}/gcc-build
-  make -j1 DESTDIR=$pkgdir install-target-libgo
-  make -j1 -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
-  install -Dm755 gcc/go1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/go1
-  rm $pkgdir/usr/lib{,32}/lib{atomic,go}.a
+  make -C $CHOST/libgo DESTDIR=$pkgdir install-exec-am
+  make -C $CHOST/32/libgo DESTDIR=$pkgdir install-exec-am
+  make -C gcc DESTDIR=$pkgdir go.install-{common,man,info}
+  install -Dm755 gcc/go1 $pkgdir/${_libdir}/go1
 
-  # Install Runtime Library Exception
-  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
-    ${pkgdir}/usr/share/licenses/gcc-go-multilib/RUNTIME.LIBRARY.EXCEPTION
-}
+  rm $pkgdir/usr/lib{,32}/libgo.a
 
-package_lib32-gcc-libs()
-{
-  pkgdesc="Runtime libraries shipped by GCC (32-bit)"
-  depends=('lib32-glibc>=2.17')
-
-  cd ${srcdir}/gcc-build
-  make -j1 -C $CHOST/32/libgcc DESTDIR=${pkgdir} install-shared
-  for lib in libmudflap libgomp libstdc++-v3/src libitm libsanitizer/asan; do
-    make -j1 -C $CHOST/32/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES
-  done
-  
-  make -j1 DESTDIR=${pkgdir} install-target-libquadmath
-  make -j1 DESTDIR=${pkgdir} install-target-libgfortran
-  make -j1 DESTDIR=${pkgdir} install-target-libobjc
-
-  # remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc}
-  rm ${pkgdir}/usr/lib32/libgfortran.spec
-
-  # remove stuff in gcc-libs-multilib
-  rm -r ${pkgdir}/usr/lib
-  rm -r ${pkgdir}/usr/share/info
-
-  # remove static libraries
-  find ${pkgdir} -name *.a -delete
-  
   # Install Runtime Library Exception
-  install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
-    ${pkgdir}/usr/share/licenses/lib32-gcc-libs/RUNTIME.LIBRARY.EXCEPTION
+  install -d ${pkgdir}/usr/share/licenses/gcc-go-multilib/
+  ln -s ../gcc-libs-multilib/RUNTIME.LIBRARY.EXCEPTION ${pkgdir}/usr/share/licenses/gcc-go-multilib/
 }




More information about the arch-commits mailing list