[Coin-discuss] building Cgl/Clp/Osi on Linux Alpha

David Bremner bremner at unb.ca
Tue Aug 24 14:02:39 EDT 2004


I made a few small changes to Makefile.Linux to let it compile on 
Linux Alpha, for those of us who still have a few of those around.

If I leave the -ffast-math flag on, I get a floating point exception
in CLP.  Unfortunately I have not had a chance to analyse the problem,
or really figure out the best optimization flags for gcc on alpha.

It would be great for me if this patch could be incorporated into CVS 
so that I could continue following the CVS head.

The -D__64BIT__ is a bit of a hack (since it pretends to be AIX) but
it seems to work.  A casual glance suggest that most of that ifdefed
code could be replaced by the use  of ptrint_t. Of course, it might
have to be defined somewhere.


Index: Makefile.Linux
===================================================================
RCS file: /usr/cvs/coin/COIN/Makefiles/Makefile.Linux,v
retrieving revision 1.6
diff -u -r1.6 Makefile.Linux
--- Makefile.Linux	16 Oct 2003 18:53:08 -0000	1.6
+++ Makefile.Linux	24 Aug 2004 17:42:53 -0000
@@ -11,6 +11,11 @@
 FF := g77
 DEPFF := g77 -MM
 
+ARCH=$(shell arch)
+ifeq ($(ARCH),alpha)
+	CXXFLAGS+= -D__64BIT__
+endif
+
 ###############################################################################
 
 ifeq ($(OptLevel),-O)
@@ -22,8 +27,11 @@
 compilerOptFlags := -O -O1 -O2 -O3 -O4 -O5 -O6
 ifeq ($(OptLevel),-O1)
      CXXFLAGS += -DNDEBUG
-     CXXFLAGS += -ffast-math -fomit-frame-pointer
-     CXXFLAGS += -march=i686
+     CXXFLAGS += -fomit-frame-pointer
+     ifeq ($(ARCH),i686)	
+	CXXFLAGS += -ffast-math
+	CXXFLAGS += -march=i686
+     endif
 endif
 
 ###############################################################################





More information about the Coin-discuss mailing list