[Python-Dev] binutils/solaris -- one more thing

Guido van Rossum guido@python.org
Mon, 23 Sep 2002 11:33:04 -0400


> Assuming that the binutils developers do conclude that the -zcombreloc
> problem is to be fixed, not worked around (as I think they will),
> there is still one more binutils-related build problem that I
> encountered with Solaris:  At binutils 2.12, the output from "ld -V"
> changed in a way that invalidated the previous way of testing for
> the presence of dynamic linking.
> 
> Someone--I forget who--gave me a patch that solved the problem;
> I believe that this patch is necessary to build Python on Solaris
> with binutils 2.12 or later.  Can I ask someone to check whether
> it is already part of 2.2.2?
> 
> 
> --------
> *** configure.in	2002-09-23 10:07:42.559545843 -0400
> --- configure.in.new	2002-09-23 10:08:32.944415830 -0400
> ***************
> *** 889,895 ****
>   		fi;;
>   	SunOS/5*) case $CC in
>   		  *gcc*)
> ! 		    if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
>   		    then
>   			LINKFORSHARED="-Xlinker --export-dynamic"
>   		    fi;;
> --- 889,895 ----
>   		fi;;
>   	SunOS/5*) case $CC in
>   		  *gcc*)
> ! 		    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
>   		    then
>   			LINKFORSHARED="-Xlinker --export-dynamic"
>   		    fi;;

But what if this code is used with a version of binutils prior to
2.12?

--Guido van Rossum (home page: http://www.python.org/~guido/)