X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libjava%2Fconfigure;h=481210d380ae60631510378cf1e112dec8394e84;hb=4e6ad4226d5396500324f8635b116afa777ad6ec;hp=89d5b6c4a8dc3e8ad6ac0eede6fce9380288808f;hpb=f644b3d1af766044c4ff14a24d3266c948785dd1;p=gcc.git diff --git a/libjava/configure b/libjava/configure index 89d5b6c4a8d..481210d380a 100755 --- a/libjava/configure +++ b/libjava/configure @@ -674,6 +674,7 @@ GLIB_CFLAGS GTK_LIBS GTK_CFLAGS PKG_CONFIG +LDLIBICONV LTLIBICONV LIBICONV USING_GCC_FALSE @@ -707,6 +708,7 @@ GCDEPS GCINCS GCLIBS LIBGCJTESTSPEC +LIBMATHSPEC LIBSTDCXXSPEC extra_ldflags extra_ldflags_libjava @@ -752,6 +754,7 @@ GCJDEPMODE GCJFLAGS ac_ct_GCJ GCJ +lt_host_flags CXXCPP CPP OTOOL64 @@ -773,6 +776,7 @@ LIBLTDL INCLTDL host_exeext GCJH +GCC_FOR_ECJX GCJ_FOR_ECJX X_AWT_FALSE X_AWT_TRUE @@ -6703,7 +6707,8 @@ NATIVE=yes # Which gcj and host gcj (for ecjx) do we use? which_gcj=default host_exeext=${ac_exeext} -GCJ_FOR_ECJX= +GCJ_FOR_ECJX='$(GCJ)' +GCC_FOR_ECJX='$(CXX)' built_gcc_dir="`cd ${builddotdot}/../../${host_subdir}/gcc && ${PWDCMD-pwd}`" if test -n "${with_cross_host}"; then # We are being configured with a cross compiler. We can't @@ -6711,6 +6716,7 @@ if test -n "${with_cross_host}"; then NATIVE=no cross_host_exeext= GCJ_FOR_ECJX="${with_cross_host}-gcj" + GCC_FOR_ECJX="${with_cross_host}-gcc" case "${with_cross_host}" in *mingw* | *cygwin*) cross_host_exeext=.exe @@ -6779,6 +6785,7 @@ export JAVAC + # Create it, so that compile/link tests don't fail test -f libgcj.spec || touch libgcj.spec @@ -13349,7 +13356,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13352 "configure" +#line 13359 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13455,7 +13462,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13458 "configure" +#line 13465 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16721,6 +16728,28 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +case $host in + *-cygwin* | *-mingw*) + # 'host' will be top-level target in the case of a target lib, + # we must compare to with_cross_host to decide if this is a native + # or cross-compiler and select where to install dlls appropriately. + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"'; + else + lt_host_flags='-no-undefined -bindir "$(bindir)"'; + fi + ;; + *) + lt_host_flags= + ;; +esac + + + + if test -n "$ac_tool_prefix"; then for ac_prog in gcj do @@ -19434,7 +19463,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 19437 "configure" +#line 19466 "configure" struct S { ~S(); }; void bar(); void foo() @@ -20531,6 +20560,16 @@ arm*linux*eabi) ;; esac +LIBMATHSPEC= +# extra LD Flags which are required for targets +case "${host}" in +*-*-darwin*) + ;; +*) + LIBMATHSPEC=-lm + ;; +esac + # Check for --no-merge-exidx-entries, an ARM-specific linker option. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --no-merge-exidx-entries" >&5 $as_echo_n "checking for --no-merge-exidx-entries... " >&6; } @@ -20578,6 +20617,7 @@ fi + # Allow the GC to be disabled. Can be useful when debugging. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for garbage collector to use" >&5 $as_echo_n "checking for garbage collector to use... " >&6; } @@ -20712,6 +20752,23 @@ case "$THREADS" in THREADLIBS='-lpthread -lrt' THREADSPEC='-lpthread -lrt' ;; + *-*-solaris2.8) + # Always use alternate thread library on Solaris 8. Need libthread + # for TLS support. + # Need -Wl,-R to get it through libtool ... + THREADLIBS='-L/usr/lib/lwp$(MULTISUBDIR) -Wl,-R -Wl,/usr/lib/lwp$(MULTISUBDIR) -lpthread -lthread' + # ... while ld only accepts -R. + THREADSPEC='-L/usr/lib/lwp%{m64:/64} -R/usr/lib/lwp%{m64:/64} -lpthread -lthread' + ;; + *-*-solaris2.9) + # As on Solaris 8, need libthread for TLS support. + THREADLIBS='-lpthread -lthread' + THREADSPEC='-lpthread -lthread' + ;; + *-*-darwin*) + # Don't set THREADLIBS or THREADSPEC as Darwin already + # provides pthread via libSystem. + ;; *) THREADLIBS=-lpthread THREADSPEC=-lpthread @@ -21937,6 +21994,8 @@ $as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi fi + LDLIBICONV=`echo " $LIBICONV " | sed "s/${acl_cv_wl--Wl,}/ /g; s/,/ /g"` + for ac_func in gethostbyname_r do : @@ -23085,10 +23144,11 @@ fi if test "$GC" = boehm; then case "${host}" in mips-sgi-irix6*) - # IRIX 6 lacks a N64 libdl.so, but only the N32 (default multilib) - # libgcj.spec is used, so override here - SYSTEMSPEC="$SYSTEMSPEC %{!mabi=64:-ldl}" - ;; + # While IRIX 6 has libdl for the O32 and N32 ABIs, the N64 one is + # missing. It's unnecessary anyway since dlopen lives in libc. + ;; + *-*-darwin*) + ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5 $as_echo_n "checking for main in -ldl... " >&6; } @@ -23127,7 +23187,7 @@ if test "x$ac_cv_lib_dl_main" = x""yes; then : SYSTEMSPEC="$SYSTEMSPEC -ldl" fi - ;; + ;; esac fi fi