[llvm-commits] [llvm] r76658 - /llvm/trunk/test/Makefile
Bob Wilson
bob.wilson at apple.com
Tue Jul 21 14:56:47 PDT 2009
Author: bwilson
Date: Tue Jul 21 16:56:46 2009
New Revision: 76658
URL: http://llvm.org/viewvc/llvm-project?rev=76658&view=rev
Log:
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.
Modified:
llvm/trunk/test/Makefile
Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=76658&r1=76657&r2=76658&view=diff
==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Tue Jul 21 16:56:46 2009
@@ -99,6 +99,11 @@
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 @@
@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
More information about the llvm-commits
mailing list