On Tue, 11 Mar 2025, Richard Biener wrote:
> On Tue, 11 Mar 2025, Jakub Jelinek wrote:
>
> > On Tue, Mar 11, 2025 at 02:40:19PM +0100, Richard Biener wrote:
> > > OK, I've done that and amended the set of testcases with one
> > > exercising dg-error. I had to prune the sprious
> > >
> > > cobol1: error: failed compiling t.cob
> > >
> > > message we emit. I don't see any warnings emitted from the frontend
> > > and wasn't able to create a Cobol program where the middle-end
> > > would emit one.
> >
> > Thanks. One more thing. The libgcobol dependence on libstdc++
> > makes me wonder if the *.exp file doesn't have to include
> > -B etc. options not just for libgcobol itself but also for libstdc++.
> > Otherwise I wonder what libstdc++ is being considered during the linking
> > (preferably not relying on any system libstdc++).
>
> Good point - I'll see to add those.
The following incremental patch does this. The result has everything
needed but also some weird entries:
Setting LD_LIBRARY_PATH to
.:/tmp/obj/x86_64-pc-linux-gnu/./libgcobol/.libs:/tmp/obj/x86_64-pc-linux-gnu/./libstdc++-v3/src/.libs:/tmp/obj/gcc/testsuite/cobol/../..:/tmp/obj/gcc/testsuite/cobol/../../32:.:/tmp/obj/x86_64-pc-linux-gnu/./libgcobol/.libs:/tmp/obj/x86_64-pc-linux-gnu/./libstdc++-v3/src/.libs:/tmp/obj/gcc/testsuite/cobol/../..:/tmp/obj/gcc/testsuite/cobol/../../32
Richard.
diff --git a/gcc/testsuite/lib/cobol.exp b/gcc/testsuite/lib/cobol.exp
index 65687bc64ae..73dfeab5ba8 100644
--- a/gcc/testsuite/lib/cobol.exp
+++ b/gcc/testsuite/lib/cobol.exp
@@ -119,6 +119,9 @@ proc cobol_link_flags { paths } {
}
append ld_library_path ":${gccpath}/libgcobol/.libs"
}
+ if { [file exists
"${gccpath}/libstdc++-v3/src/.libs/libstdc++.${shlib_ext}"] } {
+ append ld_library_path ":${gccpath}/libstdc++-v3/src/.libs"
+ }
if [file exists "${gccpath}/libiberty/libiberty.a"] {
append flags "-L${gccpath}/libiberty "