Skip to content

Commit ea3da44

Browse files
committed
Some attempts to get FreeBSD and Solaris build working
1 parent 9fde3d3 commit ea3da44

File tree

6 files changed

+26
-2
lines changed

6 files changed

+26
-2
lines changed

maint/RunSymbolTest

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ elif [ "`uname -s`" = "SunOS" ]; then
3232
nm="nm -p -h -D -g"
3333
elif [ "`uname -s`" = "Darwin" ]; then
3434
nm="nm -B -g"
35+
elif [ "`uname -s`" = "FreeBSD" ]; then
36+
# Highly annoyingly, FreeBSD's nm doesn't show symbol versions, so we roll
37+
# our own using readelf.
38+
nm="readelf -D --version-info"
3539
fi
3640

3741
supports_versions=1
@@ -54,6 +58,13 @@ for so_name in "libpcre2-8" "libpcre2-16" "libpcre2-32" "libpcre2-posix"; do
5458
so_file="$input_dir/$so_name.$so_ext"
5559
base=`basename $expected_file`
5660

61+
# XXX
62+
if [ "`uname -s`" = "FreeBSD" ]; then
63+
echo "==XXX=="
64+
$nm "$so_file"
65+
echo "==XXX=="
66+
fi
67+
5768
$nm "$so_file" | \
5869
$sed -E -e 's/^[0-9a-fA-F]* *//g' | \
5970
$grep -E -v '^[Uw] ' | \

maint/RunSymbolTest.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ foreach ($dllName in $dllNames) {
3737
$actualOutput = ($actualSymbols -join "`n") + "`n"
3838
$null = New-Item -Force $base -Value $actualOutput
3939

40-
$expectedOutput = Get-Content -Path $expectedFile -Raw
41-
$actualOutput = Get-Content -Path $base -Raw
40+
$expectedSymbols = (Get-Content -Path $expectedFile -Raw).TrimEnd("`n") |
41+
ForEach-Object { $_ -replace '@@.*', '' }
42+
$expectedOutput = ($expectedSymbols -join "`n") + "`n"
4243

4344
if ($expectedOutput -ne $actualOutput) {
4445
Write-Host "Shared object contents for $dllFile differ from expected"

src/libpcre2-16.sym

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ PCRE2_10.46 {
7979
pcre2_substring_list_get_16;
8080
pcre2_substring_nametable_scan_16;
8181
pcre2_substring_number_from_name_16;
82+
local:
83+
_fini;
84+
_init;
8285
};
8386

8487
# PCRE2_10.47 {} PCRE2_10.46;

src/libpcre2-32.sym

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ PCRE2_10.46 {
7979
pcre2_substring_list_get_32;
8080
pcre2_substring_nametable_scan_32;
8181
pcre2_substring_number_from_name_32;
82+
local:
83+
_fini;
84+
_init;
8285
};
8386

8487
# PCRE2_10.47 {} PCRE2_10.46;

src/libpcre2-8.sym

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ PCRE2_10.46 {
7979
pcre2_substring_list_get_8;
8080
pcre2_substring_nametable_scan_8;
8181
pcre2_substring_number_from_name_8;
82+
local:
83+
_fini;
84+
_init;
8285
};
8386

8487
# PCRE2_10.47 {} PCRE2_10.46;

src/libpcre2-posix.sym

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ PCRE2_10.46 {
55
pcre2_regerror;
66
pcre2_regexec;
77
pcre2_regfree;
8+
local:
9+
_fini;
10+
_init;
811
};
912

1013
# PCRE2_10.47 {} PCRE2_10.46;

0 commit comments

Comments
 (0)