[mythtv-commits] Ticket #13050: patch - fix gcc version checking in configure script
MythTV
noreply at mythtv.org
Thu Jun 1 15:26:47 UTC 2017
#13050: patch - fix gcc version checking in configure script
-------------------------------------------------+-------------------------
Reporter: Gary Buhrmaster | Owner: jyavenard
<gary.buhrmaster@…> |
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - configure script | Version: Master Head
Severity: medium | Keywords: gcc
Ticket locked: 0 |
-------------------------------------------------+-------------------------
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
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13050>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list