summaryrefslogtreecommitdiffstats
path: root/libjava/configure.ac
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 17:22:52 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 17:22:52 +0000
commitf8725d56513b248109bccad632fd7d2954b1bced (patch)
tree33fb639d327468fa17d35f0500155d56bc25a8a4 /libjava/configure.ac
parent71cbce26c5ccce4738f8b1f3d403b5162e43a2d4 (diff)
downloadppe42-gcc-f8725d56513b248109bccad632fd7d2954b1bced.tar.gz
ppe42-gcc-f8725d56513b248109bccad632fd7d2954b1bced.zip
* configure.ac (ANONVERSCRIPT): Handle sun style.
Define ANONVERSCRIPT_GNU, ANONVERSCRIPT_SUN automake conditionals. * configure: Regenerate. * Makefile.am [ANONVERSCRIPT]: Protect GNU section with ANONVERSCRIPT_GNU. Introduce per-library $(lib)_la_version_arg, $(lib)_la_version_dep variables. [ANONVERSCRIPT_GNU] (version_arg): Default ld arg for version map. (version_dep): Likewise for dependency. Use them to set the per-library variables. [!ANONVERSCRIPT]: Provide them vor the unversioned case. [ANONVERSCRIPT_SUN]: Handle Sun symbol versioning. (libgcj_la_DEPENDENCIES): Unconditionally use $(libgcj_la_version_dep). (libgcj_la_LINK): Add $(libgcj_la_version_arg). (libgcj_noncore_la_DEPENDENCIES): Unconditionally use $(libgcj_la_version_dep). (libgcj_tools_la_LIBADD): Move -lm ... (libgcj_tools_la_LDFLAGS): ... here. (libgcj_tools_la_DEPENDENCIES): Add $(libgcj_tools_la_version_dep). (libgcj_tools_la_LINK): Add $(libgcj_tools_la_version_arg). (lib_gnu_awt_xlib_la_DEPENDENCIES): Add $(lib_gnu_awt_xlib_la_version_dep). (lib_gnu_awt_xlib_la_LINK): Add $(lib_gnu_awt_xlib_la_version_arg). (libgcj_bc_la_DEPENDENCIES): Add $(libgcj_bc_la_version_dep). (libgcj_bc_la_LINK): $(libgcj_bc_la_version_arg). [ANONVERSCRIPT && ANONVERSCRIPT_SUN] (%.ver-sun): New pattern rule. * Makefile.in: Regenerate. * libgcj.ver: Reformat. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/configure.ac')
-rw-r--r--libjava/configure.ac21
1 files changed, 18 insertions, 3 deletions
diff --git a/libjava/configure.ac b/libjava/configure.ac
index f21ae91d18a..7155a5bd314 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1767,13 +1767,28 @@ 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"
+ 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], [])
+ [libjava_cv_anon_version_script=gnu], [])
+ if test x$libjava_cv_anon_version_script = xno; then
+ case "$target_os" in
+ solaris2*)
+ LDFLAGS="$save_LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared -Wl,-M,conftest.map"
+ # Sun ld doesn't understand wildcards here.
+ echo '{ global: globalsymbol; local: *; };' > conftest.map
+ AC_TRY_LINK(void globalsymbol (void) {} void localsymbol (void) {},,
+ [libjava_cv_anon_version_script=sun], [])
+ ;;
+ esac
+ fi
CFLAGS="$save_CFLAGS"; LDFLAGS="$save_LDFLAGS"
])
-AM_CONDITIONAL(ANONVERSCRIPT, test "$libjava_cv_anon_version_script" = yes)
+AM_CONDITIONAL(ANONVERSCRIPT, test "$libjava_cv_anon_version_script" != no)
+AM_CONDITIONAL(ANONVERSCRIPT_GNU, test "$libjava_cv_anon_version_script" = gnu)
+AM_CONDITIONAL(ANONVERSCRIPT_SUN, test "$libjava_cv_anon_version_script" = sun)
# Check if linker supports static linking on a per library basis
LD_START_STATIC_SPEC=
OpenPOWER on IntegriCloud