changeset 14326:3f8b8cd207f8

7176225: Remove JDBC-ODBC Bridge Reviewed-by: lancea, ohair, tbell
author alanb
date Sat, 27 Oct 2012 09:18:29 +0100
parents 622c473a21aa
children c0d86f6f8be8
files jdk/make/common/Sanity.gmk jdk/make/common/shared/Defs-solaris.gmk jdk/make/common/shared/Sanity.gmk jdk/make/sun/Makefile jdk/make/sun/jdbc/Makefile jdk/makefiles/CompileNativeLibraries.gmk jdk/makefiles/CopyIntoClasses.gmk jdk/makefiles/CreateJars.gmk jdk/makefiles/GensrcMisc.gmk
diffstat 9 files changed, 3 insertions(+), 277 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/make/common/Sanity.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/make/common/Sanity.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -64,7 +64,6 @@
     sane-math_iso \
     sane-libCrun \
     sane-unixccs_path \
-    sane-odbcdir \
     sane-msdevtools_path \
     sane-dxsdk \
     sane-compiler \
--- a/jdk/make/common/shared/Defs-solaris.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/make/common/shared/Defs-solaris.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -206,13 +206,12 @@
 #     libjdgaSUNWffb.so
 #     libjdgaSUNWm64.so
 #     libxinerama.so
-#   The library libJdbcOdbc.so has also been given an exception.
 #   The JNI/JVMTI demo libraries are also missing mapfiles, no exceptions yet.
 ifeq ($(ARCH_FAMILY),sparc)
   MAPFILE_EXCEPTIONS = \
