[Patch] compile libgomp.c++/pr30703.C with -shared-libgcc

Mike Stump mrs@apple.com
Thu Mar 15 21:25:00 GMT 2007

On Mar 15, 2007, at 1:37 PM, Andrew Pinski wrote:
> On 3/15/07, Mike Stump <mrs@apple.com> wrote:
>> The idea is to put the fix next to the thing that is broken, that way
>> it is impossible for another case to break.  Someone want to agree
>> with my patch and reasoning?
> This version is better but it will not work on targets that don't have
> shared libgcc's.

To quote the manual:

   If no shared version of @file{libgcc} was built when the compiler  
was configured, these options have no effect.

Do we know of any cases that don't respect the documentation?

> Can I suggest what is included in the libjava jni testsuite:
>   # If you're building the compiler with --prefix set to a place
>   # where it's not yet installed, then the linker won't be able to
>   # find the libgcc used by libffi.dylib.  We could pass the
>   # -dylib_file option, but that's complicated, and it's much easier
>   # to just make the linker find libgcc using -L options.
>   if { [istarget "*-*-darwin*"] } {
>       lappend cxxflaglist "-shared-libgcc -lstdc++"
>   } else {
>       lappend cxxflaglist "-lstdc++"
>   }

The only problem with that is that it is brittle, one needs to  
maintain the list of targets.

Ok, let's leave the issue to a libgcc type person.  Oh, Ian, what do  
you think?

More information about the Gcc-patches mailing list