From b2f8806fdf7f62bf13892826bf2a196824438640 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 21 Jul 2009 21:56:46 +0000 Subject: Fix ocaml tests for 64-bit MacOS systems. LLVM is currently built as 32-bit code by default, and if gcc defaults to 64-bit code then ocamlc requires a -cc "gcc -arch i386" option. We were hardcoding -cc g++ and throwing away any other compiler options that were determined when ocamlc was configured and built. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76658 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/Makefile') diff --git a/test/Makefile b/test/Makefile index e02daa0725..baae5021a3 100644 --- a/test/Makefile +++ b/test/Makefile @@ -99,6 +99,11 @@ else BUGPOINT_TOPTS="" endif +ifneq ($(OCAMLC),) +CC_FOR_OCAMLC := $(shell $(OCAMLC) -config | grep native_c_compiler | sed -e 's/native_c_compiler: //') +CXX_FOR_OCAMLC := $(patsubst gcc,g++,$(CC_FOR_OCAMLC)) +endif + FORCE: site.exp: FORCE @@ -127,7 +132,7 @@ site.exp: FORCE @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp - @echo 'set ocamlc "$(OCAMLC) -cc $(CXX) -I $(LibDir)/ocaml"' >> site.tmp + @echo 'set ocamlc "$(OCAMLC) -cc \"$(CXX_FOR_OCAMLC)\" -I $(LibDir)/ocaml"' >> site.tmp @echo 'set valgrind "$(VALGRIND)"' >> site.tmp @echo 'set grep "$(GREP)"' >>site.tmp @echo 'set gas "$(GAS)"' >>site.tmp -- cgit v1.2.3-18-g5258