Some build reports (HP-UX, IRIX, Solaris, AIX, Linux)

Christoph Moench-Tegeder cmt@rz.uni-karlsruhe.de
Tue Apr 8 23:55:02 2003


Some notes on building gnupg 1.2.1 on different platforms
(all the stuff I couldn't find in the archives when I ran into
first trouble):

For all those needing idea: The check for bigendian platforms in idea.c
line 73 covers only gcc. For other compilers, I needed the following
patch:

--- /home/ws/ry04/gnupg/idea.c  Tue Mar 25 18:38:38 2003
+++ idea.c      Tue Apr  8 23:19:24 2003
@@ -73,6 +73,10 @@
 #if defined(__mc68000__) || defined (__sparc__) || defined (__PPC__) \
     || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)) ) \
     || defined(__powerpc__) || defined(__ppc__) \
+    || defined(_IBMR2)    /* IBM AIX xlc */ \
+    || defined(__sparc)   /* SUN WSpro cc */ \
+    || defined(__hpux)    /* HP-UX cc */ \
+    || defined(_MIPS_SIM) /* SGI IRIX cc */ \
     || defined(__hpux__) /* should be replaced by the Macro for the PA */
   #define BIG_ENDIAN_HOST 1
 #else

Some little patching was required so I coud link tiger and idea got linked
statically into gpg. This only affected cipher/Makefile.in and was rather
trivial:

--- gnupg-1.2.1.orig/cipher/Makefile.in Fri Oct 25 12:05:39 2002
+++ gnupg-1.2.1/cipher/Makefile.in      Fri Mar 28 15:24:01 2003
@@ -431,9 +431,6 @@
        mostlyclean-generic tags uninstall uninstall-am \
        uninstall-info-am
 
-
-tiger.o: $(srcdir)/tiger.c
-       `echo $(COMPILE) -c $(srcdir)/tiger.c | sed -e 's/-O[2-9s]*/-O1/g' `
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:

Note that the sed script breaks the $CFLAGS for IRIX's cc (it uses
-O -OPT:Olimit=2000), so it's a good idea too get rid of these lines
anyway.

Now for the compilers and $CFLAGS:

AIX 4.1, 4.3, 5.1:
 Compiler was xlc (IBM) (called via cc)
 Environment:
  CFLAGS='-O3 -qstrict'
  CXXFLAGS='-O3 -qstrict'
 ./configure --enable-tiger --enable-static-rnd=unix --disable-asm

HP-UX 9:
 HP-UX 9 does not know not know about RLIMIT_CORE. One can disable
 disable_core_dumps (g10/misc.c ll 85) or define RLIMIT_CORE as 4
 (this comes frome the HP-UX FAQ). I did the latter, so I ended up
 with:
 Compiler: gcc 2.95.2
 Environment:
  CFLAGS='-O3 -fomit-frame-pointer -DRLIMIT_CORE=4'
  PICFLAGS=+z
  CXXFLAGS='-O3 -fomit-frame-pointer'
 ./configure --enable-tiger --enable-static-rnd=unix

HP-UX 10, 11:
 Compiler: gcc 2.95.2
 Environment:
  CFLAGS='-O3 -fomit-frame-pointer -DRLIMIT_CORE=4'
  PICFLAGS=+z
  CXXFLAGS='-O3 -fomit-frame-pointer'
 ./configure --enable-tiger --enable-static-rnd=unix

IRIX 6.5:
 Compiler: cc (SGI)
 Environment:
  CFLAGS='-O -OPT:Olimit=2000'
  CXXFLAGS='-O -OPT:Olimit=2000'
 ./configure --enable-tiger --enable-static-rnd=unix --disable-asm

Linux (glibc 2.1 and 2.2):
 Works out of the box.
 Compiler: gcc 2.95.2
 Environment:
  CFLAGS='-O3 -fomit-frame-pointer'
  CXXFLAGS='-O3 -fomit-frame-pointer'
  PICFLAGS=-fPIC
 ./configure --enable-tiger --enable-static-rnd=linux

Solaris 7:
 Do not set CFLAGS=-xO3, you will get bus errors in some checks.
 Compiler: Sun WSpro 6
 Environment:
  PICFLAGS=-Kpic
 ./configure --enable-tiger  --enable-static-rnd=unix

I could not get a Tru64 for testing, may be next time.

Regards,
cmt

-- 
Spare Space