This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Cross-compiling libjava
- From: Momchil Velikov <velco at fadata dot bg>
- To: java at gcc dot gnu dot org
- Date: Sat, 2 Nov 2002 15:07:25 +0200
- Subject: Cross-compiling libjava
- Organization: Independent entity
An excerpt from libjava/configure.in:
if test -n "${with_cross_host}"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
# may not work correctly, because the compiler may not be able to
# link executables.
# We assume newlib. This lets us hard-code the functions we know
# we'll have.
Well, this seems rather odd to me. Why wouldn't the compiler be able to
link executables ? It won't be able to *run* them, but to link ?!
And the assumption for newlib ? Why don't treat newlib just like any
other target ?
Besides certain functions appearing missing, which they are in fact
present, skipping prototype checks leads to compilation errors, e.g.:
/usr/velco/src/gcc-3.2/libjava/java/net/natInetAddress.cc:59:
declaration of C function `int gethostname(char*, int)' conflicts
with/usr/local/gcc/powerpc-netbsd/include/unistd.h:250: previous
declaration `int gethostname(char*, unsigned int)' here
gmake[4]: *** [java/net/natInetAddress.lo] Error 1
I'm building right now i386-netbsd -> powerpc-netbsd cross-compiler with
the attached patch and will sumbit it if all works well.
~velco
Index: acconfig.h
===================================================================
RCS file: /cvs/gcc/gcc/libjava/acconfig.h,v
retrieving revision 1.22.2.2
diff -u -d -p -r1.22.2.2 acconfig.h
--- acconfig.h 18 Mar 2002 06:30:23 -0000 1.22.2.2
+++ acconfig.h 2 Nov 2002 13:06:51 -0000
@@ -142,8 +142,8 @@
/* Define if tzname is missing. */
#undef NO_TZNAME
-/* Define if getuid() and friends are missing. */
-#undef NO_GETUID
+/* Define if you have getuid(). */
+#undef HAVE_GETUID
/* Define if libltdl is in use. */
#undef USE_LTDL
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.114.2.16
diff -u -d -p -r1.114.2.16 configure.in
--- configure.in 8 May 2002 04:26:24 -0000 1.114.2.16
+++ configure.in 2 Nov 2002 13:07:27 -0000
@@ -466,26 +466,6 @@ AC_SUBST(tool_include_dir)
AC_SUBST(gcc_version)
if test -n "${with_cross_host}"; then
- # We are being configured with a cross compiler. AC_REPLACE_FUNCS
- # may not work correctly, because the compiler may not be able to
- # link executables.
-
- # We assume newlib. This lets us hard-code the functions we know
- # we'll have.
- AC_DEFINE(HAVE_MEMMOVE)
- AC_DEFINE(HAVE_MEMCPY)
- AC_DEFINE(HAVE_STRERROR)
- AC_DEFINE(HAVE_TIME)
- AC_DEFINE(HAVE_GMTIME_R)
- AC_DEFINE(HAVE_LOCALTIME_R)
- dnl This is only for POSIX threads.
- AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT)
- dnl We also assume we are using gcc, which provides alloca.
- AC_DEFINE(HAVE_ALLOCA)
-
- dnl Assume we do not have getuid and friends.
- AC_DEFINE(NO_GETUID)
-
# If Canadian cross, then don't pick up tools from the build
# directory.
if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
@@ -494,230 +474,234 @@ if test -n "${with_cross_host}"; then
GCJ="${target_alias}-gcj"
fi
NATIVE=no
-else
- AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep opendir)
- AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd)
- AC_CHECK_FUNCS(access stat mkdir rename rmdir unlink realpath utime chmod)
- AC_CHECK_FUNCS(nl_langinfo setlocale)
- AC_CHECK_FUNCS(inet_aton inet_addr, break)
- AC_CHECK_FUNCS(inet_pton uname inet_ntoa)
- AC_CHECK_FUNCS(fork execvp pipe sigaction)
- AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
- AC_CHECK_FUNC(backtrace, [
- case "$host" in
- ia64-*-linux*)
- # Has broken backtrace()
- ;;
- *)
- AC_DEFINE(HAVE_BACKTRACE)
- ;;
- esac
- ])
+fi
- AC_CHECK_LIB(dl, dladdr, [
- AC_DEFINE(HAVE_DLADDR)])
- AC_CHECK_FILES(/proc/self/exe, [
- AC_DEFINE(HAVE_PROC_SELF_EXE)])
+AC_CHECK_FUNCS(getuid)
+AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep opendir)
+AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd)
+AC_CHECK_FUNCS(access stat mkdir rename rmdir unlink realpath utime chmod)
+AC_CHECK_FUNCS(nl_langinfo setlocale)
+AC_CHECK_FUNCS(inet_aton inet_addr, break)
+AC_CHECK_FUNCS(inet_pton uname inet_ntoa)
+AC_CHECK_FUNCS(fork execvp pipe sigaction)
+AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
+AC_CHECK_FUNC(backtrace, [
+ case "$host" in
+ ia64-*-linux*)
+ # Has broken backtrace()
+ ;;
+ *)
+ AC_DEFINE(HAVE_BACKTRACE)
+ ;;
+ esac
+])
- AM_ICONV
- AM_LC_MESSAGES
- AC_STRUCT_TIMEZONE
+AC_CHECK_LIB(dl, dladdr, [
+ AC_DEFINE(HAVE_DLADDR)])
- AC_CHECK_FUNCS(gethostbyname_r, [
- AC_DEFINE(HAVE_GETHOSTBYNAME_R)
- # There are two different kinds of gethostbyname_r.
- # We look for the one that returns `int'.
- # Hopefully this check is robust enough.
- AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [
- AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT)])
+if test ${NATIVE} = yes; then
+ AC_CHECK_FILES(/proc/self/exe, [
+ AC_DEFINE(HAVE_PROC_SELF_EXE)])
+fi
- case " $GCINCS " in
- *" -D_REENTRANT "*) ;;
- *)
- dnl On DU4.0, gethostbyname_r is only declared with -D_REENTRANT
- AC_CACHE_CHECK([whether gethostbyname_r declaration requires -D_REENTRANT],
- [libjava_cv_gethostbyname_r_needs_reentrant],
- [ AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([#include <netdb.h>],
- [gethostbyname_r("", 0, 0);],
- [libjava_cv_gethostbyname_r_needs_reentrant=no], [dnl
- CPPFLAGS_SAVE="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_REENTRANT"
- AC_TRY_COMPILE([#include <netdb.h>], [gethostbyname_r("", 0, 0);],
- [libjava_cv_gethostbyname_r_needs_reentrant=yes],
- [libjava_cv_gethostbyname_r_needs_reentrant=fail])
- CPPFLAGS="$CPPFLAGS_SAVE"
- ])
- AC_LANG_RESTORE
- ])
- if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
- AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
- fi
- ;;
- esac
+AM_ICONV
+AM_LC_MESSAGES
+AC_STRUCT_TIMEZONE
- AC_CACHE_CHECK([for struct hostent_data],
- [libjava_cv_struct_hostent_data], [dnl
- AC_TRY_COMPILE([
+AC_CHECK_FUNCS(gethostbyname_r, [
+ AC_DEFINE(HAVE_GETHOSTBYNAME_R)
+ # There are two different kinds of gethostbyname_r.
+ # We look for the one that returns `int'.
+ # Hopefully this check is robust enough.
+ AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [
+ AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT)])
+
+ case " $GCINCS " in
+ *" -D_REENTRANT "*) ;;
+ *)
+ dnl On DU4.0, gethostbyname_r is only declared with -D_REENTRANT
+ AC_CACHE_CHECK([whether gethostbyname_r declaration requires -D_REENTRANT],
+ [libjava_cv_gethostbyname_r_needs_reentrant],
+ [ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <netdb.h>],
+ [gethostbyname_r("", 0, 0);],
+ [libjava_cv_gethostbyname_r_needs_reentrant=no], [dnl
+ CPPFLAGS_SAVE="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ AC_TRY_COMPILE([#include <netdb.h>], [gethostbyname_r("", 0, 0);],
+ [libjava_cv_gethostbyname_r_needs_reentrant=yes],
+ [libjava_cv_gethostbyname_r_needs_reentrant=fail])
+ CPPFLAGS="$CPPFLAGS_SAVE"
+ ])
+ AC_LANG_RESTORE
+ ])
+ if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
+ AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
+ fi
+ ;;
+ esac
+
+ AC_CACHE_CHECK([for struct hostent_data],
+ [libjava_cv_struct_hostent_data], [dnl
+ AC_TRY_COMPILE([
#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
# define _REENTRANT 1
#endif
#include <netdb.h>], [struct hostent_data data;],
- [libjava_cv_struct_hostent_data=yes],
- [libjava_cv_struct_hostent_data=no])])
- if test "x$libjava_cv_struct_hostent_data" = xyes; then
- AC_DEFINE(HAVE_STRUCT_HOSTENT_DATA, 1,
- [Define if struct hostent_data is defined in netdb.h])
- fi
- ])
+ [libjava_cv_struct_hostent_data=yes],
+ [libjava_cv_struct_hostent_data=no])])
+ if test "x$libjava_cv_struct_hostent_data" = xyes; then
+ AC_DEFINE(HAVE_STRUCT_HOSTENT_DATA, 1,
+ [Define if struct hostent_data is defined in netdb.h])
+ fi
+])
- # FIXME: libjava source code expects to find a prototype for
- # gethostbyaddr_r in netdb.h. The outer check ensures that
- # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
- # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
- # linkage check is enough, yet C++ code requires proper prototypes.)
- AC_EGREP_HEADER(gethostbyaddr_r, netdb.h, [
- AC_CHECK_FUNCS(gethostbyaddr_r, [
- AC_DEFINE(HAVE_GETHOSTBYADDR_R)
- # There are two different kinds of gethostbyaddr_r.
- # We look for the one that returns `int'.
- # Hopefully this check is robust enough.
- AC_EGREP_HEADER(int.*gethostbyaddr_r, netdb.h, [
- AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT)])])])
+# FIXME: libjava source code expects to find a prototype for
+# gethostbyaddr_r in netdb.h. The outer check ensures that
+# HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
+# to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
+# linkage check is enough, yet C++ code requires proper prototypes.)
+AC_EGREP_HEADER(gethostbyaddr_r, netdb.h, [
+ AC_CHECK_FUNCS(gethostbyaddr_r, [
+ AC_DEFINE(HAVE_GETHOSTBYADDR_R)
+ # There are two different kinds of gethostbyaddr_r.
+ # We look for the one that returns `int'.
+ # Hopefully this check is robust enough.
+ AC_EGREP_HEADER(int.*gethostbyaddr_r, netdb.h, [
+ AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT)])])])
- AC_CHECK_FUNCS(gethostname, [
- AC_DEFINE(HAVE_GETHOSTNAME)
- AC_EGREP_HEADER(gethostname, unistd.h, [
- AC_DEFINE(HAVE_GETHOSTNAME_DECL)])])
+AC_CHECK_FUNCS(gethostname, [
+ AC_DEFINE(HAVE_GETHOSTNAME)
+ AC_EGREP_HEADER(gethostname, unistd.h, [
+ AC_DEFINE(HAVE_GETHOSTNAME_DECL)])])
- # Look for these functions in the thread library, but only bother
- # if using POSIX threads.
- if test "$THREADS" = posix; then
- save_LIBS="$LIBS"
- LIBS="$LIBS $THREADLIBS"
- # Some POSIX thread systems don't have pthread_mutexattr_settype.
- # E.g., Solaris.
- AC_CHECK_FUNCS(pthread_mutexattr_settype pthread_mutexattr_setkind_np)
+# Look for these functions in the thread library, but only bother
+# if using POSIX threads.
+if test "$THREADS" = posix; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $THREADLIBS"
+ # Some POSIX thread systems don't have pthread_mutexattr_settype.
+ # E.g., Solaris.
+ AC_CHECK_FUNCS(pthread_mutexattr_settype pthread_mutexattr_setkind_np)
- # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
- # Solaris 7 the name librt is preferred.
- AC_CHECK_FUNCS(sched_yield, , [
- AC_CHECK_LIB(rt, sched_yield, [
- AC_DEFINE(HAVE_SCHED_YIELD)
- THREADLIBS="$THREADLIBS -lrt"
- THREADSPEC="$THREADSPEC -lrt"], [
- AC_CHECK_LIB(posix4, sched_yield, [
- AC_DEFINE(HAVE_SCHED_YIELD)
- THREADLIBS="$THREADLIBS -lposix4"
- THREADSPEC="$THREADSPEC -lposix4"])])])
- LIBS="$save_LIBS"
+ # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
+ # Solaris 7 the name librt is preferred.
+ AC_CHECK_FUNCS(sched_yield, , [
+ AC_CHECK_LIB(rt, sched_yield, [
+ AC_DEFINE(HAVE_SCHED_YIELD)
+ THREADLIBS="$THREADLIBS -lrt"
+ THREADSPEC="$THREADSPEC -lrt"], [
+ AC_CHECK_LIB(posix4, sched_yield, [
+ AC_DEFINE(HAVE_SCHED_YIELD)
+ THREADLIBS="$THREADLIBS -lposix4"
+ THREADSPEC="$THREADSPEC -lposix4"])])])
+ LIBS="$save_LIBS"
- # We can save a little space at runtime if the mutex has m_count
- # or __m_count. This is a nice hack for Linux.
- AC_TRY_COMPILE([#include <pthread.h>], [
- extern pthread_mutex_t *mutex; int q = mutex->m_count;
- ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT), [
- AC_TRY_COMPILE([#include <pthread.h>], [
- extern pthread_mutex_t *mutex; int q = mutex->__m_count;
- ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT))])
- fi
+ # We can save a little space at runtime if the mutex has m_count
+ # or __m_count. This is a nice hack for Linux.
+ AC_TRY_COMPILE([#include <pthread.h>], [
+ extern pthread_mutex_t *mutex; int q = mutex->m_count;
+ ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT), [
+ AC_TRY_COMPILE([#include <pthread.h>], [
+ extern pthread_mutex_t *mutex; int q = mutex->__m_count;
+ ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT))])
+fi
- # We require a way to get the time.
- time_found=no
- AC_CHECK_FUNCS(gettimeofday time ftime, time_found=yes)
- if test "$time_found" = no; then
- AC_MSG_ERROR([no function found to get the time])
- fi
+# We require a way to get the time.
+time_found=no
+AC_CHECK_FUNCS(gettimeofday time ftime, time_found=yes)
+if test "$time_found" = no; then
+ AC_MSG_ERROR([no function found to get the time])
+fi
- AC_CHECK_FUNCS(memmove)
+AC_CHECK_FUNCS(memmove)
- # We require memcpy.
- memcpy_found=no
- AC_CHECK_FUNCS(memcpy, memcpy_found=yes)
- if test "$memcpy_found" = no; then
- AC_MSG_ERROR([memcpy is required])
- fi
+# We require memcpy.
+memcpy_found=no
+AC_CHECK_FUNCS(memcpy, memcpy_found=yes)
+if test "$memcpy_found" = no; then
+ AC_MSG_ERROR([memcpy is required])
+fi
- AC_CHECK_LIB(dl, dlopen, [
- AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])
+AC_CHECK_LIB(dl, dlopen, [
+ AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])
- # Some library-finding code we stole from Tcl.
- #--------------------------------------------------------------------
- # Check for the existence of the -lsocket and -lnsl libraries.
- # The order here is important, so that they end up in the right
- # order in the command line generated by make. Here are some
- # special considerations:
- # 1. Use "connect" and "accept" to check for -lsocket, and
- # "gethostbyname" to check for -lnsl.
- # 2. Use each function name only once: can't redo a check because
- # autoconf caches the results of the last check and won't redo it.
- # 3. Use -lnsl and -lsocket only if they supply procedures that
- # aren't already present in the normal libraries. This is because
- # IRIX 5.2 has libraries, but they aren't needed and they're
- # bogus: they goof up name resolution if used.
- # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
- # To get around this problem, check for both libraries together
- # if -lsocket doesn't work by itself.
- #--------------------------------------------------------------------
+# Some library-finding code we stole from Tcl.
+#--------------------------------------------------------------------
+# Check for the existence of the -lsocket and -lnsl libraries.
+# The order here is important, so that they end up in the right
+# order in the command line generated by make. Here are some
+# special considerations:
+# 1. Use "connect" and "accept" to check for -lsocket, and
+# "gethostbyname" to check for -lnsl.
+# 2. Use each function name only once: can't redo a check because
+# autoconf caches the results of the last check and won't redo it.
+# 3. Use -lnsl and -lsocket only if they supply procedures that
+# aren't already present in the normal libraries. This is because
+# IRIX 5.2 has libraries, but they aren't needed and they're
+# bogus: they goof up name resolution if used.
+# 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
+# To get around this problem, check for both libraries together
+# if -lsocket doesn't work by itself.
+#--------------------------------------------------------------------
- AC_CACHE_CHECK([for socket libraries], gcj_cv_lib_sockets,
- [gcj_cv_lib_sockets=
- gcj_checkBoth=0
- unset ac_cv_func_connect
- AC_CHECK_FUNC(connect, gcj_checkSocket=0, gcj_checkSocket=1)
- if test "$gcj_checkSocket" = 1; then
- unset ac_cv_func_connect
- AC_CHECK_LIB(socket, main, gcj_cv_lib_sockets="-lsocket",
- gcj_checkBoth=1)
- fi
- if test "$gcj_checkBoth" = 1; then
- gcj_oldLibs=$LIBS
- LIBS="$LIBS -lsocket -lnsl"
- unset ac_cv_func_accept
- AC_CHECK_FUNC(accept,
- [gcj_checkNsl=0
- gcj_cv_lib_sockets="-lsocket -lnsl"])
- unset ac_cv_func_accept
- LIBS=$gcj_oldLibs
- fi
- unset ac_cv_func_gethostbyname
- gcj_oldLibs=$LIBS
- LIBS="$LIBS $gcj_cv_lib_sockets"
- AC_CHECK_FUNC(gethostbyname, ,
- [AC_CHECK_LIB(nsl, main,
- [gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"])])
- unset ac_cv_func_gethostbyname
- LIBS=$gcj_oldLIBS
- ])
- SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
+AC_CACHE_CHECK([for socket libraries], gcj_cv_lib_sockets,
+ [gcj_cv_lib_sockets=
+ gcj_checkBoth=0
+ unset ac_cv_func_connect
+ AC_CHECK_FUNC(connect, gcj_checkSocket=0, gcj_checkSocket=1)
+ if test "$gcj_checkSocket" = 1; then
+ unset ac_cv_func_connect
+ AC_CHECK_LIB(socket, main, gcj_cv_lib_sockets="-lsocket",
+ gcj_checkBoth=1)
+ fi
+ if test "$gcj_checkBoth" = 1; then
+ gcj_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ unset ac_cv_func_accept
+ AC_CHECK_FUNC(accept,
+ [gcj_checkNsl=0
+ gcj_cv_lib_sockets="-lsocket -lnsl"])
+ unset ac_cv_func_accept
+ LIBS=$gcj_oldLibs
+ fi
+ unset ac_cv_func_gethostbyname
+ gcj_oldLibs=$LIBS
+ LIBS="$LIBS $gcj_cv_lib_sockets"
+ AC_CHECK_FUNC(gethostbyname, ,
+ [AC_CHECK_LIB(nsl, main,
+ [gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"])])
+ unset ac_cv_func_gethostbyname
+ LIBS=$gcj_oldLIBS
+])
+SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
- if test "$with_system_zlib" = yes; then
- AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=)
- fi
+if test "$with_system_zlib" = yes; then
+ AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=)
+fi
- # On Solaris, and maybe other architectures, the Boehm collector
- # requires -ldl.
- if test "$GC" = boehm; then
- AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
- fi
+# On Solaris, and maybe other architectures, the Boehm collector
+# requires -ldl.
+if test "$GC" = boehm; then
+ AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
+fi
- if test -z "${with_multisubdir}"; then
- builddotdot=.
- else
+if test -z "${with_multisubdir}"; then
+ builddotdot=.
+else
changequote(<<,>>)
- builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
+ builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
changequote([,])
- fi
- if test -x "${builddotdot}/../../gcc/gcj"; then
- dir="`cd ${builddotdot}/../../gcc && pwd`"
- GCJ="$dir/gcj -B`pwd`/ -B$dir/"
- else
- CANADIAN=yes
- NULL_TARGET=yes
- GCJ="gcj -B`pwd`/"
- fi
+fi
+if test -x "${builddotdot}/../../gcc/gcj"; then
+ dir="`cd ${builddotdot}/../../gcc && pwd`"
+ GCJ="$dir/gcj -B`pwd`/ -B$dir/"
+else
+ CANADIAN=yes
+ NULL_TARGET=yes
+ GCJ="gcj -B`pwd`/"
fi
# Create it, so that compile/link tests don't fail
Index: java/lang/natSystem.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natSystem.cc,v
retrieving revision 1.48.2.4
diff -u -d -p -r1.48.2.4 natSystem.cc
--- java/lang/natSystem.cc 7 Apr 2002 11:30:08 -0000 1.48.2.4
+++ java/lang/natSystem.cc 2 Nov 2002 13:07:39 -0000
@@ -349,7 +349,7 @@ java::lang::System::init_properties (voi
}
#endif /* HAVE_UNAME */
-#ifndef NO_GETUID
+#ifdef HAVE_GETUID
#ifdef HAVE_PWD_H
uid_t user_id = getuid ();
struct passwd *pwd_entry;
@@ -383,7 +383,7 @@ java::lang::System::init_properties (voi
SET ("user.home", pwd_entry->pw_dir);
}
#endif /* HAVE_PWD_H */
-#endif /* NO_GETUID */
+#endif /* HAVE_GETUID */
#ifdef HAVE_GETCWD
#ifdef HAVE_UNISTD_H