From 2bba41c7607b546ee34f91f5fb453a5995af6187 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 22 Dec 2004 05:57:21 +0000 Subject: [PATCH] For PR432: * Cleanup LLVMGCXX and LLVMGCC by providing LLVMGXXWITHPATH and LLVMGCCWITHPATH variables that add the $(LLVMToolDir) to the path so the CFE tools can find the right LLVM tools they depend on. * Standardize the name of a variable: cferuntime_libdir -> CFERuntimeLibDir llvm-svn: 19095 --- llvm/Makefile.rules | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index dd0d5c74409f..94252f29a68b 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -211,6 +211,7 @@ ExmplDir := $(BUILD_OBJ_ROOT)/$(BuildMode)/examples LLVMLibDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/lib LLVMToolDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/bin LExmplDir := $(LLVM_OBJ_ROOT)/$(BuildMode)/examples +CFERuntimeLibDir := $(LLVMGCCDIR)/lib #-------------------------------------------------------------------- # Full Paths To Compiled Tools and Utilities @@ -235,12 +236,6 @@ endif ifndef GCCLD GCCLD := $(LLVMToolDir)/gccld$(EXEEXT) endif -ifndef LLVMGCC -LLVMGCC := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCCDIR)/bin/gcc -endif -ifndef LLVMGXX -LLVMGXX := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCCDIR)/bin/g++ -endif ifndef LDIS LLVMDIS := $(LLVMToolDir)/llvm-dis$(EXEEXT) endif @@ -250,6 +245,8 @@ endif ifndef LOPT LOPT := $(LLVMToolDir)/opt$(EXEEXT) endif +LLVMGCCWITHPATH := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCC) +LLVMGXXWITHPATH := PATH=$(LLVMToolDir):$(PATH) $(LLVMGXX) #-------------------------------------------------------------------- # Adjust to user's request @@ -311,7 +308,8 @@ CPP.Flags += -I$(BUILD_OBJ_DIR) \ Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags) LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C) -BCCompile.C = $(LLVMGCC) $(CPP.Flags) $(CompileCommonOpts) $(C.Flags) -c +BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(CompileCommonOpts) \ + $(C.Flags) -c Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX) BCCompile.CXX = $(LLVMGXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c @@ -517,7 +515,7 @@ endif ifdef MODULE_NAME Module := $(LibDir)/$(MODULE_NAME).bc -LinkModule := $(LLVMGCC) -shared -nostdlib +LinkModule := $(LLVMGCCWITHPATH) -shared -nostdlib ifdef EXPORTED_SYMBOL_FILE LinkMOdule += -Xlinker -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) @@ -615,7 +613,7 @@ BCCompile.CXX += -Wa,-strip-debug all-local:: $(LibName.BCA) ifdef EXPORTED_SYMBOL_FILE -BCLinkLib = $(LLVMGCC) -shared -nostdlib -Xlinker \ +BCLinkLib = $(LLVMGCCWITHPATH) -shared -nostdlib -Xlinker \ -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE) $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \