After suppressing the Wdeprecated-copy warining, another error occurs.
* For target hotspot_variant-server_libjvm_objs_threadHeapSampler.o:
/home/haosun01/tmp/build-err/jdk_src/src/hotspot/share/runtime/threadHeapSampler.cpp:397:33: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
assert(result > 0 && result < SIZE_MAX, "Result is not in an acceptable range.");
~ ^~~~~~~~
/usr/include/stdint.h:227:22: note: expanded from macro 'SIZE_MAX'
# define SIZE_MAX (18446744073709551615UL)
^~~~~~~~~~~~~~~~~~~~~~
-Wimplicit-int-float-conversion was first introduced in clang 10.