From 417e7bed131e9fbb05e1766c722d87f76f1868e7 Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Sat, 8 Dec 2007 19:23:58 +0000 Subject: [PATCH] configure.host: Add bits for i?86-*-darwin9 and x86_64-*-darwin9. 2007-12-08 Andreas Tobler * configure.host: Add bits for i?86-*-darwin9 and x86_64-*-darwin9. * configure.ac: Add darwin-signal.h to x86_64-*-darwin9 and i?86-*darwin9. * configure.in: Regenerate. * darwin.cc: Add definitions for Darwin specific functions for 64-bit. (darwin_java_register_dyld_add_image_hook): Use this specific functions. * Makefile.am (gij_LDFLAGS): Add extra_gij_ldflags for Darwin9. * Makefile.in: Regenerate. * include/Makefile.in: Likewise. * gcj/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. * testsuite/lib/libjava.exp (libjava_arguments): Add allow_stack_execute for *-*-darwin9*. From-SVN: r130709 --- libjava/ChangeLog | 17 +++++++++++++ libjava/Makefile.am | 3 ++- libjava/Makefile.in | 18 +++++++------- libjava/configure | 21 ++++++++++------ libjava/configure.ac | 6 ++++- libjava/configure.host | 11 +++++++++ libjava/darwin.cc | 41 ++++++++++++++++++++++--------- libjava/gcj/Makefile.in | 14 +++++------ libjava/include/Makefile.in | 14 +++++------ libjava/testsuite/lib/libjava.exp | 4 +++ 10 files changed, 102 insertions(+), 47 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 922a93bc2d7..4c8707a06b5 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,20 @@ +2007-12-08 Andreas Tobler + + * configure.host: Add bits for i?86-*-darwin9 and x86_64-*-darwin9. + * configure.ac: Add darwin-signal.h to x86_64-*-darwin9 and + i?86-*darwin9. + * configure.in: Regenerate. + * darwin.cc: Add definitions for Darwin specific functions for 64-bit. + (darwin_java_register_dyld_add_image_hook): Use this specific + functions. + * Makefile.am (gij_LDFLAGS): Add extra_gij_ldflags for Darwin9. + * Makefile.in: Regenerate. + * include/Makefile.in: Likewise. + * gcj/Makefile.in: Likewise. + * testsuite/Makefile.in: Likewise. + * testsuite/lib/libjava.exp (libjava_arguments): Add allow_stack_execute + for *-*-darwin9*. + 2007-12-06 David Daney * interpret.cc: Replace ffi_raw with INTERP_FFI_RAW_TYPE throughout. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 83a20e4897a..d906c2ee4f0 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -675,7 +675,8 @@ gij_SOURCES = ## need this because we are explicitly using libtool to link using the ## `.la' file. gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \ - -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) + -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \ + $(extra_gij_ldflags) gij_LINK = $(GCJLINK) ## See jv_convert_LDADD. gij_LDADD = -L$(here)/.libs libgij.la diff --git a/libjava/Makefile.in b/libjava/Makefile.in index febbe5c6c65..d757fe662e9 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -81,6 +81,7 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/confsubdir.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ $(top_srcdir)/../config/gxx-include-dir.m4 \ @@ -725,7 +726,6 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@ VERSION = @VERSION@ XLIB_AWT_FALSE = @XLIB_AWT_FALSE@ XLIB_AWT_TRUE = @XLIB_AWT_TRUE@ -XMKMF = @XMKMF@ X_AWT_FALSE = @X_AWT_FALSE@ X_AWT_TRUE = @X_AWT_TRUE@ X_CFLAGS = @X_CFLAGS@ @@ -737,9 +737,14 @@ ZIP = @ZIP@ ZLIBS = @ZLIBS@ ZLIBSPEC = @ZLIBSPEC@ ZLIBTESTSPEC = @ZLIBTESTSPEC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_LD = @ac_ct_LD@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -760,11 +765,9 @@ build_os = @build_os@ build_subdir = @build_subdir@ build_vendor = @build_vendor@ datadir = @datadir@ -datarootdir = @datarootdir@ dbexecdir = @dbexecdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ +extra_gij_ldflags = @extra_gij_ldflags@ extra_ldflags = @extra_ldflags@ extra_ldflags_libjava = @extra_ldflags_libjava@ $(am__append_5) gxx_include_dir = @gxx_include_dir@ @@ -776,14 +779,12 @@ host_exeext = @host_exeext@ host_os = @host_os@ host_subdir = @host_subdir@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libstdcxx_incdir = @libstdcxx_incdir@ -localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ @@ -791,10 +792,8 @@ mkdir_p = @mkdir_p@ mkinstalldirs = @mkinstalldirs@ multi_basedir = @multi_basedir@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ @@ -7973,7 +7972,8 @@ gc_analyze_LDADD = -L$(here)/.libs libgcj-tools.la libgcj.la gc_analyze_DEPENDENCIES = libgcj-tools.la libgcj.la libgcj.spec gij_SOURCES = gij_LDFLAGS = -rpath $(dbexecdir) -rpath $(toolexeclibdir) \ - -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) + -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) \ + $(extra_gij_ldflags) gij_LINK = $(GCJLINK) gij_LDADD = -L$(here)/.libs libgij.la diff --git a/libjava/configure b/libjava/configure index b87c18a3d34..e8cc2379807 100755 --- a/libjava/configure +++ b/libjava/configure @@ -459,7 +459,7 @@ ac_includes_default="\ #endif" ac_subdirs_all="$ac_subdirs_all classpath libltdl" -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 SED EGREP FGREP GREP DUMPBIN ac_ct_DUMPBIN NM lt_ECHO CPP CPPFLAGS CXXCPP 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 INTERPRETER_TRUE INTERPRETER_FALSE LIBFFI LIBFFIINCS PLATFORM 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 ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava extra_ldflags LIBSTDCXXSPEC LIBGCJTESTSPEC 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 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 GCJVERSION dbexecdir gxx_include_dir libstdcxx_incdir PERL SYSDEP_SOURCES ANONVERSCRIPT_TRUE ANONVERSCRIPT_FALSE 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 SED EGREP FGREP GREP DUMPBIN ac_ct_DUMPBIN NM lt_ECHO CPP CPPFLAGS CXXCPP 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 INTERPRETER_TRUE INTERPRETER_FALSE LIBFFI LIBFFIINCS PLATFORM 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 ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava extra_gij_ldflags extra_ldflags LIBSTDCXXSPEC LIBGCJTESTSPEC 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 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 GCJVERSION dbexecdir gxx_include_dir libstdcxx_incdir 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. @@ -18992,7 +18992,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -19000,7 +19000,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -19027,7 +19027,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi @@ -19041,7 +19041,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="-lX11 $LIBS" + LIBS="-lXt $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;} @@ -19053,11 +19053,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XrmInitialize () +XtMalloc (0) ; return 0; } @@ -20380,6 +20380,9 @@ case "${host}" in # on Darwin -single_module speeds up loading of the dynamic libraries. extra_ldflags_libjava=-Wl,-single_module ;; +*-*-darwin[9]*) + extra_gij_ldflags=-Wl,-allow_stack_execute + ;; arm*linux*eabi) # Some of the ARM unwinder code is actually in libstdc++. We # could in principle replicate it in libgcj, but it's better to @@ -20395,6 +20398,7 @@ esac + # Allow the GC to be disabled. Can be useful when debugging. echo "$as_me:$LINENO: checking for garbage collector to use" >&5 echo $ECHO_N "checking for garbage collector to use... $ECHO_C" >&6 @@ -27268,7 +27272,7 @@ case "${host}" in m68*-*-linux*) SIGNAL_HANDLER=include/dwarf2-signal.h ;; - powerpc*-*-darwin*) + powerpc*-*-darwin* | i?86-*-darwin9* | x86_64-*-darwin9*) SIGNAL_HANDLER=include/darwin-signal.h ;; *) @@ -29221,6 +29225,7 @@ s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@extra_ldflags_libjava@,$extra_ldflags_libjava,;t t +s,@extra_gij_ldflags@,$extra_gij_ldflags,;t t s,@extra_ldflags@,$extra_ldflags,;t t s,@LIBSTDCXXSPEC@,$LIBSTDCXXSPEC,;t t s,@LIBGCJTESTSPEC@,$LIBGCJTESTSPEC,;t t diff --git a/libjava/configure.ac b/libjava/configure.ac index 6640b122ea0..06ff7fd078d 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -788,6 +788,9 @@ case "${host}" in # on Darwin -single_module speeds up loading of the dynamic libraries. extra_ldflags_libjava=-Wl,-single_module ;; +*-*-darwin[[9]]*) + extra_gij_ldflags=-Wl,-allow_stack_execute + ;; arm*linux*eabi) # Some of the ARM unwinder code is actually in libstdc++. We # could in principle replicate it in libgcj, but it's better to @@ -798,6 +801,7 @@ arm*linux*eabi) ;; esac AC_SUBST(extra_ldflags_libjava) +AC_SUBST(extra_gij_ldflags) AC_SUBST(extra_ldflags) AC_SUBST(LIBSTDCXXSPEC) @@ -1546,7 +1550,7 @@ case "${host}" in m68*-*-linux*) SIGNAL_HANDLER=include/dwarf2-signal.h ;; - powerpc*-*-darwin*) + powerpc*-*-darwin* | i?86-*-darwin9* | x86_64-*-darwin9*) SIGNAL_HANDLER=include/darwin-signal.h ;; *) diff --git a/libjava/configure.host b/libjava/configure.host index 7fcfc3934d1..b9490511755 100644 --- a/libjava/configure.host +++ b/libjava/configure.host @@ -295,6 +295,17 @@ EOF slow_pthread_self= can_unwind_signal=no ;; + i?86-*-darwin9*) + can_unwind_signal=yes + DIVIDESPEC=-f%{m32:no-}%{!m32:%{!m64:no-}}%{m64:}use-divide-subroutine + ;; + x86_64-*-darwin9*) + enable_hash_synchronization_default=yes + slow_pthread_self= + can_unwind_signal=yes + DIVIDESPEC=-fuse-divide-subroutine + CHECKREFSPEC=-fcheck-references + ;; *-*-freebsd*) slow_pthread_self= ;; diff --git a/libjava/darwin.cc b/libjava/darwin.cc index d427ba7cd19..f6406b37599 100644 --- a/libjava/darwin.cc +++ b/libjava/darwin.cc @@ -1,6 +1,6 @@ /* darwin.cc - class loader stuff for Darwin. */ -/* Copyright (C) 2004 Free Software Foundation +/* Copyright (C) 2004, 2007 Free Software Foundation This file is part of libgcj. @@ -21,26 +21,43 @@ details. */ ourself. */ #include -struct mach_header; -extern "C" void _dyld_register_func_for_add_image - (void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide)); -extern "C" void _dyld_register_func_for_remove_image - (void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide)); -extern "C" char *getsectdatafromheader -(const struct mach_header *mhp, const char *segname, const char *sectname, - uint32_t *size); +#if !defined (__LP64__) + struct mach_header; +# define JAVA_MACH_HEADER mach_header +# define mh_size_t uint32_t + extern "C" void _dyld_register_func_for_add_image + (void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide)); + extern "C" void _dyld_register_func_for_remove_image + (void (*func)(const struct mach_header *mh, intptr_t vmaddr_slide)); + extern "C" char *getsectdatafromheader + (const struct mach_header *mhp, const char *segname, const char *sectname, + uint32_t *size); +# define GETSECTDATA getsectdatafromheader +#else + struct mach_header_64; +# define JAVA_MACH_HEADER mach_header_64 +# define mh_size_t uint64_t + extern "C" void _dyld_register_func_for_add_image + (void (*func)(const struct mach_header_64 *mh, intptr_t vmaddr_slide)); + extern "C" void _dyld_register_func_for_remove_image + (void (*func)(const struct mach_header_64 *mh, intptr_t vmaddr_slide)); + extern "C" char *getsectdatafromheader_64 + (const struct mach_header_64 *mhp, const char *segname, + const char *sectname, uint64_t *size); +# define GETSECTDATA getsectdatafromheader_64 +#endif /* When a new image is loaded, look to see if it has a jcr section and if so register the classes listed in it. */ static void -darwin_java_register_dyld_add_image_hook (const struct mach_header *mh, +darwin_java_register_dyld_add_image_hook (const struct JAVA_MACH_HEADER *mh, intptr_t slide) { char *fde; - uint32_t sz; + mh_size_t sz; - fde = getsectdatafromheader (mh, "__DATA", "jcr", &sz); + fde = GETSECTDATA (mh, "__DATA", "jcr", &sz); if (! fde) return; diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in index e9f9b8eca87..b837ad3de2e 100644 --- a/libjava/gcj/Makefile.in +++ b/libjava/gcj/Makefile.in @@ -249,7 +249,6 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@ VERSION = @VERSION@ XLIB_AWT_FALSE = @XLIB_AWT_FALSE@ XLIB_AWT_TRUE = @XLIB_AWT_TRUE@ -XMKMF = @XMKMF@ X_AWT_FALSE = @X_AWT_FALSE@ X_AWT_TRUE = @X_AWT_TRUE@ X_CFLAGS = @X_CFLAGS@ @@ -261,9 +260,14 @@ ZIP = @ZIP@ ZLIBS = @ZLIBS@ ZLIBSPEC = @ZLIBSPEC@ ZLIBTESTSPEC = @ZLIBTESTSPEC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_LD = @ac_ct_LD@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -284,11 +288,9 @@ build_os = @build_os@ build_subdir = @build_subdir@ build_vendor = @build_vendor@ datadir = @datadir@ -datarootdir = @datarootdir@ dbexecdir = @dbexecdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ +extra_gij_ldflags = @extra_gij_ldflags@ extra_ldflags = @extra_ldflags@ extra_ldflags_libjava = @extra_ldflags_libjava@ gxx_include_dir = @gxx_include_dir@ @@ -300,14 +302,12 @@ host_exeext = @host_exeext@ host_os = @host_os@ host_subdir = @host_subdir@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libstdcxx_incdir = @libstdcxx_incdir@ -localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ @@ -315,10 +315,8 @@ mkdir_p = @mkdir_p@ mkinstalldirs = @mkinstalldirs@ multi_basedir = @multi_basedir@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in index 16f8f404746..07a133b376d 100644 --- a/libjava/include/Makefile.in +++ b/libjava/include/Makefile.in @@ -248,7 +248,6 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@ VERSION = @VERSION@ XLIB_AWT_FALSE = @XLIB_AWT_FALSE@ XLIB_AWT_TRUE = @XLIB_AWT_TRUE@ -XMKMF = @XMKMF@ X_AWT_FALSE = @X_AWT_FALSE@ X_AWT_TRUE = @X_AWT_TRUE@ X_CFLAGS = @X_CFLAGS@ @@ -260,9 +259,14 @@ ZIP = @ZIP@ ZLIBS = @ZLIBS@ ZLIBSPEC = @ZLIBSPEC@ ZLIBTESTSPEC = @ZLIBTESTSPEC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_LD = @ac_ct_LD@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -283,11 +287,9 @@ build_os = @build_os@ build_subdir = @build_subdir@ build_vendor = @build_vendor@ datadir = @datadir@ -datarootdir = @datarootdir@ dbexecdir = @dbexecdir@ -docdir = @docdir@ -dvidir = @dvidir@ exec_prefix = @exec_prefix@ +extra_gij_ldflags = @extra_gij_ldflags@ extra_ldflags = @extra_ldflags@ extra_ldflags_libjava = @extra_ldflags_libjava@ gxx_include_dir = @gxx_include_dir@ @@ -299,14 +301,12 @@ host_exeext = @host_exeext@ host_os = @host_os@ host_subdir = @host_subdir@ host_vendor = @host_vendor@ -htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libstdcxx_incdir = @libstdcxx_incdir@ -localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ @@ -314,10 +314,8 @@ mkdir_p = @mkdir_p@ mkinstalldirs = @mkinstalldirs@ multi_basedir = @multi_basedir@ oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 68cb1ecf1aa..2cec1566965 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -429,6 +429,10 @@ proc libjava_arguments {{mode compile}} { lappend args "additional_flags=-bind_at_load" lappend args "additional_flags=-multiply_defined suppress" } + if { [istarget "*-*-darwin9*"] } { + lappend args "additional_flags=-Wl,-allow_stack_execute" + } + } return $args -- 2.30.2