Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#13050 closed Patch - Bug Fix (fixed)

patch - fix gcc version checking in configure script

Reported by: Gary Buhrmaster <gary.buhrmaster@…> Owned by: Stuart Auchterlonie
Priority: minor Milestone: 29.0
Component: MythTV - configure script Version: Master Head
Severity: medium Keywords: gcc
Cc: Ticket locked: no

Description

patch - fix gcc version checking in configure script

gcc -dumpversion in gcc 7 (for at least some installations) now returns the single number 7 (not 7.1, or 7.1.1, which would be typical in previous gcc versions for some distros). This breaks the mythtv configure script when trying to determine if symbol visibility and missing declaration settings are supported. There were some discussions on the gcc lists as to what the behavior should be (as -dumpversion is used for filesystem paths in some cases) and distros vary, and a new option -dumpfullversion was introduced to include the entire major.minor.patch version. As mythtv (per coding standards) requires gcc 4.7 or better at this time, just eliminate the version checking intended to support older gcc entirely.

Proposed patch (lightly tested):

diff --git a/mythtv/configure b/mythtv/configure
index c5167393b5..8b7ba2ed6f 100755
--- a/mythtv/configure
+++ b/mythtv/configure
@@ -7886,19 +7886,10 @@ esac
 
 if enabled gxx; then
     if enabled symbol_visibility; then
-        # Don't check for patch levels in gcc4 series.
-        # See https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1360404
-        if expr "$gxx_version" : '4\.[2-9]' >/dev/null || expr "$gxx_version" : '[5-9]\..*\.' >/dev/null; then
-            check_cxxflags -fvisibility-inlines-hidden
-            append CCONFIG "use_hidesyms"
-        else
-            disable symbol_visibility
-            warn "--enable-symbol-visibility requires gcc 4.2 or higher"
-        fi
-    fi
-    if expr "$gxx_version" : '4\.[3-9]' >/dev/null || expr "$gxx_version" : '[5-9]\..*\.' >/dev/null; then
-        check_cxxflags -Wmissing-declarations
+        check_cxxflags -fvisibility-inlines-hidden
+        append CCONFIG "use_hidesyms"
     fi
+    check_cxxflags -Wmissing-declarations
     check_cxxflags -Wno-switch
     check_cxxflags -Woverloaded-virtual
     check_cxxflags -funit-at-a-time

Change History (3)

comment:1 Changed 7 years ago by Stuart Auchterlonie

Milestone: unknown29.0
Owner: changed from JYA to Stuart Auchterlonie
Status: newassigned

Pretty sure I just ran into this on f26 beta

comment:2 Changed 7 years ago by Gary Buhrmaster <gary.buhrmaster@…>

Resolution: fixed
Status: assignedclosed

In 1866a820f69162d1ffda724e0173478eeac0f78b/mythtv:

Fixes #13050 - Properly enable symbol visibility for GCC7

Signed-off-by: Stuart Auchterlonie <stuarta@…>

comment:3 Changed 7 years ago by Gary Buhrmaster <gary.buhrmaster@…>

In 2d42863a62dc721e5ddea61a3aedfc414ca4c0ff/mythtv:

Fixes #13050 - Properly enable symbol visibility for GCC7

Signed-off-by: Stuart Auchterlonie <stuarta@…>
(cherry picked from commit 1866a820f69162d1ffda724e0173478eeac0f78b)

Note: See TracTickets for help on using tickets.