You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The autoconf test for linking TCL/Tk libraries is flawed when using an optimizing compiler such as AOCC. AOCC 5.0 defaults to using the optimization level -O2, which includes dead-code elimination. The current autoconf test is trying to check for the Tcl_Init and Tk_Init symbols by assigning them to variables which are then never referenced. This is seen by the compiler as dead code, and removed. Thus, the symbols are not included in the object and the link-test passes, even if there are no TCL/Tk libraries on the system.
Current test in configure.ac:
[ void *x1 = Tcl_Init; void *x2 = Tk_Init;]
One possible solution is to change the test from a simple assignment to calling those functions, at which the expression is used, and not elided by the optimizing compiler:
[ int x1 = Tcl_Init(); int x2 = Tk_Init();]
Another possible solution would be to force use of -O0 during for this test.
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered:
Bug report
Bug description:
The
autoconf
test for linking TCL/Tk libraries is flawed when using an optimizing compiler such as AOCC. AOCC 5.0 defaults to using the optimization level-O2
, which includes dead-code elimination. The current autoconf test is trying to check for theTcl_Init
andTk_Init
symbols by assigning them to variables which are then never referenced. This is seen by the compiler as dead code, and removed. Thus, the symbols are not included in the object and the link-test passes, even if there are no TCL/Tk libraries on the system.Current test in
configure.ac
:One possible solution is to change the test from a simple assignment to calling those functions, at which the expression is used, and not elided by the optimizing compiler:
Another possible solution would be to force use of
-O0
during for this test.CPython versions tested on:
3.12, 3.13
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: