--- boehm-gc/configure.orig 2015-12-04 10:47:53 UTC +++ boehm-gc/configure @@ -5575,7 +5575,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` @@ -5925,13 +5925,13 @@ 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 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_deplibs_check_method='file_magic (BSDSUniX|FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; @@ -6770,7 +6770,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +x86_64-*kbsdsunix*-gnu|x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -6782,6 +6782,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kbsdsunix*-gnu) + LD="${LD-ld} -m elf_i386_bsdsux" + ;; x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; @@ -6811,6 +6814,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* ;; *64-bit*) case $host in + x86_64-*kbsdsunix*-gnu) + LD="${LD-ld} -m elf_x86_64_bsdsux" + ;; x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; @@ -8886,7 +8892,7 @@ $as_echo_n "checking whether the $compil hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no - link_all_deplibs=unknown + link_all_deplibs=no module_cmds= module_expsym_cmds= old_archive_from_new_cmds= @@ -9152,7 +9158,7 @@ _LT_EOF wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' fi ;; @@ -9171,7 +9177,7 @@ _LT_EOF _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' else ld_shlibs=no fi @@ -9200,7 +9206,7 @@ _LT_EOF if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' else ld_shlibs=no fi @@ -9218,7 +9224,7 @@ _LT_EOF *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' else ld_shlibs=no fi @@ -9540,7 +9546,14 @@ 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 + hardcode_shlibpath_var=no + ;; + + bsdsunix*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -9731,7 +9744,7 @@ rm -f core conftest.err conftest.$ac_obj hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + archive_expsym_cmds='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-version-script,$lib-ver' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else @@ -10441,7 +10454,26 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +bsdsunix*) + objformat=elf + version_type=bsdsunix-$objformat + case $version_type in + bsdsunix-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + bsdsunix-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + + 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 @@ -10452,14 +10484,14 @@ freebsd* | dragonfly*) *) objformat=elf ;; esac fi - version_type=freebsd-$objformat + case $host_os in bsdsunix*) version_type=bsdsunix-$objformat ;; *) version_type=freebsd-$objformat ;; esac case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + bsdsunix-elf*|freebsd-elf*) + 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 ;; - freebsd-*) + bsdsunix-*|freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; @@ -10823,7 +10855,7 @@ sysv4*MP*) ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=bsdsunix-elf|freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' @@ -11555,7 +11587,7 @@ striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -11804,7 +11836,7 @@ hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= -link_all_deplibs_CXX=unknown +link_all_deplibs_CXX=no old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds @@ -12020,8 +12052,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -12362,11 +12393,19 @@ if test -z "$aix_libpath"; then aix_libp ld_shlibs_CXX=no ;; - freebsd-elf*) + bsdsunix-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd* | dragonfly*) + bsdsunix*) + ld_shlibs_CXX=yes + ;; + + bsdsunix-elf*|freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + + bsdsunix* | freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -12572,7 +12611,7 @@ if test -z "$aix_libpath"; then aix_libp case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= @@ -12580,7 +12619,7 @@ if test -z "$aix_libpath"; then aix_libp ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script $wl$lib-ver -o $lib' ;; esac archive_cmds_need_lc_CXX=no @@ -12612,7 +12651,7 @@ if test -z "$aix_libpath"; then aix_libp ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-version-script ${wl}$lib-ver -o $lib' ;; esac @@ -12623,7 +12662,7 @@ if test -z "$aix_libpath"; then aix_libp cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-version-script $wl$lib-ver' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -12657,7 +12696,7 @@ if test -z "$aix_libpath"; then aix_libp # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-version-script ${wl}$lib-ver' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes @@ -12730,7 +12769,7 @@ if test -z "$aix_libpath"; then aix_libp archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + archive_expsym_cmds_CXX='echo "{ global:" > $lib-ver~ sed -e "s|$|;|" < $export_symbols >> $lib-ver~ echo "local: *; };" >> $lib-ver~$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-version-script,$lib-ver -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi @@ -13331,7 +13370,7 @@ $as_echo_n "checking for $compiler optio ;; esac ;; - freebsd* | dragonfly*) + bsdusnix* | freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -14125,7 +14164,26 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly*) +bsdsunix*) + objformat=elf + version_type=bsdsunix-$objformat + case $version_type in + bsdsunix-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + bsdsunix-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + + 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 @@ -14136,14 +14194,14 @@ freebsd* | dragonfly*) *) objformat=elf ;; esac fi - version_type=freebsd-$objformat + case $host_os in bsdsunix*) version_type=bsdsunix-$objformat ;; *) version_type=freebsd-$objformat ;; esac case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + bsdsunix-elf*|freebsd-elf*) + 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 ;; - freebsd-*) + bsdsunix-*|freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; @@ -14507,7 +14565,7 @@ sysv4*MP*) ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=bsdsunix-elf|freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' @@ -14785,6 +14843,23 @@ $as_echo "#define _REENTRANT 1" >>confde { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&5 $as_echo "$as_me: WARNING: \"Only HP-UX 11 POSIX threads are supported.\"" >&2;} ;; + *-*-kbsdsunix*-gnu) + $as_echo "#define GC_BSDSUNIX_THREADS 1" >>confdefs.h + + THREADCFLAGS=-pthread + THREADLIBS=-pthread + $as_echo "#define _REENTRANT 1" >>confdefs.h + + if test "${enable_parallel_mark}" = yes; then + $as_echo "#define PARALLEL_MARK 1" >>confdefs.h + + fi + $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h + + +$as_echo "#define USE_COMPILER_TLS 1" >>confdefs.h + + ;; *-*-kfreebsd*-gnu) $as_echo "#define GC_FREEBSD_THREADS 1" >>confdefs.h @@ -14811,6 +14886,11 @@ $as_echo "#define GC_GNU_THREADS 1" >>co $as_echo "#define THREAD_LOCAL_ALLOC 1" >>confdefs.h ;; + *-*-bsdsunix*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"BSDSUniX does not yet fully support threads with Boehm GC.\"" >&5 +$as_echo "$as_me: WARNING: \"BSDSUniX does not yet fully support threads with Boehm GC.\"" >&2;} + ;; + *-*-freebsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&5 $as_echo "$as_me: WARNING: \"FreeBSD does not yet fully support threads with Boehm GC.\"" >&2;}