the Right place to change a target default for a common compiler flag?

IainS developer@sandoe-acoustics.co.uk
Wed Sep 23 13:53:00 GMT 2009


Hi Dominique,

I would expect you to need  -gstrict-dwarf in CFLAGS_FOR_TARGET also

but the point of my question is to find a way of having this on by  
default on Darwin (which is what we currently seem to need).

(more research is need on the latter - to determine whether the  
problem lies in our emission of debug fragments - or in the tools

cheers,
Iain

On 23 Sep 2009, at 14:42, Dominique Dhumieres wrote:

> Iain,
>
> I am currently bootstrapping on i686-apple-darwin9 with the current  
> patch:
>
> diff -uN /opt/gcc/_gcc_clean/config/mh-intel-darwin /opt/gcc/ 
> gcc-4.5-work/config/mh-intel-darwin
> --- /opt/gcc/_gcc_clean/config/mh-intel-darwin	1970-01-01  
> 01:00:00.000000000 +0100
> +++ /opt/gcc/gcc-4.5-work/config/mh-intel-darwin	2009-09-23  
> 13:47:12.000000000 +0200
> @@ -0,0 +1,3 @@
> +# Set strict-dwarf for Darwin
> +
> +BOOT_CFLAGS += -gstrict-dwarf
> diff -uN /opt/gcc/_gcc_clean/config/mh-ppc-darwin /opt/gcc/gcc-4.5- 
> work/config/mh-ppc-darwin
> --- /opt/gcc/_gcc_clean/config/mh-ppc-darwin	2008-02-25  
> 11:00:23.000000000 +0100
> +++ /opt/gcc/gcc-4.5-work/config/mh-ppc-darwin	2009-09-23  
> 12:07:12.000000000 +0200
> @@ -2,4 +2,4 @@
>  # position-independent-code -- the usual default on Darwin. This  
> fix speeds
>  # compiles by 3-5%.
>
> -BOOT_CFLAGS += -mdynamic-no-pic
> +BOOT_CFLAGS += -mdynamic-no-pic -gstrict-dwarf
> --- /opt/gcc/_gcc_clean/configure	2009-09-22 20:04:27.000000000 +0200
> +++ /opt/gcc/gcc-4.5-work/configure	2009-09-23 13:50:29.000000000  
> +0200
> @@ -3655,6 +3655,12 @@
>    powerpc-*-darwin*)
>      host_makefile_frag="config/mh-ppc-darwin"
>      ;;
> +  i[3456789]86-*-darwin*)
> +    host_makefile_frag="config/mh-intel-darwin"
> +    ;;
> +  x86_64-*-darwin[912]*)
> +    host_makefile_frag="config/mh-intel-darwin"
> +    ;;
>    powerpc-*-aix*)
>      host_makefile_frag="config/mh-ppc-aix"
>      ;;
>
> I am currently at stage 3 and I see -gstrict-dwarf in the log file.
>
> I don't know if it is the Right place, but it seems to work so far.
>
> Cheers,
>
> Dominique



More information about the Gcc mailing list