diff options
author | Bruno Haible <bruno@clisp.org> | 2021-02-08 00:06:35 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-02-08 00:06:35 +0100 |
commit | ca3fd081e6bb85086326b25e969266a0a9b4ddee (patch) | |
tree | bed74905b941eb08189dec6d8e90e0d77b1b3a77 | |
parent | fe18a87822426a66d75ac731bf81673f800a7afb (diff) | |
download | libunistring-ca3fd081e6bb85086326b25e969266a0a9b4ddee.tar.gz |
Support creating shared libraries on MidnightBSD.
Patch from <https://savannah.gnu.org/patch/?10007>.
* m4/libtool.m4: Treat MidnightBSD like FreeBSD.
* build-aux/ltmain.sh: Likewise.
-rw-r--r-- | build-aux/ltmain.sh | 14 | ||||
-rw-r--r-- | m4/libtool.m4 | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 0f0a2da..5b875b7 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -7019,7 +7019,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7039,7 +7039,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -8805,13 +8805,13 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|midnightbsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; - freebsd-aout|qnx|sunos) + freebsd-aout|midnightbsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 @@ -8891,12 +8891,12 @@ func_mode_link () esac ;; - freebsd-aout) + freebsd-aout | midnightbsd-aout) major=.$current versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf | midnightbsd) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9122,7 +9122,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index d4e1427..3c2108f 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1714,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -2655,7 +2655,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3488,7 +3488,7 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -4320,7 +4320,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -5653,7 +5653,7 @@ _LT_EOF ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -6763,7 +6763,7 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes |