[Lunar-commits] <moonbase> beecrypt: fix 32-bit compilation on 64-bit h/w

Paul Bredbury brebs at lunar-linux.org
Thu Sep 10 00:38:20 CEST 2009


commit ff595077b9e9d1471ed46e8b1e000481ed7614a7
Author: Paul Bredbury <brebs at lunar-linux.org>
Date:   Thu Sep 10 05:38:20 2009 +0700

    beecrypt: fix 32-bit compilation on 64-bit h/w
    
    The configure script makes bad assumptions, based on -march.
---
 crypto/beecrypt/BUILD |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/crypto/beecrypt/BUILD b/crypto/beecrypt/BUILD
new file mode 100644
index 0000000..99fe35e
--- /dev/null
+++ b/crypto/beecrypt/BUILD
@@ -0,0 +1,18 @@
+(
+
+  # Fixes compilation error:
+  # mpopt.s:62: Error: bad register name `%rdi'
+  # http://bugs.sourcemage.org/show_bug.cgi?id=15293#c2
+  if [[ $(arch) == i686 ]] ; then
+    # Workaround for bad configure script
+    export CFLAGS=${CFLAGS/-march=nocona/-march=i686}
+    export CFLAGS=${CFLAGS/-march=core2/-march=i686}
+    export CFLAGS=${CFLAGS/-march=athlon-fx/-march=i686}
+    export CFLAGS=${CFLAGS/-march=k8/-march=i686}
+    export CFLAGS=${CFLAGS/-march=opteron/-march=i686}
+    export CFLAGS=${CFLAGS/-march=em64t/-march=i686}
+  fi  &&
+
+  default_build
+
+) > $C_FIFO 2>&1


More information about the Lunar-commits mailing list