develooper Front page | perl.perl5.porters | Postings from November 2003

[PATCH] Be sure to use -fPIC not -fpic on Linux/SPARC

Thread Next
From:
Andy Dougherty
Date:
November 5, 2003 14:18
Subject:
[PATCH] Be sure to use -fPIC not -fpic on Linux/SPARC
Message ID:
Pine.SOL.4.53.0311051715140.24878@maxwell.phys.lafayette.edu
hints/linux.sh was not properly identifying SPARC systems, and hence was
letting Configure fall back on -fpic.  For SPARC, however, -fPIC is needed
for at least some extensions with at least some set of flags.  (I have not
exhaustively tested permutations.)

This rather conservative patch fixes the problem.  I'll make a better
patch for the appropriate metaconfig unit sometime in the future.

--- perl-5.8.x/hints/linux.sh	2003-09-23 20:36:26.000000000 -0400
+++ perl-5.8.x-andy/hints/linux.sh	2003-11-05 16:37:44.000000000 -0500
@@ -247,8 +247,8 @@
 #'osfmach3ppc') ccdlflags='-Wl,-E' ;;
 #esac

-case "`uname -r`" in
-sparc-linux)
+case "`uname -m`" in
+sparc*)
 	case "$cccdlflags" in
 	*-fpic*) cccdlflags="`echo $cccdlflags|sed 's/-fpic/-fPIC/'`" ;;
 	*)	 cccdlflags="$cccdlflags -fPIC" ;;

-- 
    Andy Dougherty		doughera@lafayette.edu

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About