AX_C_FLOAT_WORDS_BIGENDIAN: Fix bug "AX_C_FLOAT_WORDS_BIGENDIAN fails… 46/309446/1 accepted/tizen_base accepted/tizen_base_asan accepted/tizen_base_toolchain accepted/tizen_base_x tizen_base accepted/tizen/base/20240415.081834 accepted/tizen/base/asan/20240422.014739 accepted/tizen/base/toolchain/20240424.234633 accepted/tizen/base/x/20240416.082018
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 11 Apr 2024 01:36:38 +0000 (10:36 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 11 Apr 2024 01:36:38 +0000 (10:36 +0900)
commit2ff58e62fd7b05e9092452498e4b84fb65ef0e49
tree028826adc41fdfd97d616b267dfe4d63dd9f438a
parent1a30e884f62fbc4c4aae8449df28fde0532956d9
AX_C_FLOAT_WORDS_BIGENDIAN: Fix bug "AX_C_FLOAT_WORDS_BIGENDIAN fails…
… whenever interprocedural optimization is enabled."

Previous versions of this macro would not work when interprocedural
optimization (via link-time optimization) was enabled. This would happen
when, say, the GCC/clang "-flto" flag, or the ICC "-ipo" flag was used, for
example. The problem was that under these conditions, the compiler did not
allocate for and write the special float value in the data segment of the
test object file. Thus, the special value (in platform-dependent binary form)
could not be found, and the macro would fail.

The solution to the above problem was to:

  1) Compile and link a whole test program rather than just compile an
     object file.

  2) Add code that requires the compiler to write the special value to
     the data segment of the program executable.

For further details, refer to the documentation in the macro source file. Note
that this change already increments the serial number of the file.

This change resolves the following issues:

CPython issue #89640
  python/cpython#89640

Gentoo bug #700012
  https://bugs.gentoo.org/700012

Cairo issue #459
  https://gitlab.freedesktop.org/cairo/cairo/-/issues/459

Poky (Yocto Project) #12699
  https://lists.yoctoproject.org/g/poky/topic/89131836

Change-Id: I7fd6401e3dcb0ffeeb2e51c06fe8630f146d12ad
m4/ax_c_float_words_bigendian.m4