changeset 3969:5bf7ebed4bc8

. Make changes to the BSD specific files equivalent to the Linux specific changes.
author Greg Lewis <glewis@eyesbeyond.com>
date Tue, 05 Apr 2011 21:49:26 -0700
parents 241d5769859e
children ccc38f4c2867
files make/common/Defs-bsd.gmk make/common/shared/Defs-bsd.gmk make/java/nio/mapfile-bsd src/solaris/native/java/net/bsd_close.c
diffstat 4 files changed, 32 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-bsd.gmk	Mon Apr 04 19:32:44 2011 -0700
+++ b/make/common/Defs-bsd.gmk	Tue Apr 05 21:49:26 2011 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -109,6 +109,8 @@
 LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
 CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
 LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
+CFLAGS_REQUIRED_arm     += -fsigned-char -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc     += -fsigned-char -D_BIG_ENDIAN
 ifeq ($(ZERO_BUILD), true)
   CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
   ifeq ($(ZERO_ENDIANNESS), little)
@@ -149,11 +151,9 @@
 #
 # Misc compiler options
 #
-ifeq ($(ARCH),ppc)
-  CFLAGS_COMMON   = -fsigned-char
-else # ARCH
+ifneq ($(ARCH),ppc)
   CFLAGS_COMMON   = -fno-strict-aliasing
-endif # ARCH
+endif 
 PIC_CODE_LARGE = -fPIC
 PIC_CODE_SMALL = -fpic
 GLOBAL_KPIC = $(PIC_CODE_LARGE)
@@ -384,3 +384,9 @@
   INCLUDE_SA = true
 endif
 
+ifdef CROSS_COMPILE_ARCH
+  # X11 headers are not under /usr/include
+  OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
+  OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
+  OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
+endif
--- a/make/common/shared/Defs-bsd.gmk	Mon Apr 04 19:32:44 2011 -0700
+++ b/make/common/shared/Defs-bsd.gmk	Tue Apr 05 21:49:26 2011 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -102,6 +102,14 @@
   COMPILER_PATH  =/usr/bin/
 endif
 
+# OPENWIN_HOME: path to where the X11 environment is installed.
+#  NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq ($(ALT_OPENWIN_HOME),)
+  OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
+else
+  OPENWIN_HOME  =$(X11_PATH)
+endif
+
 # DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
 #  NOTE: Must end with / so that it could be empty, allowing PATH usage.
 ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
@@ -177,6 +185,7 @@
 
 # Macro to check it's input file for banned dependencies and verify the
 #   binary built properly. Relies on process exit code.
+ifndef CROSS_COMPILE_ARCH
 ifeq ($(OS_VENDOR), Apple)
 define binary_file_verification # binary_file
 ( \
@@ -203,4 +212,11 @@
   ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
 )
 endef
-endif
+endif # OS_VENDOR == Apple
+else
+define binary_file_verification 
+( \
+  $(ECHO) "Skipping binary file verification for cross-compile build" \
+)
+endef
+endif # !CROSS_COMPILE_ARCH
--- a/make/java/nio/mapfile-bsd	Mon Apr 04 19:32:44 2011 -0700
+++ b/make/java/nio/mapfile-bsd	Tue Apr 05 21:49:26 2011 -0700
@@ -76,6 +76,8 @@
 		Java_sun_nio_ch_NativeThread_current;
 		Java_sun_nio_ch_NativeThread_init;
 		Java_sun_nio_ch_NativeThread_signal;
+		Java_sun_nio_ch_Net_canIPv6SocketJoinIPv4Group0;
+		Java_sun_nio_ch_Net_canJoin6WithIPv4Group0;
 		Java_sun_nio_ch_Net_socket0;
 		Java_sun_nio_ch_Net_bind0;
 		Java_sun_nio_ch_Net_connect0;
--- a/src/solaris/native/java/net/bsd_close.c	Mon Apr 04 19:32:44 2011 -0700
+++ b/src/solaris/native/java/net/bsd_close.c	Tue Apr 05 21:49:26 2011 -0700
@@ -112,7 +112,7 @@
  */
 static inline fdEntry_t *getFdEntry(int fd)
 {
-    if (fd < 0 || fd > fdCount) {
+    if (fd < 0 || fd >= fdCount) {
         return NULL;
     }
     return &fdTable[fd];