--- libgo/configure.orig 2020-03-04 19:30:03.000000000 +1100 +++ libgo/configure 2020-09-07 23:41:50.601232000 +1000 @@ -654,6 +654,8 @@ LIBGO_IS_LINUX_TRUE LIBGO_IS_IRIX_FALSE LIBGO_IS_IRIX_TRUE +LIBGO_IS_BSDSUNIX_FALSE +LIBGO_IS_BSDSUNIX_TRUE LIBGO_IS_FREEBSD_FALSE LIBGO_IS_FREEBSD_TRUE LIBGO_IS_DARWIN_FALSE @@ -5306,7 +5308,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bsdsunix* | netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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` @@ -5656,6 +5658,20 @@ lt_cv_deplibs_check_method=pass_all ;; +bsdsunix*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + lt_cv_deplibs_check_method='file_magic (BSDSUniX)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in @@ -9349,7 +9365,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -10247,6 +10263,17 @@ shlibpath_var=LD_LIBRARY_PATH ;; +bsdsunix*) + objformat=elf + version_type=bsdsunix-$objformat + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + need_version=no need_lib_prefix=no + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -12766,7 +12793,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) archive_cmds_GO='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GO='-R$libdir' hardcode_direct_GO=yes @@ -13509,9 +13536,10 @@ # All known GOOS values. This is the union of all operating systems # supported by the gofrontend and all operating systems supported by # the gc toolchain. -ALLGOOS="aix android darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows" +ALLGOOS="aix android bsdsunix darwin dragonfly freebsd irix linux netbsd openbsd plan9 rtems solaris windows" is_darwin=no +is_bsdsunix=no is_freebsd=no is_irix=no is_linux=no @@ -13524,6 +13552,7 @@ GOOS=unknown case ${host} in *-*-darwin*) is_darwin=yes; GOOS=darwin ;; + *-*-bsdsunix*) is_bsdsunix=yes; GOOS=bsdsunix ;; *-*-freebsd*) is_freebsd=yes; GOOS=freebsd ;; *-*-irix6*) is_irix=yes; GOOS=irix ;; *-*-linux*) is_linux=yes; GOOS=linux ;; @@ -13542,6 +13571,14 @@ LIBGO_IS_DARWIN_FALSE= fi + if test $is_bsdsunix = yes; then + LIBGO_IS_BSDSUNIX_TRUE= + LIBGO_IS_BSDSUNIX_FALSE='#' +else + LIBGO_IS_BSDSUNIX_TRUE='#' + LIBGO_IS_BSDSUNIX_FALSE= +fi + if test $is_freebsd = yes; then LIBGO_IS_FREEBSD_TRUE= LIBGO_IS_FREEBSD_FALSE='#' @@ -13614,7 +13651,7 @@ LIBGO_IS_AIX_FALSE= fi - if test $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes; then + if test $is_bsdsunix = yes -o $is_darwin = yes -o $is_dragonfly = yes -o $is_freebsd = yes -o $is_netbsd = yes -o $is_openbsd = yes; then LIBGO_IS_BSD_TRUE= LIBGO_IS_BSD_FALSE='#' else @@ -15648,6 +15685,10 @@ as_fn_error "conditional \"LIBGO_IS_DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${LIBGO_IS_BSDSUNIX_TRUE}" && test -z "${LIBGO_IS_BSDSUNIX_FALSE}"; then + as_fn_error "conditional \"LIBGO_IS_BSDSUNIX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${LIBGO_IS_FREEBSD_TRUE}" && test -z "${LIBGO_IS_FREEBSD_FALSE}"; then as_fn_error "conditional \"LIBGO_IS_FREEBSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5