1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00

Given the header files and shared objects corresponding to two different shared

library versions, and a simple description of each of the shared libraries in
XML format, abi-compliance-checker searches for the following kinds of binary
compatibility problems:

--Added/withdrawn interfaces (functions, global variables)
--Problems in Data Types:
	--Classes: added/withdrawn virtual functions (changes in layout of
		virtual table), virtual function positions, virtual function
		redefinitions
	--Structural data types: added/withdrawn members (changes in layout of
		type structure),
		changes in members, size changes
	--Enumerations: member value changes
--Interface problems:
	--Parameters and return type changes
	--Static property changes

The checker then generates a report that assesses the risks of any potential
problems detected.

WWW: http://ispras.linux-foundation.org/index.php/ABI_compliance_checker

PR:		ports/138094
Submitted by:	bf <bf1783 at gmail.com>
This commit is contained in:
Martin Wilke 2009-08-27 09:07:15 +00:00
parent 2bc8e775ef
commit 163298885b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=240387
5 changed files with 186 additions and 0 deletions

View File

@ -12,6 +12,7 @@
SUBDIR += ZendOptimizer
SUBDIR += a2dev
SUBDIR += aap
SUBDIR += abi-compliance-checker
SUBDIR += ace
SUBDIR += ace+tao
SUBDIR += ace+tao-doc

View File

@ -0,0 +1,36 @@
# New ports collection makefile for: abi-compliance-checker
# Date created: August 21, 2009
# Whom: bf <bf1783@gmail.com>
#
# $FreeBSD$
#
PORTNAME= abi-compliance-checker
PORTVERSION= 1.4
CATEGORIES= devel perl5
MASTER_SITES= http://ispras.linux-foundation.org/images/c/c1/
DISTFILES= ${PORTNAME:S/^a/A/}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= bf1783@gmail.com
COMMENT= Checks binary compatibility of two versions of a C/C++ shared library
NO_BUILD= yes
USE_PERL5_RUN= yes
PLIST_FILES= bin/${PORTNAME}.pl
CPPFILT?= c++filt
READELF?= readelf
post-patch:
${REINPLACE_CMD} -e "s|c++filt|${CPPFILT}|g" \
-e "s|readelf|${READELF}|g" -e "s|g++|${CXX}|g" \
-e "s|\"gcc|\"${CC}|g" -e "s|-shared|& -fPIC|g" ${WRKSRC}/${PORTNAME}.pl
do-install:
@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.pl ${PREFIX}/bin
regression-test: build
@(cd ${WRKSRC} && ./${PORTNAME}.pl -test )
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (Abi-compliance-checker-1.4.tar.gz) = da40b6a17ed0fbe5316f782c775cfd24
SHA256 (Abi-compliance-checker-1.4.tar.gz) = 5ee303b7c700925758d50a14516ad8e29b6272c71e1cdf494057f72939190a62
SIZE (Abi-compliance-checker-1.4.tar.gz) = 43856

View File

