Skip to content

Commit e5fd60b

Browse files
committed
Support creating shared libraries on MidnightBSD.
1 parent a1abed7 commit e5fd60b

File tree

6 files changed

+40
-26
lines changed

6 files changed

+40
-26
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2021-02-07 Bruno Haible <bruno@clisp.org>
2+
3+
Support creating shared libraries on MidnightBSD.
4+
Patch from <https://savannah.gnu.org/patch/?10007>.
5+
* m4/libtool.m4: Treat MidnightBSD like FreeBSD.
6+
* build-aux/ltmain.sh: Likewise.
7+
18
2021-01-31 Bruno Haible <bruno@clisp.org>
29

310
Update after gnulib changed on 2020-08-26.

build-aux/ltmain.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7021,7 +7021,7 @@ func_mode_link ()
70217021
# These systems don't actually have a C library (as such)
70227022
test X-lc = "X$arg" && continue
70237023
;;
7024-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7024+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
70257025
# Do not include libc due to us having libc/libc_r.
70267026
test X-lc = "X$arg" && continue
70277027
;;
@@ -7041,7 +7041,7 @@ func_mode_link ()
70417041
esac
70427042
elif test X-lc_r = "X$arg"; then
70437043
case $host in
7044-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7044+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
70457045
# Do not include libc_r directly, use -pthread flag.
70467046
continue
70477047
;;
@@ -8807,13 +8807,13 @@ func_mode_link ()
88078807
#
88088808
case $version_type in
88098809
# correct linux to gnu/linux during the next big refactor
8810-
darwin|freebsd-elf|linux|osf|windows|none)
8810+
darwin|freebsd-elf|midnightbsd-elf|linux|osf|windows|none)
88118811
func_arith $number_major + $number_minor
88128812
current=$func_arith_result
88138813
age=$number_minor
88148814
revision=$number_revision
88158815
;;
8816-
freebsd-aout|qnx|sunos)
8816+
freebsd-aout|midnightbsd-aout|qnx|sunos)
88178817
current=$number_major
88188818
revision=$number_minor
88198819
age=0
@@ -8893,12 +8893,12 @@ func_mode_link ()
88938893
esac
88948894
;;
88958895

8896-
freebsd-aout)
8896+
freebsd-aout | midnightbsd-aout)
88978897
major=.$current
88988898
versuffix=.$current.$revision
88998899
;;
89008900

8901-
freebsd-elf)
8901+
freebsd-elf | midnightbsd-elf | midnightbsd)
89028902
func_arith $current - $age
89038903
major=.$func_arith_result
89048904
versuffix=$major.$age.$revision
@@ -9124,7 +9124,7 @@ func_mode_link ()
91249124
*-*-netbsd*)
91259125
# Don't link with libc until the a.out ld.so is fixed.
91269126
;;
9127-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9127+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
91289128
# Do not include libc due to us having libc/libc_r.
91299129
;;
91309130
*-*-sco3.2v5* | *-*-sco5v6*)

libcharset/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2021-02-07 Bruno Haible <bruno@clisp.org>
2+
3+
Support creating shared libraries on MidnightBSD.
4+
Patch from <https://savannah.gnu.org/patch/?10007>.
5+
* m4/libtool.m4: Treat MidnightBSD like FreeBSD.
6+
* build-aux/ltmain.sh: Likewise.
7+
18
2021-01-31 Bruno Haible <bruno@clisp.org>
29

310
Switch to autoconf 2.71.

libcharset/build-aux/ltmain.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7019,7 +7019,7 @@ func_mode_link ()
70197019
# These systems don't actually have a C library (as such)
70207020
test X-lc = "X$arg" && continue
70217021
;;
7022-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7022+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
70237023
# Do not include libc due to us having libc/libc_r.
70247024
test X-lc = "X$arg" && continue
70257025
;;
@@ -7039,7 +7039,7 @@ func_mode_link ()
70397039
esac
70407040
elif test X-lc_r = "X$arg"; then
70417041
case $host in
7042-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
7042+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
70437043
# Do not include libc_r directly, use -pthread flag.
70447044
continue
70457045
;;
@@ -8805,13 +8805,13 @@ func_mode_link ()
88058805
#
88068806
case $version_type in
88078807
# correct linux to gnu/linux during the next big refactor
8808-
darwin|freebsd-elf|linux|osf|windows|none)
8808+
darwin|freebsd-elf|midnightbsd-elf|linux|osf|windows|none)
88098809
func_arith $number_major + $number_minor
88108810
current=$func_arith_result
88118811
age=$number_minor
88128812
revision=$number_revision
88138813
;;
8814-
freebsd-aout|qnx|sunos)
8814+
freebsd-aout|midnightbsd-aout|qnx|sunos)
88158815
current=$number_major
88168816
revision=$number_minor
88178817
age=0
@@ -8891,12 +8891,12 @@ func_mode_link ()
88918891
esac
88928892
;;
88938893

