#7779: OpenJDK-1.8.0.92
-----------------------------+------------------------------
 Reporter:  pierre.labastie  |       Owner:  pierre.labastie
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  7.10
Component:  BOOK             |     Version:  SVN
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by pierre.labastie):

 Trying to summarize the issues with GCC 6:
 - All the compilations using g++ need ''-std=c++98'', ''-fno-delete-null-
 pointer-checks'', and ''-fno-lifetime-dse'', while those using gcc
 sometimes need ''-fno-delete-null-pointer-checks'' and ''-fno-lifetime-
 dse''. See [http://hg.openjdk.java.net/jdk9/dev/rev/9d77f922d694]. Problem
 is the build system does not honor the CC and CXX variables.
 - There are options ''--with-extra-cflags'' and ''--with-extra-cxxflags'',
 which can be passed to configure, but the '''hotspot''' build system uses
 extra-cflags as flags for g++. So ''-std=c++98'' has to be added to the
 extra-cflags. But then, when used as flags for gcc, it generates a
 warning, and because ''-Werror'' is used, it becomes an error and stops
 the build. So the right combination for extra-cflags is ''-std=c++98 -fno-
 delete-null-pointer-checks -fno-lifetime-dse -Wno-error''.
 - That is not enough. During the build of '''jdk''', there is a make
 variable, which is passed for some compilations:
 {{{
 SCTP_ERROR := -Werror -Wno-error=unused-parameter
 }}}
 and $(SCTP_ERROR) is inserted after the extra-cflags, so the effect of
 ''-Wno-error'' is lost, and the build fails at this point.

 There is a srpm in fedora rawhide
 (java-1.8.0-openjdk-1.8.0.91-3.b14.fc25.src.rpm), which has:
 {{{
 EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-
 pointer-checks -fno-lifetime-dse"
 EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks
 -fno-lifetime-dse"
 [...]
 bash configure \
 [...]
    --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
    --with-extra-cflags="$EXTRA_CFLAGS"
 [...]
 make [...] SCTP_ERROR=
 }}}
 With those instructions added to the book, the build goes to completion. I
 need to run the tests now.

--
Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/7779#comment:2>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to