Backward compatibility issues

This section describes backward compatibility issues and their workarounds.

Compiler option compatibility issues

In IBM XL C/C++ for Linux, V11.1, the implementation of the threadprivate data, that is, OpenMP threadprivate variable, has been improved. The operating system thread local storage is used instead of the runtime implementation. The new implementation might improve performance on some applications.

If you plan to mix the object files .o that you have compiled with levels prior to 11.1 with the object files that you compiled with IBM XL C/C++ for Linux, V11.1, and the same OpenMP threadprivate variables are referenced in both old and new object files, different implementations might cause incompatibility issues. A link error, a compile time error or other undefined behaviors might occur. To support backward compatibility, you can use the -qsmp=noostls suboption to switch back to the old implementation. You can recompile the entire program with the default suboption -qsmp=ostls to get the benefit of the new implementation.

If you are not sure whether the object files you have compiled with levels prior to IBM XL C/C++ for Linux, V11.1 contain any old implementation, you can use the readelf -s command to determine whether you need to use the -qsmp=noostls suboption. The following code is an example that shows how to use the readelf -s command:
> readelf -s oldfiles.o
...
._xlGetThStorageBlock U           -
._xlGetThValue        U           -
...
In the preceding example, if _xlGetThStorageBlock or _xlGetThValue is found, this means the object files contain old implementation. In this case, you must use -qsmp=noostls; otherwise, use the default suboption -qsmp=ostls.