develooper Front page | perl.perl5.porters | Postings from March 2007

Re: [perl #41595] [PATCH] 5.8.8 Use CFLAGS for all compilerinvocations

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
March 9, 2007 11:03
Subject:
Re: [perl #41595] [PATCH] 5.8.8 Use CFLAGS for all compilerinvocations
Message ID:
20070309200339.185c0582@pc09
On Thu, 22 Feb 2007 19:33:45 -0800, Tom Callaway (via RT)
<perlbug-followup@perl.org> wrote:

> As part of the review process for Perl, I'm opening bugs for the 
> long list of patches to perl that Fedora has been carrying around
> (in some cases, for years), in the hopes that these fixes can be
> applied upstream. In this specific case, I actually _AM_ the 
> original author of this patch, so I can explain exactly why it is
> relevant. :)

Thanks, applied in change #30528

> sparc64 is a special Linux architecture. The userland, by default,
> is 32bit (sparc), but since we want to support 64bit binaries
> (sparc64) as well, we compile some packages (mostly dependencies
> of glibc and gcc) as both 32bit and 64bit optimized (two packages,
> hooray multilib).
> Unfortunately, when we run gcc -shared, without passing -m64 while
> trying to build perl (or anything else, for that matter), libtool
> tries to link it as a 32bit binary, from 64bit pieces, and massive
> explosions occur. The obvious fix for perl is to ensure that we're 
> using our $optimize flags at every gcc invocation, -shared or 
> otherwise. This one line patch achieves that. Most of these flags 
> get dropped on the floor, but when gcc sees -m64, it passes the 
> right bits to libtool, which links it as a 64bit binary object.
> 
> This is filed in Red Hat's bugzilla as:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=199372
> 
> --- perl-5.8.8/Configure.BAD    2006-07-17 12:43:58.000000000 -0400
> +++ perl-5.8.8/Configure        2006-07-17 12:44:04.000000000 -0400
> @@ -7659,7 +7659,7 @@
>                               '') dflt="$dflt +vnocompatwarnings" ;;
>                               esac
>                               ;;
> -                       linux|irix*|gnu*)       dflt='-shared' ;;
> +                       linux|irix*|gnu*)       dflt="-shared
> $optimize" ;;
>                         next)  dflt='none' ;;
>                         solaris) dflt='-G' ;;
>                         sunos) dflt='-assert nodefinitions' ;;

-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x   on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.2, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | 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