@ -0,0 +1,124 @@
--- abi-compliance-checker.pl.orig 2009-08-18 14:29:08.000000000 -0400
+++ abi-compliance-checker.pl 2009-08-23 05:20:10.000000000 -0400
@@ -276,7 +276,7 @@
my $LibVersion = $_[0];
if(not -e $Descriptor{$LibVersion}{'Path'})
{
- print "descriptor d$LibVersion does not exists, incorrect file path $Descriptor{$LibVersion}{'Path'}\n";
+ print "descriptor d$LibVersion does not exist: incorrect file path $Descriptor{$LibVersion}{'Path'}\n";
exit(0);
}
my $Descriptor_File = `cat $Descriptor{$LibVersion}{'Path'}`;
@@ -2470,7 +2470,7 @@
system("g++ >header_compile_errors/$TargetLibraryName/$Descriptor{$Version}{'Version'} 2>&1 -fdump-translation-unit temp/$Lib_VersionName.h $CompilerOptions{$Version} $AddOpt");
if($?)
{
- print "WARNING: some errors have occured while headers compilation\nyou can see compilation errors in the file header_compile_errors/$TargetLibraryName/$Descriptor{$Version}{'Version'}\n";
+ print "WARNING: some errors have occured while compiling header(s)\nyou can see compilation errors in the file header_compile_errors/$TargetLibraryName/$Descriptor{$Version}{'Version'}\n";
}
`mv -f $Lib_VersionName.h*.tu temp/`;
return (split("\n", `find temp -maxdepth 1 -name "$Lib_VersionName\.h*\.tu"`))[0];
@@ -2565,13 +2565,13 @@
sub parseHeaders_AllInOne($)
{
$Version = $_[0];
- print "headers checking v$Descriptor{$Version}{'Version'} ...\n";
+ print "checking header(s) v$Descriptor{$Version}{'Version'} ...\n";
`mkdir -p header_compile_errors/$TargetLibraryName/`;
`rm -fr header_compile_errors/$TargetLibraryName/$Descriptor{$Version}{'Version'}`;
my $DumpPath = getDump_AllInOne();
if(not $DumpPath)
{
- print "\nERROR: can't create gcc syntax tree for headers\nyou can see compilation errors in the file header_compile_errors/$TargetLibraryName/$Descriptor{$Version}{'Version'}\n";
+ print "\nERROR: can't create gcc syntax tree for header(s)\nyou can see compilation errors in the file header_compile_errors/$TargetLibraryName/$Descriptor{$Version}{'Version'}\n";
exit(1);
}
getInfo($DumpPath);
@@ -4306,7 +4306,7 @@
sub testSystem_cpp()
{
- print "testing on C++ library changes\n";
+ print "testing for C++ library changes\n";
my @DataDefs_v1 = ();
my @Sources_v1 = ();
my @DataDefs_v2 = ();
@@ -4690,7 +4690,7 @@
sub testSystem_c()
{
- print "\ntesting on C library changes\n";
+ print "\ntesting for C library changes\n";
my @DataDefs_v1 = ();
my @Sources_v1 = ();
my @DataDefs_v2 = ();
@@ -5448,27 +5448,27 @@
elsif($Kind eq "Return_Type_And_Size")
{
$Incompatibility = "Type of return value has been changed from <span style='white-space:nowrap;'><b>$Old_Value</b> (<b>$Old_Size</b> bytes)</span> to <span style='white-space:nowrap;'><b>$New_Value</b> (<b>$New_Size</b> bytes)</span>\n";
- $Effect = "Applications will have got different return value and it's execution may change";
+ $Effect = "Applications will get a different return value and execution may change";
}
elsif($Kind eq "Return_Type")
{
$Incompatibility = "Type of return value has been changed from <span style='white-space:nowrap;'><b>$Old_Value</b></span> to <span style='white-space:nowrap;'><b>$New_Value</b></span>\n";
- $Effect = "Applications will have got different return value and it's execution may change";
+ $Effect = "Applications will get a different return value and execution may change";
}
elsif($Kind eq "Return_BaseType")
{
$Incompatibility = "Base type of return value has been changed from <span style='white-space:nowrap;'><b>$Old_Value</b> (<b>$Old_Size</b> bytes)</span> to <span style='white-space:nowrap;'><b>$New_Value</b> (<b>$New_Size</b> bytes)</span>\n";
- $Effect = "Applications will have got different return value and it's execution may change";
+ $Effect = "Applications will get a different return value and execution may change";
}
elsif($Kind eq "Return_PointerLevel_And_Size")
{
$Incompatibility = "Type pointer level of return value has been changed from <b>$Old_Value</b> to <b>$New_Value</b> and size of type has been changed from <b>$Old_Size</b> bytes to <b>$New_Size</b> bytes\n";
- $Effect = "Applications will have got different return value and it's execution may change";
+ $Effect = "Applications will get a different return value and execution may change";
}
elsif($Kind eq "Return_PointerLevel")
{
$Incompatibility = "Type pointer level of return value has been changed from <b>$Old_Value</b> to <b>$New_Value</b>\n";
- $Effect = "Applications will have got different return value and it's execution may change";
+ $Effect = "Applications will get a different return value and execution may change";
}
if($Incompatibility)
{
@@ -6056,7 +6056,7 @@
my @SoLibPaths = getSoPaths($LibVersion);
if($#SoLibPaths eq -1)
{
- print "ERROR: there are no any shared objects in specified paths in library descriptor d$LibVersion\n";
+ print "ERROR: there are no shared objects in the paths specified in library descriptor d$LibVersion\n";
exit(1);
}
foreach my $SoLibPath (@SoLibPaths)
@@ -6436,7 +6436,7 @@
system("cd $InfoDump_FilePath/ && tar -cf $InfoDump_FileName".".tar $InfoDump_FileName");
system("cd $InfoDump_FilePath/ && gzip $InfoDump_FileName".".tar --best");
`rm -f $InfoDump_FilePath/$InfoDump_FileName`;
- print "see library info dump in $InfoDump_FilePath/$InfoDump_FileName.tar.gz and use it instead of library version descriptor on other machine\n";
+ print "see library info dump in $InfoDump_FilePath/$InfoDump_FileName.tar.gz: use it instead of library version descriptor on other machine\n";
exit(0);
}
@@ -6487,15 +6487,15 @@
parseHeaders_AllInOne(2);
}
- print "headers comparison ...\n";
+ print "comparing headers ...\n";
mergeHeaders();
}
#LIBS MERGING
- print "shared objects comparison ...\n";
+ print "comparing shared objects ...\n";
mergeLibs();
- print "ABI compliance report drawing ...\n";
+ print "creating ABI compliance report ...\n";
create_HtmlReport();
if($HeaderCheckingMode_Separately)

View File

@ -0,0 +1,22 @@
Given the header files and shared objects corresponding to two different shared
library versions, and a simple description of each of the shared libraries in
XML format, abi-compliance-checker searches for the following kinds of binary
compatibility problems:
--Added/withdrawn interfaces (functions, global variables)
--Problems in Data Types:
--Classes: added/withdrawn virtual functions (changes in layout of
virtual table), virtual function positions, virtual function
redefinitions
--Structural data types: added/withdrawn members (changes in layout of
type structure),
changes in members, size changes
--Enumerations: member value changes
--Interface problems:
--Parameters and return type changes
--Static property changes
The checker then generates a report that assesses the risks of any potential
problems detected.
WWW: http://ispras.linux-foundation.org/index.php/ABI_compliance_checker