Skip to content

Commit c3d9146

Browse files
committed
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 ```
1 parent 166fcf8 commit c3d9146

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/run.src/misc.at

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ AT_DATA([caller.cob], [
498498

499499
AT_CHECK([${COMPILE_MODULE} -c callee.cob])
500500
AT_CHECK([${COMPILE} -c caller.cob])
501-
AT_CHECK([${COMPILE} -o prog caller.${OBJEXT} callee.${OBJEXT}])
501+
AT_CHECK([export COB_LDFLAGS="-z muldefs ${COB_LDFLAGS}"; \
502+
${COMPILE} -o prog caller.${OBJEXT} callee.${OBJEXT}])
502503
AT_CHECK([./prog], [0], [OK])
503504

504505
AT_CLEANUP

0 commit comments

Comments
 (0)