Accepting request 570493 from Java:Factory

Fix build with gcc 7.3

OBS-URL: https://build.opensuse.org/request/show/570493
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/java-1_8_0-openjdk?expand=0&rev=55
This commit is contained in:
Dominique Leuenberger 2018-01-29 13:55:46 +00:00 committed by Git OBS Bridge
commit c982bf55ed
2 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jan 29 09:44:55 UTC 2018 - fstrba@suse.com
- Fix build with gcc 7.3
* add -fno-delete-null-pointer-checks -fno-lifetime-dse and
-std=gnu++98
-------------------------------------------------------------------
Fri Nov 3 11:36:40 UTC 2017 - fstrba@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package java-1_8_0-openjdk
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -446,8 +446,18 @@ export ZLIB_LIBS="-L/%{_lib} -lz"
%endif
CFLAGS=$(rpm -E '%{optflags}' | sed 's/-Wall\>//')
CFLAGS="$CFLAGS -Wno-error"
CXXFLAGS=${CFLAGS}
%ifarch ppc64 ppc64le ppc
CFLAGS="$CFLAGS -fno-strict-aliasing"
%endif
%if 0%{?suse_version} >= 1330
CFLAGS="$CFLAGS -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fpermissive"
CXXFLAGS="$CXXFLAGS -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
%endif
export CFLAGS
export CXXFLAGS=${CFLAGS}
export CXXFLAGS
%if %{with_sunec}
export NSS_SOFTOKN_CFLAGS="`pkg-config --cflags nss` -I`pwd`"
export NSS_SOFTOKN_LIBS="-L%{_libdir} -lnssdbm3 -lsoftokn3 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lfreebl -L%{_libdir}/nspr -lplds4 -lplc4 -lnspr4"