-    (libJdbcOdbc|libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
+    (libjdgaSUNWafb|libjdgaSUNWcg6|libjdgaSUNWffb|libjdgaSUNWm64|libxinerama)
 else
-  MAPFILE_EXCEPTIONS = (libJdbcOdbc)
+  MAPFILE_EXCEPTIONS = ()
 endif
 
 # Macro to check it's input file for banned dependencies and verify the
--- a/jdk/make/common/shared/Sanity.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/make/common/shared/Sanity.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -208,7 +208,6 @@
 	sane-docs_import \
 	sane-math_iso \
 	sane-libCrun \
-	sane-odbcdir \
 	sane-msdevtools_path \
 	sane-hotspot_binaries \
 	sane-hotspot_import \
--- a/jdk/make/sun/Makefile	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/make/sun/Makefile	Sat Oct 27 09:18:29 2012 +0100
@@ -63,12 +63,6 @@
   LWAWT_SUBDIR = lwawt
 endif
 
-ifndef OPENJDK
-ifneq ($(PLATFORM), macosx)
-  JDBC_SUBDIR = jdbc
-endif
-endif
-
 ifdef OPENJDK
   RENDER_SUBDIR = pisces
 else
@@ -89,7 +83,7 @@
                      $(LWAWT_PRE_SUBDIR) $(DISPLAY_LIBS) $(DGA_SUBDIR) $(LWAWT_SUBDIR) \
                      jawt font jpeg cmm $(DISPLAY_TOOLS)
 SUBDIRS_management = management
-SUBDIRS_misc       = $(ORG_SUBDIR) rmi $(JDBC_SUBDIR) tracing
+SUBDIRS_misc       = $(ORG_SUBDIR) rmi tracing
 SUBDIRS_tools      = native2ascii serialver tools jconsole
 
 ifndef OPENJDK
--- a/jdk/make/sun/jdbc/Makefile	Fri Oct 26 21:34:24 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-#
-# Copyright (c) 1996, 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
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Makefile for JDBC-ODBC Bridge Driver 
-#
-# Note - the native library for the bridge may be linked with the 
-# shared library for the ODBC driver manager.  Or dummy libraries
-# may be used to just create libJdbcOdbc.so with a dependency on
-# libodbc.so and libodbcinst.so.
-#
-
-BUILDDIR = ../..
-PACKAGE = sun.jdbc.odbc
-LIBRARY = JdbcOdbc
-PRODUCT = sun
-include $(BUILDDIR)/common/Defs.gmk
-
-#
-# Files
-#
-
-AUTO_FILES_JAVA_DIRS = sun/jdbc/odbc
-
-FILES_c = \
-	JdbcOdbc.c
-
-FILES_export = \
-    sun/jdbc/odbc/JdbcOdbc.java 
-
-# Use fake libraries on Solaris and Linux just so the library we create has
-#   a dependency on these two library names. (which are not part of the jdk)
-ifneq ($(PLATFORM), windows)
-  # In jdk5 and jdk6, and on Solaris 32bit, we would have required that
-  #    these two libraries exist at: $(ALT_ODBCDIR)/ISLIodbc/2.11/lib
-  #    In jdk7, we just fake them out like we did on Linux in jdk5 and jdk6.
-  #
-  # If you wanted to use the real odbc libraries, change the value of
-  #    ODBC_LIBRARY_LOCATION, and delete the variable assignments below.
-  #
-  # Tell linker to ignore missing externals when building this shared library.
-  LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker nodefs
-  # Define a place to create the fake libraries and their names.
-  ODBC_LIBRARY_LOCATION = $(TEMPDIR)
-  ODBC_FAKE_LIBRARIES = $(ODBC_LIBRARY_LOCATION)/libodbcinst.so $(ODBC_LIBRARY_LOCATION)/libodbc.so
-  # Make sure they get created early.
-  INIT += $(ODBC_FAKE_LIBRARIES)
-endif
-
-#
-# Rules
-#
-include $(BUILDDIR)/common/Library.gmk
-
-#
-# The UNIX define specifies conditional compilation for UNIX
-#
-ifeq ($(PLATFORM), windows)
-  LDLIBS += odbc32.lib odbccp32.lib
-else
-  CFLAGS += -DUNIX
-  LDFLAGS += -L$(ODBC_LIBRARY_LOCATION) -lodbcinst -lodbc
-endif
-
-#
-# The native code for the bridge uses conditional compilation to 
-# support Solaris, Win95 and Mac PPC. This is the path to the shared C files
-# (which unfortunately are in the same directory as shared Java files).
-#
-vpath %.c $(CLOSED_SHARE_SRC)/classes/sun/jdbc/odbc
-
-#
-# Rules to generate fake libraries
-#
-
-ifdef ODBC_FAKE_LIBRARIES
-$(TEMPDIR)/dummyodbc.c: 
-	@$(prep-target)
-	$(ECHO) "void dummyOdbc(void){}" >> $@
-$(TEMPDIR)/dummyodbc.o: $(TEMPDIR)/dummyodbc.c
-	@$(prep-target)
-	$(COMPILE.c) $(CC_OBJECT_OUTPUT_FLAG)$@ $(CFLAGS_GPROF) $<
-$(ODBC_FAKE_LIBRARIES): $(TEMPDIR)/dummyodbc.o
-	@$(prep-target)
-	$(CC) $(SHARED_LIBRARY_FLAG) $(LDFLAGS_COMMON) -o $@ $< $(EXTRA_LIBS)
-clean::
-	$(RM) -f $(ODBC_FAKE_LIBRARIES)
-	$(RM) -f $(TEMPDIR)/dummyodbc.c
-	$(RM) -f $(TEMPDIR)/dummyodbc.o
-endif
-
-#
-# Files that need to be copied
-#
-SERVICEDIR = $(CLASSBINDIR)/META-INF/services
-
-FILES_copy = \
-	$(SERVICEDIR)/java.sql.Driver
-
-
-FILES_mkdirs = \
-	$(CLASSBINDIR)/META-INF \
-	$(CLASSBINDIR)/META-INF/services
-
-FILES_copydirs = \
-	$(CLASSBINDIR) \
-	$(FILES_mkdirs)
-
-build: copy-files
-
-copy-files: $(FILES_copy)
-
-$(SERVICEDIR)/%: $(CLOSED_SHARE_SRC)/classes/sun/jdbc/odbc/META-INF/services/%
-	$(install-file)
-
-clean clobber::
-	$(RM) $(FILES_copy)
-
-.PHONY: copy-files
-
--- a/jdk/makefiles/CompileNativeLibraries.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/makefiles/CompileNativeLibraries.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -1540,96 +1540,6 @@
 
 ##########################################################################################
 
-ifndef OPENJDK
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-
-LIBJDBCODBC_DIR   :=$(JDK_OUTPUTDIR)/objs/libjdbcodbc
-LIBJDBCODBC_NAME  :=$(LIBRARY_PREFIX)JdbcOdbc$(SHARED_LIBRARY_SUFFIX)
-LIBJDBCODBC_CFLAGS:=
-LIBJDBCODBC_LIBS   :=
-LIBJDBCODBC_LDFLAGS:=
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
-	LIBJDBCODBC_LDFLAGS:=$(LDFLAGS_JDKLIB)
-	LIBJDBCODBC_LIBS += odbc32.lib odbccp32.lib $(WIN_JAVA_LIB) advapi32.lib
-else
-	LIBJDBCODBC_CFLAGS:=-DUNIX
-
-#
-# This mimics "current" build system exactly. Link against fake -lodbcinst -lodbc
-#   but...those are linked with the -soname, causing the dependency to be dropped on linux (gnu ld)
-#   but kept with other linker (solaris)
-#
-# IMO very weird behaviour...very weird
-#
-	LIBJDBCODBC_LDFLAGS:=$(patsubst defs,nodefs,$(LDFLAGS_JDKLIB)) \
-				      -Xlinker -z -Xlinker nodefs
-	LIBJDBCODBC_LIBS += -L$(LIBJDBCODBC_DIR) -lodbcinst -lodbc
-	LIBJDBCODBC_SONAME:=$(call SET_SHARED_LIBRARY_NAME,$(LIBJDBCODBC_NAME))
-endif
-
-$(eval $(call SetupNativeCompilation,BUILD_LIBJDBCODBC,\
-		LIBRARY:=JdbcOdbc,\
-                OUTPUT_DIR:=$(INSTALL_LIBRARIES_HERE),\
-		SRC:=$(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc,\
-		EXCLUDE_FILES:=dummyodbc.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB) \
-			$(SHARED_LIBRARY_FLAGS),\
-		LDFLAGS:=$(LIBJDBCODBC_LDFLAGS) \
-			 $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LIBS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
-		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
-		RC_FLAGS:=$(RC_FLAGS)\
-			  /D "JDK_FNAME=JdbcOdbc.dll" \
-			  /D "JDK_INTERNAL_NAME=JdbcOdbc" \
-			  /D "JDK_FTYPE=0x2L",\
-		OBJECT_DIR:=$(LIBJDBCODBC_DIR),\
-		DEBUG_SYMBOLS:=$(WINDOWS_ONLY)))
-
-$(BUILD_LIBJDBCODBC) : $(BUILD_LIBJAVA)
-
-BUILD_LIBRARIES += $(BUILD_LIBJDBCODBC)
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
-
-$(eval $(call SetupNativeCompilation,BUILD_FAKEODBCINST,\
-		LIBRARY:=odbcinst,\
-                OUTPUT_DIR:=$(LIBJDBCODBC_DIR),\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
-		INCLUDE_FILES:=dummyodbc1.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(CFLAGS_JDKLIB),\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
-		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
-
-$(eval $(call SetupNativeCompilation,BUILD_FAKEODBC,\
-		LIBRARY:=odbc,\
-                OUTPUT_DIR:=$(LIBJDBCODBC_DIR),\
-		SRC:=$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc,\
-		INCLUDE_FILES:=dummyodbc2.c,\
-		LANG:=C,\
-		OPTIMIZATION:=LOW, \
-		CFLAGS:=$(LIBJDBCODBC_CFLAGS) $(CFLAGS_JDKLIB),\
-		LDFLAGS:=$(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN) $(LIBJDBCODBC_LDFLAGS),\
-		LDFLAGS_SUFFIX:=$(LDFLAGS_JDKLIB_SUFFIX) $(LIBJDBCODBC_SONAME),\
-		OBJECT_DIR:=$(LIBJDBCODBC_DIR)))
-
-$(BUILD_FAKEODBCINST) $(BUILD_FAKEODBC) : \
-  $(BUILD_LIBJAVA)
-
-$(BUILD_LIBJDBCODBC) : $(BUILD_FAKEODBCINST) $(BUILD_FAKEODBC)
-
-endif
-
-endif
-endif
-
-##########################################################################################
-
 LIBINSTRUMENT_SRC   :=$(JDK_TOPDIR)/src/share/instrument \
                       $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
                       $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
--- a/jdk/makefiles/CopyIntoClasses.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/makefiles/CopyIntoClasses.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -189,12 +189,6 @@
 endif
 
 ifndef OPENJDK
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-    ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc/META-INF
-endif
-endif
-
-ifndef OPENJDK
     ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/java2d/cmm/kcms/META-INF
 endif
 
--- a/jdk/makefiles/CreateJars.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/makefiles/CreateJars.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -249,7 +249,6 @@
 ifeq ($(OPENJDK_TARGET_OS), macosx)
         RT_JAR_EXCLUDES += com/sun/nio/sctp \
                            sun/nio/ch/sctp \
-                           sun/jdbc \
                            sun/nio/ch/DevPollArrayWrapper\$$$$Updator.class \
                            sun/nio/ch/DevPollArrayWrapper.class \
                            sun/nio/ch/DevPollSelectorImpl.class \
--- a/jdk/makefiles/GensrcMisc.gmk	Fri Oct 26 21:34:24 2012 +0100
+++ b/jdk/makefiles/GensrcMisc.gmk	Sat Oct 27 09:18:29 2012 +0100
@@ -77,32 +77,6 @@
 
 ##########################################################################################
 
-ifndef OPENJDK
-ifneq ($(OPENJDK_TARGET_OS), windows)
-ifneq ($(OPENJDK_TARGET_OS), macosx)
-    # These file(s) are needed for building fake .so libs on !windows for jdbcodbc
-
-    $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c : 
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(ECHO) Creating $@
-	$(PRINTF) "void dummyOdbc(void){}\n" > $@
-	$(ECHO) Created $@
-
-    $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc2.c : 
-	$(MKDIR) -p $(@D)
-	$(RM) $@
-	$(ECHO) Creating $@
-	$(PRINTF) "void dummyOdbc(void){}\n" > $@
-	$(ECHO) Created $@
-
-    GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c $(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc2.c
-endif
-endif
-endif
-
-##########################################################################################
-
 GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java
 
 GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch