详细错误如下:
/home/tsrj/tsjdk8-project/tsjdk8-252/hotspot/src/share/vm/runtime/arguments.cpp: In static member function ‘static void Arguments::fix_appclasspath()’: /home/tsrj/tsjdk8-project/tsjdk8-252/hotspot/src/share/vm/runtime/arguments.cpp:3459:12: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=] strncpy(copy, src, strlen(src) + 1); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
代码看起来没问题,所以去掉报错即可:
make/linux/makefiles/gcc.make:204
注释掉WARNINGS_ARE_ERRORS = -Werror