--- libgo/configure.orig 2015-09-17 12:46:06 UTC +++ libgo/configure @@ -681,6 +681,8 @@ LIBGO_IS_LINUX_FALSE 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 @@ -5326,7 +5328,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + netbsd* | bsdsunix* | 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` @@ -5676,7 +5678,7 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +bsdsunix* | freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -9369,7 +9371,7 @@ if test -z "$aix_libpath"; then aix_libp ;; # 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 @@ -10267,7 +10269,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +bsdsunix* | freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -10280,12 +10282,12 @@ freebsd* | dragonfly*) fi version_type=freebsd-$objformat case $version_type in - freebsd-elf*) + bsdsunix-elf*|freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; - freebsd-*) + bsdsunix-*|freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; @@ -12786,7 +12788,7 @@ if test -z "$aix_libpath"; then aix_libp ;; # 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 @@ -13519,6 +13521,7 @@ go_include="-include" is_darwin=no +is_bsdsunix=no is_freebsd=no is_irix=no is_linux=no @@ -13530,6 +13533,7 @@ is_solaris=no 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 ;; @@ -13547,6 +13551,14 @@ else 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='#' @@ -15663,6 +15675,10 @@ if test -z "${LIBGO_IS_DARWIN_TRUE}" && 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