[arch-commits] CVS update of arch/build/base/pacman (3 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Mon Jun 4 15:54:30 EDT 2007


    Date: Monday, June 4, 2007 @ 15:54:30
  Author: andyrtr
    Path: /home/cvs-arch/arch/build/base/pacman

   Added: gcc4.2.mtune.patch (1.1)
Modified: PKGBUILD (1.141 -> 1.142) pacman.install (1.7 -> 1.8)

fixed for gcc4.2 CFLAGS - added -mtune=generic to the flags


--------------------+
 PKGBUILD           |   12 ++++++++----
 gcc4.2.mtune.patch |   13 +++++++++++++
 pacman.install     |    6 ++++++
 3 files changed, 27 insertions(+), 4 deletions(-)


Index: arch/build/base/pacman/PKGBUILD
diff -u arch/build/base/pacman/PKGBUILD:1.141 arch/build/base/pacman/PKGBUILD:1.142
--- arch/build/base/pacman/PKGBUILD:1.141	Wed May 30 14:45:02 2007
+++ arch/build/base/pacman/PKGBUILD	Mon Jun  4 15:54:29 2007
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD,v 1.141 2007/05/30 18:45:02 dan Exp $
+# $Id: PKGBUILD,v 1.142 2007/06/04 19:54:29 andyrtr Exp $
 # Maintainer: Aaron Griffin <aaron at archlinux.org>
 pkgname=pacman
 pkgver=3.0.4
-pkgrel=3
+pkgrel=4
 pkgdesc="A library-based package manager with dependency support"
 arch=('i686' 'x86_64')
 url="http://www.archlinux.org/pacman/"
@@ -16,10 +16,11 @@
         etc/abs/supfile.{arch,extra,community,testing,unstable})
 install=pacman.install
 source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz
-        pacman-es.po.patch)
+        pacman-es.po.patch gcc4.2.mtune.patch)
 options=(!libtool)
 md5sums=('e2c9426f543023809e8f45aef6484ef2'
-         'd5367a491454f047153c35cf7efb037b')
+         'd5367a491454f047153c35cf7efb037b'
+         '43d9fc8f978021dd6ada5e9476f47497')
 
 build() {
   cd $startdir/src/$pkgname-$pkgver
@@ -28,6 +29,9 @@
   patch -p0 < $startdir/src/pacman-es.po.patch
   rm src/pacman/po/stamp-po
 
+  # apply a patch for gcc4.2 for generic optimisations
+  patch -Np0 -i ../gcc4.2.mtune.patch || return 1
+
   # nothing fancy here
   ./configure --prefix=/usr --sysconfdir=/etc
   make || return 1
Index: arch/build/base/pacman/gcc4.2.mtune.patch
diff -u /dev/null arch/build/base/pacman/gcc4.2.mtune.patch:1.1
--- /dev/null	Mon Jun  4 15:54:29 2007
+++ arch/build/base/pacman/gcc4.2.mtune.patch	Mon Jun  4 15:54:29 2007
@@ -0,0 +1,13 @@
+--- etc/makepkg.conf.in	2007-03-14 23:05:47.000000000 +0000
++++ etc/makepkg.conf.in.new	2007-05-20 15:24:27.000000000 +0000
+@@ -21,8 +21,8 @@
+ #-- Exclusive: will only run on @CARCHFLAGS@
+ # -mtune builds exclusively for an architecture
+ # -mcpu optimizes for an architecture, but builds for the whole processor family
+-CFLAGS="- at ARCHSWITCH@=@CARCHFLAGS@ -O2 -pipe"
+-CXXFLAGS="- at ARCHSWITCH@=@CARCHFLAGS@ -O2 -pipe"
++CFLAGS="- at ARCHSWITCH@=@CARCHFLAGS@ -mtune=generic -O2 -pipe"
++CXXFLAGS="- at ARCHSWITCH@=@CARCHFLAGS@ -mtune=generic -O2 -pipe"
+ #-- Make Flags: change this for DistCC/SMP systems
+ #MAKEFLAGS="-j2"
+ 
Index: arch/build/base/pacman/pacman.install
diff -u arch/build/base/pacman/pacman.install:1.7 arch/build/base/pacman/pacman.install:1.8
--- arch/build/base/pacman/pacman.install:1.7	Thu May 10 12:08:42 2007
+++ arch/build/base/pacman/pacman.install	Mon Jun  4 15:54:29 2007
@@ -20,6 +20,12 @@
     echo ">>>"
   fi
   _rankmirrors
+  if [ "$(vercmp $2 3.0.4-4)" -lt 0 ]; then
+    echo "------------------------------------------------------------------------------------------------------------------------"
+    echo ">>> make sure you add \"-mtune=generic\" to the CFLAGS/CXXFLAGS if you want to provide packages compiled with gcc4.2 <<<"
+    echo ">>> use \"-mtune=native\" for local optimised builds - check the /etc/makepkg.conf.pacnew file <<<"
+    echo "------------------------------------------------------------------------------------------------------------------------"
+  fi
 }
 
 _rankmirrors() {




More information about the arch-commits mailing list