| Index: Makefile.nacl
|
| diff --git a/Makefile.nacl b/Makefile.nacl
|
| index 34bd960fed1cb5bfcaf9fe3336724076c75ac9bd..07ef39030e6e8e4fd8bb761911c7be2aa9c7584e 100644
|
| --- a/Makefile.nacl
|
| +++ b/Makefile.nacl
|
| @@ -36,41 +36,29 @@ NACL_BUILDS = $(foreach mode,$(MODES), \
|
| $(addsuffix .$(mode),$(NACL_ARCHES)))
|
|
|
| HOST_OS = $(shell uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')
|
| -ifeq ($(HOST_OS), linux)
|
| - TOOLCHAIN_DIR = linux_x86_glibc
|
| -else
|
| - ifeq ($(HOST_OS), mac)
|
| - TOOLCHAIN_DIR = mac_x86_glibc
|
| - else
|
| - $(error Host platform "${HOST_OS}" is not supported)
|
| - endif
|
| -endif
|
| -
|
| TOOLCHAIN_PATH = $(realpath ${NACL_SDK_ROOT}/toolchain)
|
| -NACL_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}
|
| +NACL_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/linux_pnacl
|
| +
|
| +ifeq ($(wildcard $(NACL_TOOLCHAIN)),)
|
| + $(error Cannot find Native Client toolchain in "${NACL_TOOLCHAIN}")
|
| +endif
|
|
|
| ifeq ($(ARCH), nacl_ia32)
|
| GYPENV = nacl_target_arch=nacl_ia32 v8_target_arch=arm v8_host_arch=ia32
|
| - TOOLCHAIN_ARCH = x86-4.4
|
| - NACL_CC = "$(NACL_TOOLCHAIN)/bin/i686-nacl-gcc"
|
| - NACL_CXX = "$(NACL_TOOLCHAIN)/bin/i686-nacl-g++"
|
| - NACL_LINK = "$(NACL_TOOLCHAIN)/bin/i686-nacl-g++"
|
| + NACL_CC = "$(NACL_TOOLCHAIN)/bin/pnacl-clang --pnacl-allow-translate -arch x86-32 -target i686-unknown-nacl"
|
| + NACL_CXX = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-translate -arch x86-32 -target i686-unknown-nacl"
|
| + NACL_LINK = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-native -arch x86-32 -Wt,--noirtshim"
|
| else
|
| ifeq ($(ARCH), nacl_x64)
|
| GYPENV = nacl_target_arch=nacl_x64 v8_target_arch=arm v8_host_arch=ia32
|
| - TOOLCHAIN_ARCH = x86-4.4
|
| - NACL_CC = "$(NACL_TOOLCHAIN)/bin/x86_64-nacl-gcc"
|
| - NACL_CXX = "$(NACL_TOOLCHAIN)/bin/x86_64-nacl-g++"
|
| - NACL_LINK = "$(NACL_TOOLCHAIN)/bin/x86_64-nacl-g++"
|
| + NACL_CC = "$(NACL_TOOLCHAIN)/bin/pnacl-clang --pnacl-allow-translate -arch x86-64 -target x86_64-none-nacl-gnu"
|
| + NACL_CXX = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-translate -arch x86-64 -target x86_64-none-nacl-gnu"
|
| + NACL_LINK = "$(NACL_TOOLCHAIN)/bin/pnacl-clang++ --pnacl-allow-native -arch x86-64 -Wt,--noirtshim"
|
| else
|
| $(error Target architecture "${ARCH}" is not supported)
|
| endif
|
| endif
|
|
|
| -ifeq ($(wildcard $(NACL_TOOLCHAIN)),)
|
| - $(error Cannot find Native Client toolchain in "${NACL_TOOLCHAIN}")
|
| -endif
|
| -
|
| # For mksnapshot host generation.
|
| GYPENV += host_os=${HOST_OS}
|
|
|
| @@ -97,6 +85,7 @@ $(NACL_MAKEFILES):
|
| GYP_DEFINES="${GYPENV}" \
|
| CC=${NACL_CC} \
|
| CXX=${NACL_CXX} \
|
| + LINK=${NACL_LINK} \
|
| PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:$(PYTHONPATH)" \
|
| build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \
|
| -Ibuild/standalone.gypi --depth=. \
|
|
|