Rebased patch from upstream commit for gcc 8 compatibility, fixes 1575520.

Add findutils as a package requirement, fixes 1576567..
epel9
Richard Shaw 7 years ago
parent 5456bb0ec1
commit 5abc9b51f9

@ -0,0 +1,100 @@
--- a/modules/Internals/SysFiles.pm
+++ a/modules/Internals/SysFiles.pm
@@ -1,7 +1,7 @@
###########################################################################
# A module to find system files and automatically generate include paths
#
-# Copyright (C) 2015-2017 Andrey Ponomarenko's ABI Laboratory
+# Copyright (C) 2015-2018 Andrey Ponomarenko's ABI Laboratory
#
# Written by Andrey Ponomarenko
#
@@ -31,7 +31,7 @@ my %BinUtils = map {$_=>1} (
);
# Header file extensions as described by gcc
-my $HEADER_EXT = "h|hh|hp|hxx|hpp|h\\+\\+";
+my $HEADER_EXT = "h|hh|hp|hxx|hpp|h\\+\\+|tcc|txx|x|inl|inc|ads|isph";
my %GlibcHeader = map {$_=>1} (
"aliases.h",
@@ -760,11 +760,13 @@ sub detectDefaultPaths($$$$)
printMsg("INFO", "Using GCC $GccVer ($Target, target: ".getArch_GCC(1).")");
# check GCC version
- if($GccVer=~/\A4\.8(|\.[012])|6\..*|7\..*\Z/)
+ if($GccVer=~/\A(4\.8(|\.[012])|[67]\..*)\Z/ or cmpVersions($GccVer, "8")>=0)
{ # GCC 4.8.[0-2]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57850
# GCC 6.[1-2].0: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78040
# GCC 7.1: still the same issue ...
- printMsg("WARNING", "May not work properly with GCC 4.8.[0-2], 6.* and higher due to bug #78040 in GCC. Please try other GCC versions with the help of --gcc-path=PATH option or try creating ABI dumps by ABI Dumper tool instead.");
+ # GCC 8: still the same issue ...
+ # ABICC 2.3: enable this for all future GCC versions
+ printMsg("WARNING", "May not work properly with GCC 4.8.[0-2], 6.* and higher due to bug #78040 in GCC. Please try other GCC versions with the help of --gcc-path=PATH option or create ABI dumps by ABI Dumper tool instead to avoid using GCC. Test selected GCC version first by -test option.");
$In::Opt{"GccMissedMangling"} = 1;
}
}
--- a/modules/Internals/TUDump.pm
+++ a/modules/Internals/TUDump.pm
@@ -1,7 +1,7 @@
###########################################################################
# A module to create AST dump
#
-# Copyright (C) 2015-2016 Andrey Ponomarenko's ABI Laboratory
+# Copyright (C) 2015-2018 Andrey Ponomarenko's ABI Laboratory
#
# Written by Andrey Ponomarenko
#
@@ -282,9 +282,17 @@ sub createTUDump($)
$HeaderPath = $PrePath;
}
+ my $GCC_8 = checkGcc("8"); # support for GCC 8 and new options
+
if($In::ABI{$LVer}{"Language"} eq "C++")
{ # add classes and namespaces to the dump
- my $CHdump = "-fdump-class-hierarchy -c";
+ my $CHdump = "-fdump-class-hierarchy";
+ if($GCC_8)
+ { # -fdump-lang-class instead of -fdump-class-hierarchy
+ $CHdump = "-fdump-lang-class";
+ }
+ $CHdump .= " -c";
+
if($In::Desc{$LVer}{"CppMode"}==1
or $MinGWMode{$LVer}==1) {
$CHdump .= " -fpreprocessed";
@@ -388,8 +396,14 @@ sub createTUDump($)
}
}
writeLog($LVer, "Temporary header file \'$TmpHeaderPath\' with the following content will be compiled to create GCC translation unit dump:\n".readFile($TmpHeaderPath)."\n");
+
# create TU dump
- my $TUdump = "-fdump-translation-unit -fkeep-inline-functions -c";
+ my $TUdump = "-fdump-translation-unit";
+ if ($GCC_8)
+ { # -fdump-lang-raw instead of -fdump-translation-unit
+ $TUdump = "-fdump-lang-raw";
+ }
+ $TUdump .= " -fkeep-inline-functions -c";
if($In::Opt{"UserLang"} eq "C") {
$TUdump .= " -U__cplusplus -D_Bool=\"bool\"";
}
@@ -458,8 +472,15 @@ sub createTUDump($)
unlink($TmpHeaderPath);
unlink($HeaderPath);
-
- if(my @TUs = cmdFind($TmpDir,"f","*.tu",1)) {
+
+ my $dumpExt;
+ if ($GCC_8) {
+ $dumpExt = "*.raw";
+ }
+ else {
+ $dumpExt = "*.tu";
+ }
+ if(my @TUs = cmdFind($TmpDir,"f",$dumpExt,1)) {
return $TUs[0];
}
else

@ -1,12 +1,14 @@
Name: abi-compliance-checker Name: abi-compliance-checker
Version: 2.2 Version: 2.2
Release: 2%{?dist} Release: 3%{?dist}
Summary: An ABI Compliance Checker Summary: An ABI Compliance Checker
License: GPLv2+ or LGPLv2+ License: GPLv2+ or LGPLv2+
URL: http://lvc.github.io/abi-compliance-checker/ URL: http://lvc.github.io/abi-compliance-checker/
Source0: https://github.com/lvc/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Source0: https://github.com/lvc/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: abi-compliance-checker-gcc8.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: perl-generators BuildRequires: perl-generators
@ -14,6 +16,7 @@ BuildRequires: perl(Getopt::Long)
Requires: gcc >= 4.5 Requires: gcc >= 4.5
Requires: gcc-c++ >= 4.5 Requires: gcc-c++ >= 4.5
Requires: binutils Requires: binutils
Requires: findutils
Requires: ctags >= 5.8 Requires: ctags >= 5.8
Requires: ccache >= 3.1.2 Requires: ccache >= 3.1.2
Requires: abi-dumper >= 0.99.15 Requires: abi-dumper >= 0.99.15
@ -26,7 +29,7 @@ checks for changes in calling stack, changes in v-table, removed symbols, etc.
%prep %prep
%setup -q %autosetup -p1
%build %build
@ -47,6 +50,10 @@ perl Makefile.pl -install --prefix=%{_prefix} --destdir=%{buildroot}
%changelog %changelog
* Tue May 08 2018 Richard Shaw <hobbes1069@gmail.com> - 2.2-3
- Rebased patch from upstream commit for gcc 8 compatibility, fixes 1575520.
- Add findutils as a package requirement, fixes 1576567..
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-2 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save