diff --git a/make/common/Defs-linux.gmk b/make/common/Defs-linux.gmk index 4541ec8b82974534c5b926c2cb2ec3c4866af64c..fcaad70af32c98d7f5c4662081285a76342496ef 100644 --- a/make/common/Defs-linux.gmk +++ b/make/common/Defs-linux.gmk @@ -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 @@ -107,6 +107,8 @@ CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 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) @@ -143,11 +145,9 @@ endif # # 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) @@ -219,8 +219,19 @@ ifdef LIBRARY # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. # Try: 'readelf -d lib*.so' to see these settings in a library. # - LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN - LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) + Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin + Z_ORIGIN_FLAG/i586 = -Xlinker -z -Xlinker origin + Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin + Z_ORIGIN_FLAG/ia64 = -Xlinker -z -Xlinker origin + Z_ORIGIN_FLAG/arm = + Z_ORIGIN_FLAG/ppc = + Z_ORIGIN_FLAG/zero = -Xlinker -z -Xlinker origin + + LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY)) + + LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN + LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%) + endif EXTRA_LIBS += -lc @@ -315,7 +326,6 @@ override LIBNSL = override LIBTHREAD = override MOOT_PRIORITIES = true override NO_INTERRUPTIBLE_IO = true -override OPENWIN_HOME = /usr/X11R6 ifeq ($(ARCH), amd64) override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 else @@ -359,3 +369,9 @@ else 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 diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk index 2ff1ea45f0d3743e92f95632751df6a2b4c72dde..8ece69eba90b1da7a67faa30be3bacbc69705d35 100644 --- a/make/common/Defs.gmk +++ b/make/common/Defs.gmk @@ -115,11 +115,36 @@ endif include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk +# +# Cross-compilation Settings +# +ifdef CROSS_COMPILE_ARCH + # Can't run the tools we just built + USE_ONLY_BOOTDIR_TOOLS = true + + # When cross-compiling CC generates code for the target, but + # some parts of the build generate C code that has to be compiled + # and executed on the build host - HOST_CC is the 'local' compiler. + # For linux the default is /usr/bin/gcc; other platforms need to + # set it explicitly + ifeq ($(PLATFORM), linux) + ifndef HOST_CC + HOST_CC = $(USRBIN_PATH)gcc + endif + endif +else + # Must set HOST_CC if not already set + ifndef HOST_CC + HOST_CC = $(CC) + endif +endif + # Reset the VM name for client-only builds ifdef BUILD_CLIENT_ONLY VM_NAME = client endif + # # Freetype logic is applicable to OpenJDK only # @@ -339,8 +364,7 @@ endif INCLUDES = -I. -I$(CLASSHDRDIR) \ $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES) -OTHER_CPPFLAGS = $(INCLUDES) - +OTHER_CPPFLAGS += $(INCLUDES) # # vpaths. These are the default locations searched for source files. @@ -471,9 +495,11 @@ CXXFLAGS_$(VARIANT)/BYFILE = $(CXXFLAGS_$(VARIANT)/$(@F)) \ # # Tool flags # +# EXTRA_CFLAGS are used to define cross-compilation options +# ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS) -CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) -CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) +CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(EXTRA_CFLAGS) +CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(EXTRA_CFLAGS) CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \ $(DEFINES) $(OPTIONS:%=-D%) LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) diff --git a/make/common/Program.gmk b/make/common/Program.gmk index 040bcc50719ad33b1ba326898bbc558db44fe3f0..dc0baec883659f2d3ecca5ebe30a05410f5fd68b 100644 --- a/make/common/Program.gmk +++ b/make/common/Program.gmk @@ -83,7 +83,7 @@ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems endif endif ifeq ($(PLATFORM), linux) - LDFLAGS += -Wl,-z -Wl,origin + LDFLAGS += $(LDFLAG_Z_ORIGIN) LDFLAGS += -Wl,--allow-shlib-undefined LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli diff --git a/make/common/shared/Defs-linux.gmk b/make/common/shared/Defs-linux.gmk index db1307056d18fc378543e43dcd68f38f095aa317..4960ecd4de9d577ac602b380608436e6b6018263 100644 --- a/make/common/shared/Defs-linux.gmk +++ b/make/common/shared/Defs-linux.gmk @@ -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 @@ else 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 =/usr/X11R6/ +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" @@ -181,6 +189,7 @@ HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH) # 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 define binary_file_verification # binary_file ( \ $(ECHO) "Checking for mapfile use in: $1" && \ @@ -193,4 +202,10 @@ define binary_file_verification # binary_file ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \ ) endef - +else +define binary_file_verification +( \ + $(ECHO) "Skipping binary file verification for cross-compile build" \ +) +endef +endif \ No newline at end of file diff --git a/make/common/shared/Defs-solaris.gmk b/make/common/shared/Defs-solaris.gmk index 177af974855e6c94b477fefa7b528dc851cee600..7e5c90a20ba62641442cbc79d39aefa06b683337 100644 --- a/make/common/shared/Defs-solaris.gmk +++ b/make/common/shared/Defs-solaris.gmk @@ -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 @@ -190,6 +190,7 @@ HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH) # 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 define binary_file_verification # binary_file ( \ $(ECHO) "Checking for mapfile use in: $1" && \ @@ -202,4 +203,10 @@ define binary_file_verification # binary_file ( $(DUMP) -L -v $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \ ) endef - +else +define binary_file_verification +( \ + $(ECHO) "Skipping binary file verification for cross-compile build" \ +) +endef +endif \ No newline at end of file diff --git a/make/common/shared/Defs-utils.gmk b/make/common/shared/Defs-utils.gmk index 8672936bae112d1eb4a894feb5778c4bcc3f15be..674330146fb927472cb1ed3d33c7e1d35c60a1f7 100644 --- a/make/common/shared/Defs-utils.gmk +++ b/make/common/shared/Defs-utils.gmk @@ -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 @@ -68,9 +68,23 @@ ifeq ($(PLATFORM),windows) endif # Utilities +ifdef CROSS_COMPILE_ARCH + AR = $(COMPILER_PATH)ar + AS = $(COMPILER_PATH)as + LD = $(COMPILER_PATH)ld + MCS = $(COMPILER_PATH)mcs + NM = $(COMPILER_PATH)nm + STRIP = $(COMPILER_PATH)strip +else + AR = $(UTILS_CCS_BIN_PATH)ar + AS = $(UTILS_CCS_BIN_PATH)as + LD = $(UTILS_CCS_BIN_PATH)ld + MCS = $(UTILS_CCS_BIN_PATH)mcs + NM = $(UTILS_CCS_BIN_PATH)nm + STRIP = $(UTILS_CCS_BIN_PATH)strip +endif + ADB = $(UTILS_COMMAND_PATH)adb -AR = $(UTILS_CCS_BIN_PATH)ar -AS = $(UTILS_CCS_BIN_PATH)as BASENAME = $(UTILS_COMMAND_PATH)basename BZIP2 = $(UTILS_COMMAND_PATH)bzip2 CAT = $(UTILS_COMMAND_PATH)cat @@ -99,19 +113,16 @@ HEAD = $(UTILS_USR_BIN_PATH)head ID = $(UTILS_COMMAND_PATH)id ISAINFO = $(UTILS_COMMAND_PATH)isainfo KSH = $(UTILS_COMMAND_PATH)ksh -LD = $(UTILS_CCS_BIN_PATH)ld LDD = $(UTILS_USR_BIN_PATH)ldd LEX = $(UTILS_CCS_BIN_PATH)lex LN = $(UTILS_COMMAND_PATH)ln LS = $(UTILS_COMMAND_PATH)ls -MCS = $(UTILS_CCS_BIN_PATH)mcs M4 = $(UTILS_CCS_BIN_PATH)m4 MKDIR = $(UTILS_COMMAND_PATH)mkdir MKSINFO = $(UTILS_COMMAND_PATH)mksinfo MSGFMT = $(UTILS_USR_BIN_PATH)msgfmt MV = $(UTILS_COMMAND_PATH)mv NAWK = $(UTILS_USR_BIN_PATH)nawk -NM = $(UTILS_CCS_BIN_PATH)nm PKGMK = $(UTILS_COMMAND_PATH)pkgmk PRINTF = $(UTILS_USR_BIN_PATH)printf PWD = $(UTILS_COMMAND_PATH)pwd @@ -123,7 +134,6 @@ SED = $(UTILS_COMMAND_PATH)sed SH = $(UTILS_COMMAND_PATH)sh SHOWREV = $(UTILS_USR_BIN_PATH)showrev SORT = $(UTILS_COMMAND_PATH)sort -STRIP = $(UTILS_CCS_BIN_PATH)strip TAIL = $(UTILS_USR_BIN_PATH)tail TAR = $(UTILS_COMMAND_PATH)tar TEST = $(UTILS_USR_BIN_PATH)test @@ -186,14 +196,16 @@ ifeq ($(PLATFORM),linux) # Intrinsic unix command, with backslash-escaped character interpretation ECHO = /bin/echo -e # These are really in UTILS_USR_BIN_PATH on Linux - AR = $(UTILS_USR_BIN_PATH)ar - AS = $(UTILS_USR_BIN_PATH)as - LD = $(UTILS_USR_BIN_PATH)ld + ifndef CROSS_COMPILE_ARCH + AR = $(UTILS_USR_BIN_PATH)ar + AS = $(UTILS_USR_BIN_PATH)as + LD = $(UTILS_USR_BIN_PATH)ld + MCS = $(UTILS_USR_BIN_PATH)mcs + NM = $(UTILS_USR_BIN_PATH)nm + STRIP = $(UTILS_USR_BIN_PATH)strip + endif LEX = $(UTILS_USR_BIN_PATH)lex - MCS = $(UTILS_USR_BIN_PATH)mcs M4 = $(UTILS_USR_BIN_PATH)m4 - NM = $(UTILS_USR_BIN_PATH)nm - STRIP = $(UTILS_USR_BIN_PATH)strip YACC = $(UTILS_USR_BIN_PATH)yacc endif diff --git a/make/common/shared/Defs-versions.gmk b/make/common/shared/Defs-versions.gmk index 5bfd708485fd5881e4ed07e58a1f363010b6329d..9521e66c9965177e117f9d98430a2bb5f99b615f 100644 --- a/make/common/shared/Defs-versions.gmk +++ b/make/common/shared/Defs-versions.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 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 @@ -138,11 +138,15 @@ ifeq ($(PLATFORM), solaris) endif REQUIRED_COMPILER_NAME = Sun Studio 12 Update 1 REQUIRED_COMPILER_VERSION = SS12u1 - ifeq ($(CC_VERSION),sun) - REQUIRED_CC_VER = 5.10 - endif - ifeq ($(CC_VERSION),gcc) - REQUIRED_CC_VER = 3.4.3 + # Cross-compilation compiler versions are target specific + # so don't set a required version if cross-compiling + ifndef CROSS_COMPILE_ARCH + ifeq ($(CC_VERSION),sun) + REQUIRED_CC_VER = 5.10 + endif + ifeq ($(CC_VERSION),gcc) + REQUIRED_CC_VER = 3.4.3 + endif endif REQUIRED_GCC_VER = 2.95.2 endif @@ -158,11 +162,15 @@ ifeq ($(PLATFORM), linux) REQUIRED_COMPILER_NAME = GCC4 REQUIRED_COMPILER_VERSION = GCC4 REQUIRED_GCC_VER = 2.95 - ifeq ($(CC_VERSION),gcc) - REQUIRED_CC_VER = 4.3.0 - endif - ifeq ($(CC_VERSION),sun) - REQUIRED_CC_VER = 5.10 + # Cross-compilation compiler versions are target specific + # so don't set a required version if cross-compiling + ifndef CROSS_COMPILE_ARCH + ifeq ($(CC_VERSION),gcc) + REQUIRED_CC_VER = 4.3.0 + endif + ifeq ($(CC_VERSION),sun) + REQUIRED_CC_VER = 5.10 + endif endif endif diff --git a/make/common/shared/Platform.gmk b/make/common/shared/Platform.gmk index 91326a9f79484674027e63009ae37c50de9c2e4c..d789f221b7f62710c40cc5dcd20d2f1a3f6e3c5d 100644 --- a/make/common/shared/Platform.gmk +++ b/make/common/shared/Platform.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 20010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 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 @@ -155,7 +155,11 @@ endif ifeq ($(SYSTEM_UNAME), Linux) PLATFORM = linux # Arch and OS name/version - mach := $(shell uname -m) + ifdef CROSS_COMPILE_ARCH + mach := $(CROSS_COMPILE_ARCH) + else + mach := $(shell uname -m) + endif archExpr = case "$(mach)" in \ i[3-9]86) \ echo i586 \ @@ -192,11 +196,13 @@ ifeq ($(SYSTEM_UNAME), Linux) ARCH=sparcv9 endif else - # i586 is 32-bit, amd64 is 64-bit + # Most archs are 32-bit ifndef ARCH_DATA_MODEL - ifeq ($(ARCH), i586) - ARCH_DATA_MODEL=32 - else + ARCH_DATA_MODEL=32 + ifeq ($(ARCH), amd64) + ARCH_DATA_MODEL=64 + endif + ifeq ($(ARCH), ia64) ARCH_DATA_MODEL=64 endif endif diff --git a/make/common/shared/Sanity-Settings.gmk b/make/common/shared/Sanity-Settings.gmk index ce89bd960921c032c84beb96cfe7fd47a3ce22c8..0184a74792d712692b43fbf3075405695486fa26 100644 --- a/make/common/shared/Sanity-Settings.gmk +++ b/make/common/shared/Sanity-Settings.gmk @@ -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 @@ -104,7 +104,11 @@ ifeq ($(PLATFORM),windows) endif ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME) ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION) -ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER) +ifdef REQUIRED_CC_VER + ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER) +else + ALL_SETTINGS+=$(call addOptionalSetting,CC_VER) +endif ifeq ($(PLATFORM),solaris) ifeq ($(ARCH_DATA_MODEL), 32) ifndef OPENJDK diff --git a/make/common/shared/Sanity.gmk b/make/common/shared/Sanity.gmk index 0534277aa145bdf5858ef190b2afb032dd90a303..127c9009811df3fe5897cf84e4110a747492b009 100644 --- a/make/common/shared/Sanity.gmk +++ b/make/common/shared/Sanity.gmk @@ -817,23 +817,26 @@ sane-cacerts: ###################################################### ifdef OPENJDK - -# The freetypecheck Makefile prints out "Failed" if not good enough -$(TEMPDIR)/freetypeinfo: FRC + ifndef CROSS_COMPILE_ARCH + # The freetypecheck Makefile prints out "Failed" if not good enough + $(TEMPDIR)/freetypeinfo: FRC @$(prep-target) @(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \ $(ECHO) "Failed to build freetypecheck." ) > $@ -sane-freetype: $(TEMPDIR)/freetypeinfo + sane-freetype: $(TEMPDIR)/freetypeinfo @if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \ $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \ " or higher is required. \n" \ "`$(CAT) $<` \n" >> $(ERROR_FILE) ; \ fi - + else + #do nothing (cross-compiling) + sane-freetype: + endif else -#do nothing (not OpenJDK) -sane-freetype: + #do nothing (not OpenJDK) + sane-freetype: endif ###################################################### @@ -1343,13 +1346,16 @@ endif ###################################################### # Check the compiler version(s) ###################################################### -CC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER)) +ifdef REQUIRED_CC_VER + CC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER)) +endif sane-compiler: sane-link +ifdef REQUIRED_CC_VER @if [ "$(CC_CHECK)" = "missing" ]; then \ $(ECHO) "ERROR: The Compiler version is undefined. \n" \ "" >> $(ERROR_FILE) ; \ fi -ifndef OPENJDK + ifndef OPENJDK @if [ "$(CC_CHECK)" != "same" ]; then \ $(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(REQUIRED_COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \ " Specifically the $(REQUIRED_COMPILER_NAME) compiler. \n " \ @@ -1358,6 +1364,7 @@ ifndef OPENJDK " $(COMPILER_PATH) \n" \ "" >> $(WARNING_FILE) ; \ fi + endif endif ###################################################### diff --git a/make/java/instrument/Makefile b/make/java/instrument/Makefile index a2944e73ea0fe21ece8bf617091d5662de2b84a5..7a2fbf1f8b0fafee34ebc794fc0525f067217912 100644 --- a/make/java/instrument/Makefile +++ b/make/java/instrument/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2003, 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,7 +109,7 @@ else LDFLAGS += -R \$$ORIGIN/jli endif ifeq ($(PLATFORM), linux) - LDFLAGS += -Wl,-z -Wl,origin + LDFLAGS += $(LDFLAG_Z_ORIGIN) LDFLAGS += -Wl,--allow-shlib-undefined LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli endif diff --git a/make/java/nio/Makefile b/make/java/nio/Makefile index ab5a0bdf1f00583a2152ff1ece16dd8038c41184..4c55385607ee405e40377be0594a25d805c76f2c 100644 --- a/make/java/nio/Makefile +++ b/make/java/nio/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 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 @@ -820,7 +820,7 @@ $(TEMPDIR)/$(GENSOR_SRC) : $(GENSOR_SRC) $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC) $(prep-target) - ($(CD) $(TEMPDIR); $(CC) $(CPPFLAGS) $(LDDFLAGS) \ + ($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS) $(LDDFLAGS) \ -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC)) $(SCH_GEN)/SocketOptionRegistry.java: $(GENSOR_EXE) @@ -851,7 +851,7 @@ GENUC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENUC_SRC) | \ $(GENUC_EXE) : $(GENUC_SRC) $(prep-target) - $(CC) $(CPPFLAGS) -o $@ $(GENUC_SRC) + $(HOST_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC) $(SFS_GEN)/UnixConstants.java: $(GENUC_EXE) $(prep-target) @@ -867,7 +867,7 @@ GENSC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSC_SRC) | \ $(GENSC_EXE) : $(GENSC_SRC) $(prep-target) - $(CC) $(CPPFLAGS) -o $@ $(GENSC_SRC) + $(HOST_CC) $(CPPFLAGS) -o $@ $(GENSC_SRC) $(SFS_GEN)/SolarisConstants.java: $(GENSC_EXE) $(prep-target) diff --git a/make/javax/sound/SoundDefs.gmk b/make/javax/sound/SoundDefs.gmk index 5fad9a287b0c9eb7d7fcedc3f82b173e121ede9e..557c773182a3b9ad7adcceac8aed0d217507338c 100644 --- a/make/javax/sound/SoundDefs.gmk +++ b/make/javax/sound/SoundDefs.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2002, 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 @@ -73,6 +73,15 @@ else ifeq ($(ARCH), amd64) CPPFLAGS += -DX_ARCH=X_AMD64 endif # ARCH amd64 + + ifeq ($(ARCH), arm) + CPPFLAGS += -DX_ARCH=X_ARM + endif # ARCH arm + + ifeq ($(ARCH), ppc) + CPPFLAGS += -DX_ARCH=X_PPC + endif # ARCH ppc + endif diff --git a/make/sun/jdbc/Makefile b/make/sun/jdbc/Makefile index f3d9fea8eb14ae331f2d03552e3ea3b0008c2a75..9b45d6bf8b01127532dce5e46f3b945f4d0b62e4 100644 --- a/make/sun/jdbc/Makefile +++ b/make/sun/jdbc/Makefile @@ -61,7 +61,7 @@ ifneq ($(PLATFORM), windows) # ODBC_LIBRARY_LOCATION, and delete the variable assignments below. # # Tell linker to ignore missing externals when building this shared library. - LDFLAGS_DEFS_OPTION = -z nodefs + 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 diff --git a/make/tools/Makefile b/make/tools/Makefile index bd09a0b9b8ebf4f1f844bab2e9df2a7ec87a2cba..13fc5c9c31b02b02df7de6130c51cab97dbce801 100644 --- a/make/tools/Makefile +++ b/make/tools/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1998, 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 @@ -30,6 +30,7 @@ BUILDDIR = .. include $(BUILDDIR)/common/Defs.gmk +# Note: freetypecheck is built by Sanity.gmk if needed SUBDIRS = \ addjsum \ buildmetaindex \ @@ -38,7 +39,6 @@ SUBDIRS = \ compile_properties \ dir_diff \ dtdbuilder \ - freetypecheck \ generate_break_iterator \ GenerateCharacter \ generatecurrencydata \ diff --git a/src/share/native/com/sun/media/sound/SoundDefs.h b/src/share/native/com/sun/media/sound/SoundDefs.h index 5ac73451681f1846e24446175761f34f905a6beb..f141ea62ac2c8e994380cbe453d4755d6f303a2e 100644 --- a/src/share/native/com/sun/media/sound/SoundDefs.h +++ b/src/share/native/com/sun/media/sound/SoundDefs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -39,6 +39,8 @@ #define X_IA64 4 #define X_AMD64 5 #define X_ZERO 6 +#define X_ARM 7 +#define X_PPC 8 // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly. diff --git a/src/share/native/java/lang/fdlibm/include/fdlibm.h b/src/share/native/java/lang/fdlibm/include/fdlibm.h index 2b3592dc14344fc017f7f39f36e6b54f8e6cd228..196bb0d8e021bdca727b00be7dad257319825480 100644 --- a/src/share/native/java/lang/fdlibm/include/fdlibm.h +++ b/src/share/native/java/lang/fdlibm/include/fdlibm.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 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 @@ -28,8 +28,8 @@ #ifdef __NEWVALID /* special setup for Sun test regime */ #if defined(i386) || defined(i486) || \ - defined(intel) || defined(x86) || \ - defined(i86pc) || defined(_M_IA64) || defined(ia64) + defined(intel) || defined(x86) || defined(arm) || \ + defined(i86pc) || defined(_M_IA64) || defined(ia64) #define _LITTLE_ENDIAN #endif #endif