https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65351

--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #9)
> Does the following patch:
> 
> --- config/picflag.m4 2013-11-18 09:59:08.420212365 +0100
> +++ config/picflag.m4 2015-03-31 18:36:21.989401000 +0200
> @@ -9,7 +9,9 @@ case "${$2}" in
>      *-*-darwin*)
>       # PIC is the default on this platform
>       # Common symbols not allowed in MH_DYLIB files
> -     $1=-fno-common
> +     # Cancel any earlier -mdynamic-no-pic, as that makes
> +     # the code not suitable for shared libraries.
> +     $1=-fno-common -mno-dynamic-no-pic

heh;
.. of course the first thing I tried was appending -fPIC here, which doesn't
work.. why i didn't then think of this, no clue :)

It would be a good idea to check that the -fPIC default gets set correctly for
-mdynamic-no-pic -mno-dynamic-no-pic, or alternately just append -fPIC here. 
Will check which is needed.

I notice that there's no use of GCC_PICFLAG by libdecnumber (it just assumes
-fPIC) and that several of the libraries have auto-tools with different
versions from the default.

That aside, I'll look at applying this and regenerating configures where
required.

Reply via email to