diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-11-23 14:22:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-11-24 14:49:21 +0100 |
commit | d3f2c61e3b9faf577f692ece76cd830f0f74b028 (patch) | |
tree | 53ce212315caffda877b29198903532ac3f96c84 /autogen.sh | |
parent | d21b290be2e7905a400100f207d1dc124eba0a26 (diff) |
Make Jenkins linux_gcc_release_64 pick up Developer Toolset 7
...as discussed at
<https://lists.freedesktop.org/archives/libreoffice/2018-November/081423.html>
"Re: Compiler baselines".
It doesn't look exactly right to enable the Developer Toolset from autogen.sh.
But the alternative would be to "hide" that in
<https://ci.libreoffice.org/job/gerrit_linux_gcc_release/configure>, which would
probably not be helpful when developers try to track down why a certain Jenkins
build behaves the way it does. So pragmatically stick it in autogen.sh. (Also,
it puts Developer Toolset on the PATH whenever it is found on a system using
LODE_HOME, not just for the specific Config=linux_gcc_release_64 case. Lets see
how that works out in practice.)
However, it turns out that the Developer Toolset 7's GCC 7.3.1 with
--enable-werror (that is implicitly enabled for LODE-driven builds in
configure.ac) and (implicit) --enable-optimized produces many false warnings
(i.e., errors), see below for a sample. (Actually, my experience is that
contemporary GCC hardly ever work with -Werror in optimized builds, due to
analysis being done on already optimized code; it surprised me to find out that
the Jnekins linux_gcc_release_64 builds were apparently successfully done with
--enable-werror with GCC 4.8.5.) So explicitly --disable-werror for these
builds. (Which means that <https://gerrit.libreoffice.org/plugins/gitiles/lode/
+/b82e0a9d26ef4c81046c053ff831dccfc84c56be%5E!> "For linux_gcc_release_64, don't
let ccache strip comments" could probably be reverted again if it has negative
impact on Jenkins' performance.)
Some of the false warnings encountered:
> [CXX] jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
> In file included from /opt/rh/devtoolset-7/root/usr/include/c++/7/vector:69:0,
> from /home/tdf/sberg/core/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx:39:
> /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/vector.tcc: In function ‘javaPluginError jfw_plugin_startJavaVirtualMachine(const JavaInfo*, const JavaVMOption*, sal_Int32, JavaVM**, JNIEnv**)’:
> /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/vector.tcc:407:15: error: variable ‘__new_finish’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
> pointer __new_finish(__new_start);
> ^~~~~~~~~~~~
> cc1plus: all warnings being treated as errors
> [CXX] libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx: In function ‘gboolean gtv_calc_header_bar_draw(GtkWidget*, cairo_t*)’:
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:117: error: ‘aRectangle._cairo_rectangle_int::height’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2);
> ~~~~~~~~~~~~~~~~~~^~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::height’ was declared here
> GdkRectangle aRectangle;
> ^~~~~~~~~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:59: error: ‘aRectangle._cairo_rectangle_int::width’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2);
> ~~~~~~~~~~~~~~~~~^~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::width’ was declared here
> GdkRectangle aRectangle;
> ^~~~~~~~~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:97: error: ‘aRectangle._cairo_rectangle_int::y’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2);
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::y’ was declared here
> GdkRectangle aRectangle;
> ^~~~~~~~~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:89:40: error: ‘aRectangle._cairo_rectangle_int::x’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> cairo_move_to(pCairo, rRectangle.x + rRectangle.width / 2 - extents.width / 2, rRectangle.y + rRectangle.height / 2 + extents.height / 2);
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
> /home/tdf/sberg/core/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx:102:22: note: ‘aRectangle._cairo_rectangle_int::x’ was declared here
> GdkRectangle aRectangle;
> ^~~~~~~~~~
> cc1plus: all warnings being treated as errors
> [CXX] svl/source/misc/lockfilecommon.cxx
> /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx: In static member function ‘static rtl::OUString svt::LockFileCommon::GetCurrentLocalTime()’:
> /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:190:10: error: ‘%02d’ directive writing between 2 and 5 bytes into a region of size between 1 and 9 [-Werror=format-overflow=]
> OUString LockFileCommon::GetCurrentLocalTime()
> ^~~~~~~~~~~~~~
> /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:190:10: note: directive argument in the range [0, 65535]
> /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:190:10: note: directive argument in the range [0, 65535]
> /home/tdf/sberg/core/svl/source/misc/lockfilecommon.cxx:204:24: note: ‘sprintf’ output between 17 and 31 bytes into a destination of size 20
> sprintf( pDateTime, "%02d.%02d.%4d %02d:%02d", aDateTime.Day, aDateTime.Month, aDateTime.Year, aDateTime.Hours, aDateTime.Minutes );
> ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cc1plus: all warnings being treated as errors
Change-Id: I3a851b7591274a8cf8b4729ae036afeb8e82eedc
Reviewed-on: https://gerrit.libreoffice.org/63884
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh index 8c0bb0ade4ba..478aed6944b5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -151,6 +151,13 @@ if (defined $ENV{LODE_HOME}) $ENV{PATH}="$ENV{LODE_HOME}/opt/bin:$ENV{PATH}"; print STDERR "add LODE_HOME/opt/bin in PATH\n"; } + # For the Config=linux_gcc_release_64 Jenkins jobs that build on CentOS against Developer + # Toolset 7: + if (-d '/opt/rh/devtoolset-7/root/usr/bin') + { + $ENV{PATH}="/opt/rh/devtoolset-7/root/usr/bin:$ENV{PATH}"; + print STDERR "added /opt/rh/devtoolset-7/root/usr/bin to PATH\n"; + } } my $aclocal_flags = $ENV{ACLOCAL_FLAGS}; |