You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
3.9 KiB
101 lines
3.9 KiB
--- 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
|