diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2009-07-21 21:56:46 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2009-07-21 21:56:46 +0000 |
| commit | e3228acc62ef42947db919f4da3c44869366bf7c (patch) | |
| tree | 7f50644496ce2b6db1afac51830f1eb3d133e973 /llvm | |
| parent | c2a942ec545f3b945a5b4856300d61d80092e486 (diff) | |
| download | bcm5719-llvm-e3228acc62ef42947db919f4da3c44869366bf7c.tar.gz bcm5719-llvm-e3228acc62ef42947db919f4da3c44869366bf7c.zip | |
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.
llvm-svn: 76658
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/test/Makefile b/llvm/test/Makefile index e02daa07254..baae5021a3a 100644 --- a/llvm/test/Makefile +++ b/llvm/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 |

