diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-02-02 13:29:31 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-02-02 13:29:31 +0100 |
commit | 47742ccdded540d6e157ce49f89ec4148cd27154 (patch) | |
tree | 1a629cc62a7b629f1442691db1f2ab7af5223c58 /libjava | |
parent | 8aaf4681da0697653119fb541aef303da5b0aaaf (diff) | |
download | gcc-47742ccdded540d6e157ce49f89ec4148cd27154.zip gcc-47742ccdded540d6e157ce49f89ec4148cd27154.tar.gz gcc-47742ccdded540d6e157ce49f89ec4148cd27154.tar.bz2 |
configure.ac (libjava_cv_anon_version_script): New test.
* configure.ac (libjava_cv_anon_version_script): New test.
(ANONVERSCRIPT): New AM_CONDITIONAL.
* configure: Rebuilt.
* Makefile.am (extra_ldflags_libjava): Link with -Wl,--version-script
if ANONVERSCRIPT.
* Makefile.in: Rebuilt.
(libgcj_la_DEPENDENCIES): Depend on libgcj.ver.
* libgcj.ver: New file.
From-SVN: r121499
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 11 | ||||
-rw-r--r-- | libjava/Makefile.am | 7 | ||||
-rw-r--r-- | libjava/Makefile.in | 51 | ||||
-rwxr-xr-x | libjava/configure | 89 | ||||
-rw-r--r-- | libjava/configure.ac | 13 | ||||
-rw-r--r-- | libjava/libgcj.ver | 7 |
6 files changed, 151 insertions, 27 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 23d2a52..cf997ac 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,14 @@ +2007-02-02 Jakub Jelinek <jakub@redhat.com> + + * configure.ac (libjava_cv_anon_version_script): New test. + (ANONVERSCRIPT): New AM_CONDITIONAL. + * configure: Rebuilt. + * Makefile.am (extra_ldflags_libjava): Link with -Wl,--version-script + if ANONVERSCRIPT. + * Makefile.in: Rebuilt. + (libgcj_la_DEPENDENCIES): Depend on libgcj.ver. + * libgcj.ver: New file. + 2007-02-01 David Daney <ddaney@avtrex.com> * scripts/makemake.tcl: Replace gnu/xml build with build of all diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 0b653a8..0e7d91a 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -101,6 +101,10 @@ GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated extra_ldflags_libjava = @extra_ldflags_libjava@ +if ANONVERSCRIPT +extra_ldflags_libjava += -Wl,--version-script=$(srcdir)/libgcj.ver +endif + GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \ $(LDFLAGS) -o $@ GCJ_FOR_ECJX = @GCJ_FOR_ECJX@ @@ -246,6 +250,9 @@ libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \ java/process-$(PLATFORM).lo \ $(all_packages_source_files:.list=.lo) \ $(LIBLTDL) $(libgcj_la_LIBADD) +if ANONVERSCRIPT +libgcj_la_DEPENDENCIES += $(srcdir)/libgcj.ver +endif libgcj_la_LINK = $(LIBLINK) ## A hack to make sure the various gcj-related macros, like diff --git a/libjava/Makefile.in b/libjava/Makefile.in index d655387..59b85a9 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -53,15 +53,17 @@ target_triplet = @target@ @NATIVE_TRUE@ grmid$(EXEEXT) gserialver$(EXEEXT) \ @NATIVE_TRUE@ gtnameserv$(EXEEXT) @BUILD_ECJ1_TRUE@libexecsub_PROGRAMS = ecjx$(EXEEXT) -@USING_GCC_TRUE@am__append_5 = $(WARNINGS) -@USING_BOEHMGC_TRUE@am__append_6 = boehm.cc -@USING_NOGC_TRUE@am__append_7 = nogc.cc -@USING_POSIX_PLATFORM_TRUE@am__append_8 = posix.cc -@USING_WIN32_PLATFORM_TRUE@am__append_9 = win32.cc -@USING_DARWIN_CRT_TRUE@am__append_10 = darwin.cc -@USING_POSIX_THREADS_TRUE@am__append_11 = posix-threads.cc -@USING_WIN32_THREADS_TRUE@am__append_12 = win32-threads.cc -@USING_NO_THREADS_TRUE@am__append_13 = no-threads.cc +@ANONVERSCRIPT_TRUE@am__append_5 = -Wl,--version-script=$(srcdir)/libgcj.ver +@USING_GCC_TRUE@am__append_6 = $(WARNINGS) +@USING_BOEHMGC_TRUE@am__append_7 = boehm.cc +@USING_NOGC_TRUE@am__append_8 = nogc.cc +@USING_POSIX_PLATFORM_TRUE@am__append_9 = posix.cc +@USING_WIN32_PLATFORM_TRUE@am__append_10 = win32.cc +@USING_DARWIN_CRT_TRUE@am__append_11 = darwin.cc +@USING_POSIX_THREADS_TRUE@am__append_12 = posix-threads.cc +@USING_WIN32_THREADS_TRUE@am__append_13 = win32-threads.cc +@USING_NO_THREADS_TRUE@am__append_14 = no-threads.cc +@ANONVERSCRIPT_TRUE@am__append_15 = $(srcdir)/libgcj.ver DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \ $(srcdir)/../config.guess $(srcdir)/../config.sub \ $(srcdir)/../depcomp $(srcdir)/../install-sh \ @@ -73,8 +75,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \ $(top_srcdir)/scripts/jar.in COPYING ChangeLog NEWS THANKS @MAINTAINER_MODE_TRUE@@NATIVE_TRUE@noinst_PROGRAMS = \ @MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gen-from-JIS$(EXEEXT) -@NATIVE_TRUE@@USE_LIBGCJ_BC_TRUE@am__append_14 = libgcj_bc.la -@XLIB_AWT_TRUE@am__append_15 = $(xlib_nat_headers) +@NATIVE_TRUE@@USE_LIBGCJ_BC_TRUE@am__append_16 = libgcj_bc.la +@XLIB_AWT_TRUE@am__append_17 = $(xlib_nat_headers) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ @@ -545,6 +547,8 @@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANONVERSCRIPT_FALSE = @ANONVERSCRIPT_FALSE@ +ANONVERSCRIPT_TRUE = @ANONVERSCRIPT_TRUE@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ @@ -738,7 +742,7 @@ build_vendor = @build_vendor@ datadir = @datadir@ dbexecdir = @dbexecdir@ exec_prefix = @exec_prefix@ -extra_ldflags_libjava = @extra_ldflags_libjava@ +extra_ldflags_libjava = @extra_ldflags_libjava@ $(am__append_5) gxx_include_dir = @gxx_include_dir@ here = @here@ host = @host@ @@ -849,7 +853,7 @@ AM_GCJFLAGS = \ --encoding=UTF-8 \ -Wno-deprecated -fbootstrap-classes -AM_CFLAGS = @LIBGCJ_CFLAGS@ $(am__append_5) +AM_CFLAGS = @LIBGCJ_CFLAGS@ $(am__append_6) PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long JCFLAGS = -g JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS) @@ -870,9 +874,9 @@ libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \ libgcj_la_SOURCES = prims.cc jni.cc jvmti.cc exception.cc \ stacktrace.cc link.cc defineclass.cc interpret.cc verify.cc \ - $(nat_source_files) $(am__append_6) $(am__append_7) \ - $(am__append_8) $(am__append_9) $(am__append_10) \ - $(am__append_11) $(am__append_12) $(am__append_13) + $(nat_source_files) $(am__append_7) $(am__append_8) \ + $(am__append_9) $(am__append_10) $(am__append_11) \ + $(am__append_12) $(am__append_13) $(am__append_14) nat_files = $(nat_source_files:.cc=.lo) xlib_nat_files = $(xlib_nat_source_files:.cc=.lo) @@ -893,13 +897,10 @@ libgcj_la_LIBADD = \ $(propertyo_files) \ $(LIBFFI) $(ZLIBS) $(GCLIBS) -libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \ - java/lang/Object.lo \ - java/lang/Class.lo \ - java/process-$(PLATFORM).lo \ - $(all_packages_source_files:.list=.lo) \ - $(LIBLTDL) $(libgcj_la_LIBADD) - +libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar java/lang/Object.lo \ + java/lang/Class.lo java/process-$(PLATFORM).lo \ + $(all_packages_source_files:.list=.lo) $(LIBLTDL) \ + $(libgcj_la_LIBADD) $(am__append_15) libgcj_la_LINK = $(LIBLINK) EXTRA_libgcj_la_SOURCES = java/lang/Object.java libgcj_tools_la_SOURCES = classpath/tools/tools.zip @@ -7836,7 +7837,7 @@ ECJX_BASE_FLAGS = -findirect-dispatch \ @NATIVE_TRUE@ecjx_LDADD = -L$(here)/.libs libgcj.la @NATIVE_FALSE@ecjx_DEPENDENCIES = @NATIVE_TRUE@ecjx_DEPENDENCIES = libgcj.la libgcj.spec \ -@NATIVE_TRUE@ $(am__append_14) +@NATIVE_TRUE@ $(am__append_16) gappletviewer_SOURCES = gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) @@ -8027,7 +8028,7 @@ gnu/gcj/xlib/natXImage.cc \ gnu/gcj/xlib/natXUnmapEvent.cc sourcesdir = $(jardir) -headers_to_make = $(nat_headers) $(am__append_15) +headers_to_make = $(nat_headers) $(am__append_17) # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and diff --git a/libjava/configure b/libjava/configure index 31c43db..c879e57 100755 --- a/libjava/configure +++ b/libjava/configure @@ -310,7 +310,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -7868,7 +7868,7 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lXt $LIBS" + LIBS="-lX11 $LIBS" if test x$gcc_no_link = xyes; then { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} @@ -17054,6 +17054,82 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +# See if linker supports anonymous version scripts. +echo "$as_me:$LINENO: checking whether ld supports anonymous version scripts" >&5 +echo $ECHO_N "checking whether ld supports anonymous version scripts... $ECHO_C" >&6 +if test "${libjava_cv_anon_version_script+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS" + libjava_cv_anon_version_script=no + CFLAGS="$CFLAGS -fPIC"; LDFLAGS="$LDFLAGS -shared -Wl,--version-script,conftest.map" + echo '{ global: globalsymb*; local: *; };' > conftest.map + if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +void globalsymbol (void) {} void localsymbol (void) {} +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + libjava_cv_anon_version_script=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $libjava_cv_anon_version_script" >&5 +echo "${ECHO_T}$libjava_cv_anon_version_script" >&6 + + +if test "$libjava_cv_anon_version_script" = yes; then + ANONVERSCRIPT_TRUE= + ANONVERSCRIPT_FALSE='#' +else + ANONVERSCRIPT_TRUE='#' + ANONVERSCRIPT_FALSE= +fi + + # Check if linker supports static linking on a per library basis LD_START_STATIC_SPEC= LD_FINISH_STATIC_SPEC= @@ -17347,6 +17423,13 @@ echo "$as_me: error: conditional \"NEEDS_DATA_START\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${ANONVERSCRIPT_TRUE}" && test -z "${ANONVERSCRIPT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"ANONVERSCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"ANONVERSCRIPT\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -18134,6 +18217,8 @@ s,@libstdcxx_incdir@,$libstdcxx_incdir,;t t s,@ALLOCA@,$ALLOCA,;t t s,@PERL@,$PERL,;t t s,@SYSDEP_SOURCES@,$SYSDEP_SOURCES,;t t +s,@ANONVERSCRIPT_TRUE@,$ANONVERSCRIPT_TRUE,;t t +s,@ANONVERSCRIPT_FALSE@,$ANONVERSCRIPT_FALSE,;t t s,@LD_START_STATIC_SPEC@,$LD_START_STATIC_SPEC,;t t s,@LD_FINISH_STATIC_SPEC@,$LD_FINISH_STATIC_SPEC,;t t s,@here@,$here,;t t diff --git a/libjava/configure.ac b/libjava/configure.ac index ab637d4..95d8cef 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1553,6 +1553,19 @@ GCC_CHECK_TLS # For _Unwind_GetIPInfo. GCC_CHECK_UNWIND_GETIPINFO +# See if linker supports anonymous version scripts. +AC_CACHE_CHECK([whether ld supports anonymous version scripts], + [libjava_cv_anon_version_script], + [save_CFLAGS="$CFLAGS"; save_LDFLAGS="$LDFLAGS" + libjava_cv_anon_version_script=no + CFLAGS="$CFLAGS -fPIC"; LDFLAGS="$LDFLAGS -shared -Wl,--version-script,conftest.map" + echo '{ global: globalsymb*; local: *; };' > conftest.map + AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},, + [libjava_cv_anon_version_script=yes], []) + CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS" + ]) +AM_CONDITIONAL(ANONVERSCRIPT, test "$libjava_cv_anon_version_script" = yes) + # Check if linker supports static linking on a per library basis LD_START_STATIC_SPEC= LD_FINISH_STATIC_SPEC= diff --git a/libjava/libgcj.ver b/libjava/libgcj.ver new file mode 100644 index 0000000..344600c --- /dev/null +++ b/libjava/libgcj.ver @@ -0,0 +1,7 @@ +# Anonymous GNU ld version script to hide boehm-gc, libffi and fdlibm +# symbols in libgcj.so. + +{ + global: Jv*; _Jv_*; __gcj_personality_v0; _Z*; + local: *; +}; |