diff: configure.in change to shared libs on dec-alpha

Fergus Henderson fjh at cs.mu.oz.au
Mon Sep 15 20:49:10 AEST 1997


configure.in:
	On alpha-dec-osf*, use `gcc -shared' rather than `ld -shared'
	to create shared libraries.  This is necessary to get gcc's
	`__attribute__((constructor))' extension (which is used by
	extras/clpr/cfloat.m) to work, and it is probably also
	necessary to make constructors for C++ global object work when
	using shared libraries containing both Mercury and C++ code.

	The drawback is just that I'm not sure whether it works
	with gcc 2.6.3.  I've only tested it with gcc 2.7.2.

Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.107
diff -u -r1.107 configure.in
--- configure.in	1997/09/11 13:31:57	1.107
+++ configure.in	1997/09/15 10:04:02
@@ -1358,11 +1358,11 @@
 		;;
 	alpha-dec-osf*)
 		AC_MSG_RESULT(yes)
-		LINK_SHARED_OBJ="ld -O3 -shared \
-			-update_registry ../so_locations"
+		LINK_SHARED_OBJ="gcc -shared \
+			-Wl,-O3,-update_registry,../so_locations"
 		EXE_RPATH_OPT="-Wl,-rpath,"
 		EXE_RPATH_SEP=":"
-		SHLIB_RPATH_OPT="-rpath "
+		SHLIB_RPATH_OPT="-Wl,-rpath,"
 		SHLIB_RPATH_SEP=":"
 		EXT_FOR_SHARED_LIB=so
 		# -fpic not needed on Alpha/OSF, since it is the default

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list