8894-
freebsd-aout)
8894+
freebsd-aout | midnightbsd-aout)
88958895
major=.$current
88968896
versuffix=.$current.$revision
88978897
;;
88988898

8899-
freebsd-elf)
8899+
freebsd-elf | midnightbsd-elf | midnightbsd)
89008900
func_arith $current - $age
89018901
major=.$func_arith_result
89028902
versuffix=$major.$age.$revision
@@ -9122,7 +9122,7 @@ func_mode_link ()
91229122
*-*-netbsd*)
91239123
# Don't link with libc until the a.out ld.so is fixed.
91249124
;;
9125-
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
9125+
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
91269126
# Do not include libc due to us having libc/libc_r.
91279127
;;
91289128
*-*-sco3.2v5* | *-*-sco5v6*)

libcharset/m4/libtool.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
17141714
lt_cv_sys_max_cmd_len=8192;
17151715
;;
17161716
1717-
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1717+
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
17181718
# This has been around since 386BSD, at least. Likely further.
17191719
if test -x /sbin/sysctl; then
17201720
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -2655,7 +2655,7 @@ dgux*)
26552655
shlibpath_var=LD_LIBRARY_PATH
26562656
;;
26572657
2658-
freebsd* | dragonfly*)
2658+
freebsd* | dragonfly* | midnightbsd*)
26592659
# DragonFly does not have aout. When/if they implement a new
26602660
# versioning mechanism, adjust this.
26612661
if test -x /usr/bin/objformat; then
@@ -3488,7 +3488,7 @@ darwin* | rhapsody*)
34883488
lt_cv_deplibs_check_method=pass_all
34893489
;;
34903490
3491-
freebsd* | dragonfly*)
3491+
freebsd* | dragonfly* | midnightbsd*)
34923492
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
34933493
case $host_cpu in
34943494
i*86 )
@@ -4317,7 +4317,7 @@ m4_if([$1], [CXX], [
43174317
;;
43184318
esac
43194319
;;
4320-
freebsd* | dragonfly*)
4320+
freebsd* | dragonfly* | midnightbsd*)
43214321
# FreeBSD uses GNU C++
43224322
;;
43234323
hpux9* | hpux10* | hpux11*)
@@ -5650,7 +5650,7 @@ _LT_EOF
56505650
;;
56515651
56525652
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5653-
freebsd* | dragonfly*)
5653+
freebsd* | dragonfly* | midnightbsd*)
56545654
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56555655
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56565656
_LT_TAGVAR(hardcode_direct, $1)=yes
@@ -6760,7 +6760,7 @@ if test yes != "$_lt_caught_CXX_error"; then
67606760
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67616761
;;
67626762
6763-
freebsd* | dragonfly*)
6763+
freebsd* | dragonfly* | midnightbsd*)
67646764
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67656765
# conventions
67666766
_LT_TAGVAR(ld_shlibs, $1)=yes

m4/libtool.m4

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
17141714
lt_cv_sys_max_cmd_len=8192;
17151715
;;
17161716
1717-
bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1717+
bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
17181718
# This has been around since 386BSD, at least. Likely further.
17191719
if test -x /sbin/sysctl; then
17201720
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -2655,7 +2655,7 @@ dgux*)
26552655
shlibpath_var=LD_LIBRARY_PATH
26562656
;;
26572657
2658-
freebsd* | dragonfly*)
2658+
freebsd* | dragonfly* | midnightbsd*)
26592659
# DragonFly does not have aout. When/if they implement a new
26602660
# versioning mechanism, adjust this.
26612661
if test -x /usr/bin/objformat; then
@@ -3488,7 +3488,7 @@ darwin* | rhapsody*)
34883488
lt_cv_deplibs_check_method=pass_all
34893489
;;
34903490
3491-
freebsd* | dragonfly*)
3491+
freebsd* | dragonfly* | midnightbsd*)
34923492
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
34933493
case $host_cpu in
34943494
i*86 )
@@ -4317,7 +4317,7 @@ m4_if([$1], [CXX], [
43174317
;;
43184318
esac
43194319
;;
4320-
freebsd* | dragonfly*)
4320+
freebsd* | dragonfly* | midnightbsd*)
43214321
# FreeBSD uses GNU C++
43224322
;;
43234323
hpux9* | hpux10* | hpux11*)
@@ -5650,7 +5650,7 @@ _LT_EOF
56505650
;;
56515651
56525652
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5653-
freebsd* | dragonfly*)
5653+
freebsd* | dragonfly* | midnightbsd*)
56545654
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
56555655
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
56565656
_LT_TAGVAR(hardcode_direct, $1)=yes
@@ -6760,7 +6760,7 @@ if test yes != "$_lt_caught_CXX_error"; then
67606760
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67616761
;;
67626762
6763-
freebsd* | dragonfly*)
6763+
freebsd* | dragonfly* | midnightbsd*)
67646764
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
67656765
# conventions
67666766
_LT_TAGVAR(ld_shlibs, $1)=yes

0 commit comments

Comments
 (0)