RFR: 8354941: Build failure with glibc 2.42 due to uabs() name collision [v2]

Severin Gehwolf sgehwolf at openjdk.org
Tue Apr 29 08:47:04 UTC 2025


> glibc 2.42 defines its own version of `uabs` when `stdlib.h` is being included. I propose to rename the hotspot version of `uabs` to `custom_uabs` (or some other suitable name) to avoid the name clash. The rename of the function is hidden by using a `UABS` macro instead in the code.
> 
> Testing:
> - [x] GHA (also [here](https://github.com/jerboaa/jdk/actions/runs/14513365723))
> - [x] Builds with this patch with GCC 15 where the build would fail earlier and pass with this patch.
> 
> Thoughts?

Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:

 - Use g_uabs instead of uabs
 - Merge branch 'master' into jdk-8354941-gcc-15-build-fix
 - 8354941: Build failure with GCC 15 due to uabs() name collision

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/24723/files
  - new: https://git.openjdk.org/jdk/pull/24723/files/8868fdfd..ddd4139a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24723&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24723&range=00-01

  Stats: 51845 lines in 1369 files changed: 39914 ins; 7781 del; 4150 mod
  Patch: https://git.openjdk.org/jdk/pull/24723.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24723/head:pull/24723

PR: https://git.openjdk.org/jdk/pull/24723


More information about the hotspot-dev mailing list