Compiling Python on NetBSD

D'Arcy J.M. Cain darcy at vex.net
Fri Feb 25 07:47:22 EST 2000


I have a question about the following code in Python's configure script.

    case $ac_sys_system/$ac_sys_release in
...
    NetBSD*)
        if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
        then
            LDSHARED="cc -shared"
        else
            LDSHARED="ld -Bshareable"
        fi;;

Can someone tell me why the decision was made to use cc on ELF systems
and ld on a.out?  I checked and my a.out system accepts cc -shared just
fine.  The reason for asking is that our package building system now
has to do the same test on every Python package to decide whether to
add -Wl, in front of the ld flags if there are additional libraries
to link in.  It would be a lot cleaner if we didn't have to add this
test in on every package.

Anyway, I am thinking of patching the configure script in our package
system so that the NetBSD* simply sets LDSHARED to "cc -shared" in every
case.  Anyone see a downside to that?

-- 
D'Arcy J.M. Cain <darcy at vex.net>           |  Democracy is three wolves
http://www.vex.net/                        |  and a sheep voting on         
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list