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

Re: -Os for Darwin why?

Thread Previous | Thread Next
From:
Wilfredo Sánchez
Date:
February 18, 2003 13:38
Subject:
Re: -Os for Darwin why?
Message ID:
39127898-4389-11D7-B275-0003936FA9FA@mit.edu
   Yes, thanks.

	-wsv


On Tuesday, February 18, 2003, at 11:37 AM, schwern@pobox.com wrote:

> So if the logic is "we want -Os with 3.x and -O3 with anything else"
> it should be something like the patch below (stealing liberally from
> hints/linux.sh).
>
> --- hints/darwin.sh	2003/02/18 19:28:05	1.1
> +++ hints/darwin.sh	2003/02/18 19:36:45
> @@ -58,11 +58,14 @@
>  # pace with CPU speed over time (on any platform), this is probably a
>  # reasonable assertion.
>  if [ -z "${optimize}" ]; then
> -  case "$osvers" in
> -    [12345].*) optimize='-O3' ;;
> -    *) optimize='-Os' ;;
> +  case "`${cc:-gcc} -v 2>&1`" in
> +    *"gcc version 3."*) optimize='-Os' ;;
> +    *) optimize='-O3' ;;
>    esac
> +else
> +  optimize='-O3'
>  fi
> +
>
>  # -pipe: makes compilation go faster.
>  # -fno-common because common symbols are not allowed in MH_DYLIB


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