summaryrefslogtreecommitdiff
path: root/security/cryptlib/files/patch-tools_ccopts.sh
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2011-03-04 14:43:50 +0000
committerAlex Dupre <ale@FreeBSD.org>2011-03-04 14:43:50 +0000
commitcfc3c50827dc2aa765957a834e0cdbfe856e7567 (patch)
tree966cee5fcea54379753c4eceb46393161b3bedaa /security/cryptlib/files/patch-tools_ccopts.sh
parent- unbreak port to build in FreeBSD 9 arch i386 (diff)
Update to 3.4.0 release and add support for amd64.
Notes
Notes: svn path=/head/; revision=270298
Diffstat (limited to 'security/cryptlib/files/patch-tools_ccopts.sh')
-rw-r--r--security/cryptlib/files/patch-tools_ccopts.sh31
1 files changed, 20 insertions, 11 deletions
diff --git a/security/cryptlib/files/patch-tools_ccopts.sh b/security/cryptlib/files/patch-tools_ccopts.sh
index 9e438eb8b043..e1b43d127496 100644
--- a/security/cryptlib/files/patch-tools_ccopts.sh
+++ b/security/cryptlib/files/patch-tools_ccopts.sh
@@ -1,16 +1,25 @@
---- tools/ccopts.sh.orig Fri Jul 14 08:37:59 2006
-+++ tools/ccopts.sh Fri Jul 14 08:38:19 2006
-@@ -129,13 +129,6 @@
- # "version gcc" (we can't use just "gcc" by itself since this appears
- # elsewhere in the gcc -v output).
+--- tools/ccopts.sh.orig 2010-12-19 00:57:12.000000000 +0100
++++ tools/ccopts.sh 2011-03-04 15:33:54.000000000 +0100
+@@ -341,22 +341,6 @@ fi
+ # in situations that also use shared libs, in the case of x86-64 the use
+ # of PIC should have minimum overhead so it shouldn't be a big deal.
--if [ `uname -m | grep "i[3,4,5,6]86"` > /dev/null ] ; then
-- if [ `gcc --version 2>&1 | head -n 1 | tr -d '[A-Za-z]. ()' | cut -c 1` -gt 2 ] ; then
-- CCARGS="$CCARGS -march=pentium" ;
+-if [ "$ARCH" = "i586" -o "$ARCH" = "i686" -o "$ARCH" = "x86_64" ] ; then
+- if [ "$GCC_VER" -ge 30 ] ; then
+- case $ARCH in
+- 'x86_64')
+- CCARGS="$CCARGS -march=opteron -fPIC" ;;
+-
+- 'i686')
+- CCARGS="$CCARGS -march=pentiumpro" ;;
+-
+- *)
+- CCARGS="$CCARGS -march=pentium" ;;
+- esac ;
- else
- CCARGS="$CCARGS -mcpu=pentium" ;
-- fi
+- fi ;
-fi
- # Check for gcc 4.x with its stupid default setting of -Wpointer-sign,
- # which leads to endless warnings about signed vs.unsigned char problems -
+ # gcc 4.x for 64-bit architectures has an optimiser bug that removes an
+ # empty-list check in cryptlib's list-management code (this has been