[Patches] Fix building extensions on Solaris

Greg Ward gward@mems-exchange.org
Wed, 24 May 2000 09:31:21 -0400


This patch fixes Python's "configure.in" so that extensions are linked
with "gcc -G" on Solaris when GCC is the compiler.

It does not take the Solaris or GCC version into account, so I have no
idea how widely applicable it is.  This is just a strawman to get some
feedback.

--- configure.in        2000/05/22 21:31:50     1.123
+++ configure.in        2000/05/24 13:30:50
@@ -493,7 +493,11 @@
        IRIX/5*) LDSHARED="ld -shared";;
        IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
        SunOS/4*) LDSHARED="ld";;
-       SunOS/5*) LDSHARED="ld -G";;
+       SunOS/5*) 
+               if test "$GCC" = "yes"
+               then LDSHARED='$(CC) -G'
+               else LDSHARED="ld -G";
+               fi ;;
        hp*|HP*) LDSHARED="ld -b";;
        OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
        DYNIX/ptx*) LDSHARED="ld -G";;

-- 
Greg Ward - software developer                gward@mems-exchange.org
MEMS Exchange / CNRI                           voice: +1-703-262-5376
Reston, Virginia, USA                            fax: +1-703-262-5367