RFR: 8285692: Enable _FORTIFY_SOURCE=2 when building with Clang

Magnus Ihse Bursie ihse at openjdk.org
Thu Dec 5 22:26:45 UTC 2024


Clang has supported _FORTIFY_SOURCE since version 10. We already use it when building with gcc ([JDK-8130017](https://bugs.openjdk.org/browse/JDK-8130017)) in fastdebug builds. We should add it to fastdebug builds with Clang.

I solved this by unifying the clang/gcc flag setup.

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

Commit messages:
 - 8285692: Enable _FORTIFY_SOURCE=2 when building with Clang

Changes: https://git.openjdk.org/jdk/pull/22586/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22586&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8285692
  Stats: 23 lines in 1 file changed: 7 ins; 15 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/22586.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22586/head:pull/22586

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


More information about the build-dev mailing list