PING: [8u112] Request for review & approval for CR8151841: Build needs additional flags to compile with GCC 6
Erik Joelsson
erik.joelsson at oracle.com
Mon Aug 1 11:34:34 UTC 2016
Looks good now, thanks!
Sorry for not answering earlier. I just got back from vacation.
/Erik
On 2016-07-15 17:22, Andrew Hughes wrote:
> Ping?
>
> ----- Original Message -----
>> ----- Original Message -----
>>> Hello,
>>>
>>> It looks like TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS is always returning
>>> yes and TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS still does both the C and
>>> C++ checks.
>>>
>> Ugh, merged a block in the wrong place by the looks of it.
>>
>> Fixed in http://cr.openjdk.java.net/~andrew/8u/8151841/webrev.02/
>>
>> configure:29739: checking if the C++ compiler supports "-std=gnu++98 "
>> configure:29755: /usr/bin/g++ -c -std=gnu++98 conftest.cpp >&5
>> configure:29755: $? = 0
>> configure:29769: result: yes
>> configure:29815: checking if the C compiler supports
>> "-fno-delete-null-pointer-checks -Werror"
>> configure:29832: /usr/bin/gcc -c -fno-delete-null-pointer-checks -Werror
>> conftest.c >&5
>> configure:29832: $? = 0
>> configure:29846: result: yes
>> configure:29855: checking if the C++ compiler supports
>> "-fno-delete-null-pointer-checks -Werror"
>> configure:29871: /usr/bin/g++ -c -fno-delete-null-pointer-checks -Werror
>> conftest.cpp >&5
>> configure:29871: $? = 0
>> configure:29885: result: yes
>> configure:29894: checking if both compilers support
>> "-fno-delete-null-pointer-checks -Werror"
>> configure:29899: result: yes
>> configure:29911: checking if the C compiler supports "-fno-lifetime-dse
>> -Werror"
>> configure:29927: /usr/bin/gcc -c -fno-lifetime-dse -Werror conftest.c >&5
>> configure:29927: $? = 0
>> configure:29941: result: yes
>> configure:29950: checking if the C++ compiler supports "-fno-lifetime-dse
>> -Werror"
>> configure:29966: /usr/bin/g++ -c -fno-lifetime-dse -Werror conftest.cpp >&5
>> configure:29966: $? = 0
>> configure:29980: result: yes
>> configure:29989: checking if both compilers support "-fno-lifetime-dse
>> -Werror"
>> configure:29994: result: yes
>>
>>
>>> /Erik
>>>
>>> On 2016-07-07 22:21, Andrew Hughes wrote:
>>>> Webrev: http://cr.openjdk.java.net/~andrew/8u/8151841/webrev.01/
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8151841
>>>>
>>>> This is a backport of the original fix to support building OpenJDK
>>>> with GCC 6. It was necessary to cherry-pick parts of a number of
>>>> earlier fixes to make this work with the build system in 8:
>>>>
>>>> 8149647: Incremental enhancements from build-infra
>>>> 8032045: Enable compiler and linker safety switches for debug builds
>>>>
>>>> and so I'm requesting a review of the 8 version of the patch here as well
>>>> as approval for 8u.
>>>>
>>>> In brief, the patch makes OpenJDK build with GCC 6 by explicitly
>>>> specifying
>>>> the C++ standard to use (-std=gnu++98) and disabling two optimisations
>>>> with
>>>> -fno-lifetime-dse and -fno-delete-null-pointer-checks. Further
>>>> information
>>>> on the changes is available in the GCC 6 release notes [0]. GCC 6 uses
>>>> a newer C++ standard, C++14, with which the OpenJDK codebase is not yet
>>>> compliant. The simplest way to fix this, especially for existing
>>>> releases,
>>>> is to explicitly request the previous default, gnu++98. The deletion
>>>> of null pointer checks and more aggressive lifetime dead store
>>>> elimination
>>>> in 6 lead to a crashing virtual machine being built, so we disable them
>>>> if GCC >= 6 is used.
>>>>
>>>> To make the original patch work with 8u, a number of changes from other
>>>> fixes had to also be brought over:
>>>>
>>>> * We need to check we are using GCC 6 or above, so we need to bring
>>>> over the TOOLCHAIN_CHECK_COMPILER_VERSION and
>>>> TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS macros from 8149647.
>>>> TOOLCHAIN_CHECK_COMPILER_VERSION is converted back to a traditional
>>>> numbered rather than named argument macro so we don't need to backport
>>>> BASIC_DEFUN_NAMED.
>>>> * We bring over the introduction of COMMON_CCXXFLAGS_JDK from 8030245
>>>> as we need to apply the -std option only to the C++ compiler, not the
>>>> C compiler. If passed to the C compiler, it will produce a warning,
>>>> and this is converted to an error at one point in the build
>>>> (a -Werror in libsctp).
>>>>
>>>> Generally, we've kept things in toolchain.m4 (8034788 introduced
>>>> flags.m4,
>>>> separating out some code, and so many of these changes are in that file
>>>> in 9) and avoid named argument macros. Otherwise, it's largely the
>>>> same as the 9 version. We have adopted the longer name for
>>>> the -fno-delete-null-pointer-checks flag variable as suggested in the
>>>> review of the update to this patch for the new HotSpot build [1].
>>>>
>>>> [0] https://gcc.gnu.org/gcc-6/porting_to.html
>>>> [1]
>>>> http://mail.openjdk.java.net/pipermail/hotspot-dev/2016-July/023840.html
>>>
>> --
>> Andrew :)
>>
>> Senior Free Java Software Engineer
>> Red Hat, Inc. (http://www.redhat.com)
>>
>> PGP Key: ed25519/35964222 (hkp://keys.gnupg.net)
>> Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
>>
>>
>>
More information about the jdk8u-dev
mailing list