From c3d9146a8ac2961d1b960e1c0b29801f965886bc Mon Sep 17 00:00:00 2001 From: n-isaka Date: Fri, 1 Aug 2025 12:05:30 +0000 Subject: [PATCH] fix(tests): Errors occurring in the new version of GCC * Fixes the issue with multiple definitions of `cob_unifunc` when linking COBOL modules. * The following error occurred ``` gcc -pipe -Wl,--export-dynamic -o prog caller.o callee.o -L/usr/local/lib -lcob -lm -lvbisam -lgmp -lncurses /usr/bin/ld: callee.o:(.bss+0x0): multiple definition of `cob_unifunc'; caller.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status ``` --- tests/run.src/misc.at | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run.src/misc.at b/tests/run.src/misc.at index 3e0ada9..29b0497 100644 --- a/tests/run.src/misc.at +++ b/tests/run.src/misc.at @@ -498,7 +498,8 @@ AT_DATA([caller.cob], [ AT_CHECK([${COMPILE_MODULE} -c callee.cob]) AT_CHECK([${COMPILE} -c caller.cob]) -AT_CHECK([${COMPILE} -o prog caller.${OBJEXT} callee.${OBJEXT}]) +AT_CHECK([export COB_LDFLAGS="-z muldefs ${COB_LDFLAGS}"; \ + ${COMPILE} -o prog caller.${OBJEXT} callee.${OBJEXT}]) AT_CHECK([./prog], [0], [OK]) AT_CLEANUP