Bill Allombert on Sat, 30 Nov 2002 23:46:03 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: --host in Configure


On Fri, Nov 29, 2002 at 12:25:00PM -0800, Justin C. Walker wrote:
> First, the 'separator' error arises becase the library name is 
> terminated with a ';', which causes the system some indigestion.  Cf. 
> the line below marked with <<<<<.
Oh well, sorry, I miss it when reading the output Makefile. (I have tested
by doing ./Configure --host=ppc-darwin on i686-linux...).
> 
> Second, you don't appear to need "-I/usr/local/include" for Mac OS X, at 
> least in versions 10.2 and later.  I'll check into that further, but as 
> it is (on 10.2.2 with all tools updates installed), the compiler grouses 
> about having that directory specified.

That would be pretty silly of it. Even if /usr/local/include is in the
default search path of this patched gcc, it should accept it for the
sake of portability.

> Finally (or, third), 'ld' grouses about the argument to "-i".  The 
> complaint is:
> 
>     /usr/bin/ld: -i argument: nstall_name must have a ':' between its 
> symbol names

The problem is that DLLD was set to ld instead of cc, and ld
 does not like options of cc

Here a new version. May you'll have better luck.
Cheers,
Bill
Index: Configure
===================================================================
RCS file: /home/megrez/cvsroot/pari/Configure,v
retrieving revision 1.95
diff -u -r1.95 Configure
--- Configure	2002/10/22 22:07:51	1.95
+++ Configure	2002/11/30 22:44:10
@@ -521,9 +521,12 @@
   case "$osname-$arch" in
     linux-i?86|cygwin*|os2-*) OPTFLAGS="$OPTFLAGS \
       -malign-loops=2 -malign-jumps=2 -malign-functions=2";;
+  esac
+  case "$osname-$arch" in
     *-sparcv8*) cflags=-mv8;;
+    darwin-*) cflags=-fno-common;;
+    os2-*) cflags=-Zmt;;
   esac
-  if test "X$osname" = Xos2; then cflags=-Zmt; fi
 
   # omit-frame-pointer incompatible with -pg
   PRFFLAGS="-pg $OPTFLAGS"
@@ -553,6 +556,7 @@
 
 case "$osname" in
   nextstep)  cflags="-traditional-cpp $cflags";;
+  darwin)  cflags="-no-cpp-precomp $cflags";;
 esac
 
 case "$optimization" in
@@ -634,6 +638,7 @@
   linux-*|cygwin*|freebsd-*)
       LD=$CC; LDFLAGS="$cflags -Xlinker -export-dynamic"
       runpathprefix='-Xlinker -rpath -Xlinker ';;
+  darwin-*) LD=$CC; LDFLAGS="$cflags"; runpathprefix='';; #FIXME
   osf1-alpha)
       LD=$ld; LIBS="$LIBS -lots -lc"; runpathprefix='-rpath '
       LDFLAGS='-std0 -call_shared /usr/lib/cmplrs/cc/crt0.o'
@@ -667,7 +672,8 @@
 echo "Executable linker is   $LD  $LDFLAGS"
 
 if test "$optimization" = profiling; then DLLD=; else
-  DLLD=${DLLD-ld}
+  DLLD=${DLLD-ld} 
+  #FIXME: if CC=gcc we must link with gcc.
   DLSUFFIX=so
 # Which suffix for Dynamic Lib?
 # Some linkers (SunOS 4) need minor and major lib version numbers.
@@ -692,6 +698,10 @@
 	    # DLL names better be 8+3
 	    libpari_base=`echo "$libpari_base" | sed 's/\./_/g'`
 	 ;;
+    darwin-*) soname=''; sodest=''; 
+        DLSUFFIX="$VersionMajor.dylib";
+        DLLD=$CC;
+        ;;
     *) DLLD=;;
   esac
 fi
@@ -728,6 +738,7 @@
       sunos-*)   DLLDFLAGS="-assert nodefinitions" ;;
       solaris-*) DLLDFLAGS="-G -h \$(LIBPARI_SONAME)" ;;
       os2-*)	 ;;
+      darwin-*)  DLLDFLAGS="-install_name \$(LIBDIR)/\$(LIBPARI_SONAME) -compatibility_version $version -current_version $pari_release";;#FIXME for unstable branch.
       *)         DLLD=;;
     esac
   fi