Fix some problems linking stuff in libTarget.
[oota-llvm.git] / Makefile.rules
index b9b0a2b5b7278dd135ab36999bb0beea38f87216..aa9e592d0d79db9872266f3fd5177a73a31d504a 100644 (file)
@@ -269,9 +269,6 @@ endif
 ifndef LLVMAS
 LLVMAS   := $(LLVMToolDir)/llvm-as$(EXEEXT)
 endif
-ifndef BURG
-BURG     := $(LLVMToolDir)/burg$(EXEEXT)
-endif
 ifndef TBLGEN
 TBLGEN   := $(LLVMToolDir)/tblgen$(EXEEXT)
 endif
@@ -362,7 +359,11 @@ endif
 # If we are building a universal binary on Mac OS/X, pass extra options.  This is
 # useful to people that want to link the LLVM libraries into their universal apps.
 ifdef UNIVERSAL
-  CompileCommonOpts += -arch i386 -arch ppc -isysroot /Developer/SDKs/MACOSX10.4u.sdk/
+  CompileCommonOpts += \
+      -arch i386 -arch ppc -isysroot /Developer/SDKs/MACOSX10.4u.sdk/
+  Relink.Flags := -XCClinker -arch -XCClinker i386 -XCClinker -arch \
+      -XCClinker ppc -XCClinker \
+      -isysroot -XCClinker /Developer/SDKs/MACOSX10.4u.sdk/
   DISABLE_AUTO_DEPENDENCIES=1
 endif
 
@@ -397,13 +398,12 @@ Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -E
 Link          = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
                $(CompileCommonOpts) $(LD.Flags) $(Strip)
 Relink        = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \
-                $(CompileCommonOpts)
+                $(CompileCommonOpts) $(Relink.Flags)
 LTInstall     = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) \
                $(Install.Flags)
 ProgInstall   = $(INSTALL) $(Install.StripFlag) -m 0755 
 ScriptInstall = $(INSTALL) -m 0755 
 DataInstall   = $(INSTALL) -m 0644
-Burg          = $(BURG) -I $(PROJ_SRC_DIR)
 TableGen      = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include
 Archive       = $(AR) $(AR.Flags)
 LArchive      = $(LLVMToolDir)/llvm-ar rcsf
@@ -604,21 +604,6 @@ ifdef ENABLE_X86_JIT
   JIT_LIBS += LLVMX86 LLVMSelectionDAG
 endif
 
-# You can enable the SparcV9 JIT on a non-SparcV9 host by setting the flag
-# ENABLE_SPARCV9_JIT on the make command line. If not, it will still be
-# enabled automagically on an SparcV9 host.
-ifeq ($(ARCH), Sparc)
-  ENABLE_SPARCV9_JIT = 1
-endif
-
-# What the Sparc JIT requires
-ifdef ENABLE_SPARCV9_JIT
-  JIT_LIBS += LLVMSparcV9 LLVMSparcV9ModuloSched LLVMSparcV9InstrSched \
-              LLVMSparcV9LiveVar LLVMInstrumentation.a \
-              LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \
-              LLVMDataStructure LLVMSparcV9RegAlloc
-endif
-
 # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag
 # ENABLE_PPC_JIT on the make command line. If not, it will still be
 # enabled automagically on an PowerPC host.
@@ -644,7 +629,7 @@ ifdef ENABLE_ALPHA_JIT
 endif
 
 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
-            LLVMBCReader LLVMCore LLVMSupport.a LLVMTarget.a LLVMbzip2 \
+            LLVMBCReader LLVMTarget.a LLVMCore LLVMSupport.a LLVMbzip2 \
             LLVMSystem.a $(PLATFORMLIBDL)
 endif