develooper Front page | perl.perl5.porters | Postings from September 2000

Re: [ID 20000924.003] OpenBSD hints file update

Thread Previous
From:
Andy Dougherty
Date:
September 25, 2000 06:43
Subject:
Re: [ID 20000924.003] OpenBSD hints file update
Message ID:
Pine.SOL.4.10.10009250942230.13531-100000@maxwell.phys.lafayette.edu
On Sun, 24 Sep 2000 abigail@foad.org wrote:

> On Sun, Sep 24, 2000 at 04:42:56PM -0600, Todd C. Miller wrote:
> > 
> > +	# Starting with OpenBSD 2.8 shared libs are generated using
> > +	# "cc -shared" (for both a.out and elf)
> > +	case "$osvers" in
> > +	2.[89]|3*)
> > +		ld=${cc:-cc}
> > +		lddlflags="-shared $lddlflags"
> > +		;;
> > +	*)
> > +		lddlflags="-Bshareable $lddlflags"
> > +		;;
> > +	esac
> > +
> 
> But wouldn't that break starting with version 4, (or even version 2.10)?

Good catch.  Yes, it's always a good idea to imagine that the hints file
you're writing will be frozen and used _exactly as is_ for at least one
and possibly two years.  It's good to be defensive.

> Why not:
> 
>    	case "$osvers" in
>    	[01].*|2.[0-7]|2.[0-7].*)
>    		lddlflags="-Bshareable $lddlflags"
>    		;;
>    	*)
>    		ld=${cc:-cc}
>    		lddlflags="-shared $lddlflags"
>    		;;
>    	esac

Yes, this makes more sense.

-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042


Thread Previous


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