--- libjava/configure.orig 2015-12-04 10:47:53 UTC +++ libjava/configure @@ -6205,16 +6205,16 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd*) +bsdsunix* | freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 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 ;; @@ -7647,7 +7647,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` @@ -7997,7 +7997,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 ) @@ -11610,7 +11610,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 @@ -12511,7 +12511,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 @@ -12524,12 +12524,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 ;; @@ -14436,7 +14436,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_need_lc_CXX=no ;; - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -15401,7 +15401,7 @@ $as_echo_n "checking for $compiler optio ;; esac ;; - freebsd* | dragonfly*) + bsdsunix* | freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -16195,7 +16195,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 @@ -16208,12 +16208,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 ;; @@ -18572,7 +18572,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_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes @@ -20760,6 +20760,10 @@ case "$THREADS" in # support for weak references to pthread_* functions ala gthr.h API. THREADSPEC='%{!pthread: %{!shared: %eUnder this configuration, the user must provide -pthread when linking.}}' ;; + *-*-bsdsunix*) + THREADLDFLAGS=-pthread + THREADSPEC=-lpthread + ;; *-*-freebsd*) # FreeBSD >=5.3 implements a model much closer to other modern UNIX # systems which support threads and -lpthread. @@ -24442,6 +24446,9 @@ case "${host}" in powerpc*-*-aix*) SIGNAL_HANDLER=include/aix-signal.h ;; + i?86-*-bsdsunix* | x86_64-*-bsdsunix*) + SIGNAL_HANDLER=include/bsdsunix-signal.h + ;; i?86-*-freebsd* | x86_64-*-freebsd*) SIGNAL_HANDLER=include/freebsd-signal.h ;;