This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] compile libgomp.c++/pr30703.C with -shared-libgcc
Mike Stump <mrs@apple.com> writes:
> Ian, I was wondering what your take on this as a shared libgcc
> maintainer? I think it borders on obvious, but there is some concern
> that -shared-libgcc might not somehow work on some platforms.
I believe that -shared-libgcc will fail if gcc is configured with
--disable-shared. -shared-libgcc will happily pass -lgcc_s, but there
won't be any such library.
Since this is just for testing purposes how about just doing a static
link?
Ian
> On Mar 15, 2007, at 12:47 PM, Mike Stump wrote:
>
> > On Mar 15, 2007, at 6:50 AM, Jack Howarth wrote:
> >> The attached patch forces the libgomp.c++/pr30703 testsuite test
> >> to compile with the shared libgcc to prevent false failures on
> >> platforms
> >> like Darwin. This is required because the dejagnu harness used for
> >> the libgomp.c++ tests doesn't compile those tests with the g++
> >> compiler. Okay for trunk and 4.2 branch?
> >
> > I reviewed the patch and the gcc documentation and it looks correct
> > enough to add that flag. I think a better way to fix this would be
> > to instead do:
> >
> > Doing diffs in libgomp:
> > --- libgomp/testsuite/libgomp.c++/c++.exp.~1~ 2006-11-16
> > 23:18:00.000000000 -0800
> > +++ libgomp/testsuite/libgomp.c++/c++.exp 2007-03-15
> > 12:42:02.000000000 -0700
> > @@ -1,6 +1,6 @@
> > set lang_library_path "../libstdc++-v3/src/.libs"
> > set lang_test_file "${lang_library_path}/libstdc++.a"
> > -set lang_link_flags "-lstdc++"
> > +set lang_link_flags "-shared-libgcc -lstdc++"
> >
> > load_lib libgomp-dg.exp
> >
> > --------------
> >
> > 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? If so, I'll Ok that version.