changeset 11036:feae15578b2f

7122222: GC log is limited to 2G for 32-bit Summary: Enable large file support for generated 32-bit ostream.o on Linux and Solaris (as only the two need this) by setting -D_FILE_OFFSET_BITS=64 in compilation Reviewed-by: tbell, mgerdin, dcubed Contributed-by: tamao <tao.mao@oracle.com>
author tamao
date Fri, 07 Jun 2013 09:46:58 -0700
parents fc8a1a5de78e
children df7e1c0e3dc1
files make/linux/makefiles/vm.make make/solaris/makefiles/vm.make src/os/solaris/vm/os_solaris.inline.hpp
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/vm.make	Fri Jun 21 00:59:12 2013 -0700
+++ b/make/linux/makefiles/vm.make	Fri Jun 07 09:46:58 2013 -0700
@@ -107,6 +107,10 @@
 # File specific flags
 CXXFLAGS += $(CXXFLAGS/BYFILE)
 
+# Large File Support
+ifneq ($(LP64), 1)
+CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
+endif # ifneq ($(LP64), 1)
 
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 CFLAGS += $(CFLAGS_WARN/BYFILE)
--- a/make/solaris/makefiles/vm.make	Fri Jun 21 00:59:12 2013 -0700
+++ b/make/solaris/makefiles/vm.make	Fri Jun 07 09:46:58 2013 -0700
@@ -95,6 +95,10 @@
 # File specific flags
 CXXFLAGS += $(CXXFLAGS/BYFILE)
 
+# Large File Support
+ifneq ($(LP64), 1)
+CXXFLAGS/ostream.o += -D_FILE_OFFSET_BITS=64
+endif # ifneq ($(LP64), 1)
 
 # CFLAGS_WARN holds compiler options to suppress/enable warnings.
 CFLAGS += $(CFLAGS_WARN)
--- a/src/os/solaris/vm/os_solaris.inline.hpp	Fri Jun 21 00:59:12 2013 -0700
+++ b/src/os/solaris/vm/os_solaris.inline.hpp	Fri Jun 07 09:46:58 2013 -0700
@@ -89,7 +89,7 @@
 
 inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) {
   assert(dirp != NULL, "just checking");
-#if defined(_LP64) || defined(_GNU_SOURCE)
+#if defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
   dirent* p;
   int status;
 
@@ -98,9 +98,9 @@
     return NULL;
   } else
     return p;
-#else  // defined(_LP64) || defined(_GNU_SOURCE)
+#else  // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
   return ::readdir_r(dirp, dbuf);
-#endif // defined(_LP64) || defined(_GNU_SOURCE)
+#endif // defined(_LP64) || defined(_GNU_SOURCE) || _FILE_OFFSET_BITS==64
 }
 
 inline int os::closedir(DIR *dirp) {