From a2430c1aa08cfe58e7173c8950e2b5df32a91859 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 21 May 2015 21:51:04 +0200 Subject: Use cxx compiler to link llvm executable. --- Makefile.in | 5 ++++- src/ortho/llvm/Makefile | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 9f3e2927c..1e6c34214 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,7 +184,10 @@ all.llvm_jit: ghdl_llvm_jit ghdl_llvm_jit: GRT_FLAGS+=-DWITH_GNAT_RUN_TIME ghdl_llvm_jit: $(GRT_ADD_OBJS) $(ORTHO_DEPS) llvm-cbindings.o force - $(GNATMAKE) -o $@ $(GHDL_LLVM_INCFLAGS) $(GNATFLAGS) ghdl_jit.adb $(GNAT_BARGS) -largs llvm-cbindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++ + $(GNATMAKE) -o $@ $(GHDL_LLVM_INCFLAGS) $(GNATFLAGS) ghdl_jit.adb \ + $(GNAT_BARGS) -largs llvm-cbindings.o $(GNAT_LARGS) $(GRT_ADD_OBJS) \ + $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) --LINK=$(CXX) \ + `$(LLVM_CONFIG) --ldflags --libs --system-libs` llvm-cbindings.o: $(srcdir)/src/ortho/llvm/llvm-cbindings.cpp $(CXX) -c `$(LLVM_CONFIG) --includedir --cxxflags` \ diff --git a/src/ortho/llvm/Makefile b/src/ortho/llvm/Makefile index 0e20086c7..c52fa9723 100644 --- a/src/ortho/llvm/Makefile +++ b/src/ortho/llvm/Makefile @@ -1,6 +1,6 @@ ortho_srcdir=.. GNAT_FLAGS=-gnaty3befhkmr -gnata -gnatf -gnatwael -gnat05 -CXX=clang++ --std=c++11 +CXX=clang++ LLVM_CONFIG=llvm-config SED=sed BE=llvm @@ -10,7 +10,8 @@ all: $(ortho_exec) $(ortho_exec): $(ortho_srcdir)/llvm/ortho_llvm.ads force llvm-cbindings.o gnatmake -o $@ -aI$(ortho_srcdir)/llvm -aI$(ortho_srcdir) \ $(GNAT_FLAGS) ortho_code_main -bargs -E \ - -largs llvm-cbindings.o `$(LLVM_CONFIG) --ldflags --libs --system-libs` -lc++ #-static + -largs llvm-cbindings.o --LINK=$(CXX) \ + `$(LLVM_CONFIG) --ldflags --libs --system-libs` llvm-cbindings.o: $(ortho_srcdir)/llvm/llvm-cbindings.cpp $(CXX) -c -I`$(LLVM_CONFIG) --includedir --cflags` -o $@ $< -- cgit v1.2.3