Skip to content

Commit 6c7a442

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

File tree

7 files changed

+25
-2
lines changed

7 files changed

+25
-2
lines changed

README

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ library. They are also documented in the pcre2build man page.
169169
versions of all the relevant libraries are available for linking. See also
170170
"Shared libraries" below.
171171

172+
Shared libraries are compiled with symbol versioning enabled on platforms that
173+
support this, but this can be disabled by adding --disable-symvers.
174+
172175
. By default, only the 8-bit library is built. If you add --enable-pcre2-16 to
173176
the "configure" command, the 16-bit library is also built. If you add
174177
--enable-pcre2-32 to the "configure" command, the 32-bit library is also

maint/RunSymbolTest

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ fi
3737
supports_versions=1
3838
if [ "`uname -s`" = "Darwin" ]; then
3939
supports_versions=0
40+
elif [ "`uname -s`" = "FreeBSD" ]; then
41+
# Highly annoyingly, FreeBSD's nm doesn't show symbol versions, so we just
42+
# skip checking it.
43+
supports_versions=0
44+
elif [ "`uname -s`" = "SunOS" ]; then
45+
# Similarly for Solaris.
46+
supports_versions=0
4047
fi
4148

4249
so_ext=so

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)