Small Request for review: 7005007 - Refine use of ALT_COMPILER_PATH to avoid conflict with JPRT usage
Kelly O'Hair
kelly.ohair at oracle.com
Tue Dec 7 08:36:37 PST 2010
On Dec 7, 2010, at 3:26 AM, David Holmes wrote:
> Simple fix to avoid conflicting use of ALT_COMPILER_PATH.
>
> http://cr.openjdk.java.net/~dholmes/7005007/
>
> Tested with JPRT linux builds and doing an internal cross-compile
> build.
>
> Thanks,
> David Holmes
IF nm doesn't exist, then this shell script will fail, but return exit
code 0, and the makefile
will not stop but create a bogus mapfile, which may or may not allow
libjvm.so to link.
I think this shell script needs to use 'set -e' or do something like
(nm || exit 1) | awk
or maybe both. Can we fix this shell script?
In addition. I'd like to see some makefile verifications that the
tools actually exist, something like
# Check fullpath tool
define filecheck # fullpath
$(if $(wildcard $1),$1,$(error "ERROR: File does not exist: $1"))
endef
# Check tools
ifdef CROSS_COMPILE_ARCH
ifdef ALT_COMPILER_PATH
CC := $(call filecheck,$(ALT_COMPILER_PATH)/gcc)
CPP := $(call filecheck,$(ALT_COMPILER_PATH)/g++)
NM := $(call filecheck,$(ALT_COMPILER_PATH)/nm)
STRIP := $(call filecheck,$(ALT_COMPILER_PATH)/strip)
endif
endif
-----
We also need to make sure we document this in the README-builds.html
file, but that can be
done some other time since it is in a different repository..
-kto
More information about the hotspot-runtime-dev
mailing list