This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Tuesday 06 December 2005 19:19, Chris Lattner wrote: > This version of the patch has many bugs fixed and several rough  > corners rounded off (for example, there are no more hard coded paths  > in the makefiles anymore, and the llvm-independent objc changes are  > now in the apple branch instead of the patch). ÂAnd the patch now  > includes the new files, instead of having a tarball. A small improvement to gcc/makefile.in is attached. Instead of linking to LLVMPowerPC.o unconditionally, it now uses $(target) to link with LLVMPowerPC.o or LLVMX86.o. Rafael
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 108132)
+++ gcc/Makefile.in (working copy)
@@ -53,6 +53,10 @@ MAKEOVERRIDES =
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo
+# APPLE LOCAL begin llvm
+.SUFFIXES: .cpp
+# APPLE LOCAL end llvm
+
# -------------------------------
# Standard autoconf-set variables
# -------------------------------
@@ -210,7 +214,15 @@ reload1.o-warn = -Wno-error
# $(GCC_WARN_CFLAGS), or nothing.
WARN_CFLAGS = @warn_cflags@
+# APPLE LOCAL begin LLVM
+@checkingenabled_flag@
+LLVMBASEPATH = @LLVMBASEPATH@
+ifeq ($(LLVMBASEPATH),)
CPPFLAGS = @CPPFLAGS@
+else
+CPPFLAGS = @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS
+endif
+# APPLE LOCAL end LLVM
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
@@ -792,7 +804,34 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
# How to link with both our special library facilities
# and the system's installed libraries.
-LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY)
+# APPLE LOCAL begin LLVM
+ifneq ($(LLVMBASEPATH),)
+ifdef CHECKING_ENABLED
+BUILDMODE=Debug
+else
+BUILDMODE=Release
+endif
+LLVMLIBPATH = $(LLVMBASEPATH)/$(BUILDMODE)/lib
+
+LLVMTARGETOBJCMD := case $(target) in \
+ powerpc*-*-*) echo LLVMPowerPC.o;; \
+ i[34567]86-*-*) echo LLVMX86.o;; \
+ esac
+
+LLVMTARGETOBJ := $(shell $(LLVMTARGETOBJCMD))
+
+ifeq ($(LLVMTARGETOBJ),)
+$(error Unsuported LLVM Target $(target))
+endif
+
+LLVMLIBS = -L$(LLVMLIBPATH) $(LLVMLIBPATH)/$(LLVMTARGETOBJ) -lLLVMScalarOpts \
+ -lLLVMTransformUtils -lLLVMAnalysis \
+ $(LLVMLIBPATH)/LLVMSelectionDAG.o $(LLVMLIBPATH)/LLVMCodeGen.o \
+ -lLLVMTarget \
+ $(LLVMLIBPATH)/LLVMCore.o -lLLVMSupport -lLLVMSystem -lstdc++
+endif
+LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LLVMLIBS)
+# APPLE LOCAL end LLVM
# Any system libraries needed just for GNAT.
SYSLIBS = @GNAT_LIBEXC@
@@ -823,10 +862,30 @@ BUILD_VARRAY = build/varray.o
INCLUDES = -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
-I$(srcdir)/../include @INCINTL@ \
$(CPPINC) $(GMPINC)
+# APPLE LOCAL begin LLVM
+ifneq ($(LLVMBASEPATH),)
+INCLUDES += -I$(LLVMBASEPATH)/include
+endif
+# APPLE LOCAL end LLVM
.c.o:
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+# APPLE LOCAL begin LLVM
+# Disable C-only warning flags if they are present.
+ALL_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes \
+ -Wold-style-definition, $(ALL_CFLAGS)) -Wno-unused
+ALL_CXXFLAGS += -DTARGET_NAME=\"$(target_noncanonical)\"
+
+# Turn off LLVM assertions in a non-checking build.
+ifndef CHECKING_ENABLED
+ALL_CXXFLAGS += -DNDEBUG
+endif
+
+.cpp.o:
+ $(CXX) -c $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
+# APPLE LOCAL end LLVM
+
#
# Support for additional languages (other than C).
# C can be supported this way too (leave for later).
@@ -966,11 +1025,23 @@ OBJS-md = $(out_object_file)
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) tree-inline.o \
cgraph.o cgraphunit.o tree-nomudflap.o
-OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive)
+# APPLE LOCAL begin LLVM
+ifneq ($(LLVMBASEPATH),)
+LLVM_OBJECTS = llvm-backend.o llvm-convert.o llvm-types.o
+endif
+OBJS = $(OBJS-common) $(LLVM_OBJECTS) $(out_object_file) $(OBJS-archive)
+# APPLE LOCAL end LLVM
OBJS-onestep = libbackend.o $(OBJS-archive)
-BACKEND = main.o @TREEBROWSER@ libbackend.a $(CPPLIB)
+# APPLE LOCAL begin LLVM
+ifneq ($(LLVMBASEPATH),)
+MAIN_OBJ = llvm-main.o
+else
+MAIN_OBJ = main.o
+endif
+BACKEND = $(MAIN_OBJ) @TREEBROWSER@ libbackend.a $(CPPLIB)
+# APPLE LOCAL end LLVM
# Files to be copied after each stage in building.
STAGECOPYSTUFF = insn-flags.h insn-config.h insn-codes.h \
@@ -2266,6 +2337,15 @@ pretty-print.o: $(CONFIG_H) $(SYSTEM_H)
$(TREE_H)
errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
+# APPLE LOCAL begin LLVM
+llvm-main.o : llvm-main.cpp $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h
+ALL_HEADERS = $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
+ llvm.h llvm-internal.h llvm-file-ostream.h llvm-abi.h
+llvm-backend.o : llvm-backend.cpp $(ALL_HEADERS)
+llvm-convert.o : llvm-convert.cpp $(ALL_HEADERS)
+llvm-types.o : llvm-types.cpp $(ALL_HEADERS)
+# APPLE LOCAL end LLVM
+
$(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) $(GGC_H) \
$(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(TARGET_H) libfuncs.h \
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |