View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017375 | CentOS-7 | java | public | 2020-05-19 03:57 | 2020-05-19 03:57 |
Reporter | xliu | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0017375: java-11-openjdk can't build with gcc6+ | ||||
Description | This line doesn't seem correct. https://git.centos.org/rpms/java-11-openjdk/blob/c7/f/SPECS/java-11-openjdk.spec#_1327 The reason is hotspot must depend on a flag called '-fno-lifetime-dse'. It first appears in gcc6. ie.,it must be present to prohibit g++ from optimizing objects based on their lifetime. When configure try to detect if CC supports "-fno-lifetime-dse -Werror", the result is disturbed by the presence of -std=gnu++98 in CFLAGS. The flag -sdt=gnu++98 should only be valid for g++. configure:55513: checking if CC supports "-fno-lifetime-dse -Werror" configure:55531: /usr/bin/gcc -c -m64 -g -pipe -Wformat -Wno-cpp -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -Werror conftest.c >&5 cc1: error: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C [-Werror] cc1: all warnings being treated as errors configure:55531: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "OpenJDK" | #define PACKAGE_TARNAME "openjdk" | #define PACKAGE_VERSION "openjdk" | #define PACKAGE_STRING "OpenJDK openjdk" | #define PACKAGE_BUGREPORT "build-dev@openjdk.java.net" | #define PACKAGE_URL "http://openjdk.java.net" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_STDIO_H 1 | #define SIZEOF_INT_P 8 | /* end confdefs.h. */ | int i; configure:55546: result: no configure:55630: checking if CXX supports "-fno-lifetime-dse -Werror" configure:55648: /usr/bin/g++ -c -fno-lifetime-dse -Werror conftest.cpp >&5 configure:55648: $? = 0 configure:55663: result: yes configure:55687: checking if both CC and CXX support "-fno-lifetime-dse -Werror" configure:55694: result: no jdk11 still carries some undefined bahaviors. without -fno-lifetime-dse, c1 acts weird. you can't complete the whole building process of openjdk11. | ||||
Steps To Reproduce | rpm build with gcc6+ | ||||
Additional Information | https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2020-May/038288.html | ||||
Tags | No tags attached. | ||||
abrt_hash | |||||
URL | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2020-05-19 03:57 | xliu | New Issue |