projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reapply r79555 for testing. Daniel's trying to work out some buildbot weirdnesss.
[oota-llvm.git]
/
Makefile.rules
diff --git
a/Makefile.rules
b/Makefile.rules
index 6fe68681b1e8d4c1aee840965842a60c29065252..5556684d5b7e43fa4fc8b5fdc083502c7f275eb1 100644
(file)
--- a/
Makefile.rules
+++ b/
Makefile.rules
@@
-128,8
+128,11
@@
reconfigure:
$(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
$(ConfigStatusScript)
$(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) && \
$(ConfigStatusScript)
+# FIXME: The {PIC16,MSP430}/AsmPrinter line here is a hack to force a reconfigure to pick
+# up AsmPrinter changes. Remove it after a reasonable delay from 2009-08-13.
+
.PRECIOUS: $(ConfigStatusScript)
.PRECIOUS: $(ConfigStatusScript)
-$(ConfigStatusScript): $(ConfigureScript)
+$(ConfigStatusScript): $(ConfigureScript)
$(LLVM_SRC_ROOT)/lib/Target/PIC16/AsmPrinter/Makefile $(LLVM_SRC_ROOT)/lib/Target/MSP430/AsmPrinter/Makefile
$(Echo) Reconfiguring with $<
$(Verb) cd $(PROJ_OBJ_ROOT) && \
if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
$(Echo) Reconfiguring with $<
$(Verb) cd $(PROJ_OBJ_ROOT) && \
if test -w $(PROJ_OBJ_ROOT)/config.cache ; then \
@@
-284,7
+287,7
@@
CPP.Defines :=
# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
# this can be overridden on the make command line.
ifndef OPTIMIZE_OPTION
# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
# this can be overridden on the make command line.
ifndef OPTIMIZE_OPTION
- ifneq ($(OS),MingW)
+ ifneq ($(
HOST_
OS),MingW)
OPTIMIZE_OPTION := -O3
else
OPTIMIZE_OPTION := -O2
OPTIMIZE_OPTION := -O3
else
OPTIMIZE_OPTION := -O2
@@
-294,8
+297,8
@@
endif
ifeq ($(ENABLE_OPTIMIZED),1)
BuildMode := Release
# Don't use -fomit-frame-pointer on Darwin or FreeBSD.
ifeq ($(ENABLE_OPTIMIZED),1)
BuildMode := Release
# Don't use -fomit-frame-pointer on Darwin or FreeBSD.
- ifneq ($(OS),FreeBSD)
- ifneq ($(OS),Darwin)
+ ifneq ($(
HOST_
OS),FreeBSD)
+ ifneq ($(
HOST_
OS),Darwin)
OmitFramePointer := -fomit-frame-pointer
endif
endif
OmitFramePointer := -fomit-frame-pointer
endif
endif
@@
-303,7
+306,7
@@
ifeq ($(ENABLE_OPTIMIZED),1)
# Darwin requires -fstrict-aliasing to be explicitly enabled.
# Avoid -fstrict-aliasing on Darwin for now, there are unresolved issues
# with -fstrict-aliasing and ipa-type-escape radr://6756684
# Darwin requires -fstrict-aliasing to be explicitly enabled.
# Avoid -fstrict-aliasing on Darwin for now, there are unresolved issues
# with -fstrict-aliasing and ipa-type-escape radr://6756684
- #ifeq ($(OS),Darwin)
+ #ifeq ($(
HOST_
OS),Darwin)
# EXTRA_OPTIONS += -fstrict-aliasing -Wstrict-aliasing
#endif
CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer)
# EXTRA_OPTIONS += -fstrict-aliasing -Wstrict-aliasing
#endif
CXX.Flags += $(OPTIMIZE_OPTION) $(OmitFramePointer)
@@
-334,6
+337,12
@@
ifndef REQUIRES_EH
CXX.Flags += -fno-exceptions
endif
CXX.Flags += -fno-exceptions
endif
+ifdef REQUIRES_FRAME_POINTER
+ CXX.Flags := $(filter-out -fomit-frame-pointer,$(CXX.Flags))
+ C.Flags := $(filter-out -fomit-frame-pointer,$(C.Flags))
+ LD.Flags := $(filter-out -fomit-frame-pointer,$(LD.Flags))
+endif
+
# IF REQUIRES_RTTI=1 is specified then don't disable run-time type id
ifndef REQUIRES_RTTI
# CXX.Flags += -fno-rtti
# IF REQUIRES_RTTI=1 is specified then don't disable run-time type id
ifndef REQUIRES_RTTI
# CXX.Flags += -fno-rtti
@@
-376,10
+385,10
@@
ifdef SHARED_LIBRARY
endif
ifeq ($(ENABLE_PIC),1)
endif
ifeq ($(ENABLE_PIC),1)
- ifeq ($(
OS), $(filter $(
OS), Cygwin MingW))
+ ifeq ($(
HOST_OS), $(filter $(HOST_
OS), Cygwin MingW))
# Nothing. Win32 defaults to PIC and warns when given -fPIC
else
# Nothing. Win32 defaults to PIC and warns when given -fPIC
else
- ifeq ($(OS),Darwin)
+ ifeq ($(
HOST_
OS),Darwin)
# Common symbols not allowed in dylib files
CXX.Flags += -fno-common
C.Flags += -fno-common
# Common symbols not allowed in dylib files
CXX.Flags += -fno-common
C.Flags += -fno-common
@@
-390,17
+399,14
@@
ifeq ($(ENABLE_PIC),1)
endif
endif
else
endif
endif
else
- ifeq ($(OS),Darwin)
+ ifeq ($(
HOST_
OS),Darwin)
CXX.Flags += -mdynamic-no-pic
C.Flags += -mdynamic-no-pic
endif
endif
CXX.Flags += -mdynamic-no-pic
C.Flags += -mdynamic-no-pic
endif
endif
-CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual
-C.Flags += $(CFLAGS)
-CPP.Defines += $(CPPFLAGS)
+CXX.Flags += -Woverloaded-virtual
CPP.BaseFlags += $(CPP.Defines)
CPP.BaseFlags += $(CPP.Defines)
-LD.Flags += $(LDFLAGS)
AR.Flags := cru
# Make Floating point IEEE compliant on Alpha.
AR.Flags := cru
# Make Floating point IEEE compliant on Alpha.
@@
-417,7
+423,7
@@
ifeq ($(ARCH),Alpha)
LD.Flags += -Wl,--no-relax
endif
LD.Flags += -Wl,--no-relax
endif
-ifeq ($(OS),MingW)
+ifeq ($(
HOST_
OS),MingW)
ifeq ($(LLVM_CROSS_COMPILING),1)
# Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525016
ifdef TOOLNAME
ifeq ($(LLVM_CROSS_COMPILING),1)
# Work around http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525016
ifdef TOOLNAME
@@
-499,7
+505,7
@@
endif
# Adjust to user's request
#--------------------------------------------------------------------
# Adjust to user's request
#--------------------------------------------------------------------
-ifeq ($(OS),Darwin)
+ifeq ($(
HOST_
OS),Darwin)
DARWIN_VERSION := `sw_vers -productVersion`
# Strip a number like 10.4.7 to 10.4
DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
DARWIN_VERSION := `sw_vers -productVersion`
# Strip a number like 10.4.7 to 10.4
DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
@@
-508,9
+514,8
@@
ifeq ($(OS),Darwin)
SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress \
-dynamiclib -mmacosx-version-min=$(DARWIN_VERSION)
SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress \
-dynamiclib -mmacosx-version-min=$(DARWIN_VERSION)
- TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
else
else
- ifeq ($(OS),Cygwin)
+ ifeq ($(
HOST_
OS),Cygwin)
SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \
-Wl,--enable-auto-import -Wl,--enable-auto-image-base
else
SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \
-Wl,--enable-auto-import -Wl,--enable-auto-image-base
else
@@
-518,6
+523,10
@@
else
endif
endif
endif
endif
+ifeq ($(TARGET_OS),Darwin)
+ TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
+endif
+
# Adjust LD.Flags depending on the kind of library that is to be built. Note
# that if LOADABLE_MODULE is specified then the resulting shared library can
# be opened with dlopen.
# Adjust LD.Flags depending on the kind of library that is to be built. Note
# that if LOADABLE_MODULE is specified then the resulting shared library can
# be opened with dlopen.
@@
-555,7
+564,7
@@
ifndef KEEP_SYMBOLS
endif
# Adjust linker flags for building an executable
endif
# Adjust linker flags for building an executable
-ifneq ($(OS),Darwin)
+ifneq ($(
HOST_
OS),Darwin)
ifneq ($(DARWIN_MAJVERS),4)
ifdef TOOLNAME
ifdef EXAMPLE_TOOL
ifneq ($(DARWIN_MAJVERS),4)
ifdef TOOLNAME
ifdef EXAMPLE_TOOL
@@
-577,7
+586,7
@@
endif
CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \
$(EXTRA_OPTIONS)
CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \
$(EXTRA_OPTIONS)
-ifeq ($(OS),HP-UX)
+ifeq ($(
HOST_
OS),HP-UX)
CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
endif
CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
endif
@@
-605,7
+614,7
@@
ifdef UNIVERSAL
# Building universal cannot compute dependencies automatically.
DISABLE_AUTO_DEPENDENCIES=1
else
# Building universal cannot compute dependencies automatically.
DISABLE_AUTO_DEPENDENCIES=1
else
- ifeq ($(OS),Darwin)
+ ifeq ($(
TARGET_
OS),Darwin)
ifeq ($(ARCH),x86_64)
TargetCommonOpts = -m64
else
ifeq ($(ARCH),x86_64)
TargetCommonOpts = -m64
else
@@
-616,7
+625,7
@@
else
endif
endif
endif
endif
-ifeq ($(OS),SunOS)
+ifeq ($(
HOST_
OS),SunOS)
CPP.BaseFlags += -include llvm/System/Solaris.h
endif
CPP.BaseFlags += -include llvm/System/Solaris.h
endif
@@
-630,31
+639,35
@@
CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \
$(CPP.BaseFlags)
ifeq ($(BUILD_COMPONENT), 1)
$(CPP.BaseFlags)
ifeq ($(BUILD_COMPONENT), 1)
- Compile.C = $(BUILD_CC) $(CPP.Flags) $(C.Flags) \
+ Compile.C = $(BUILD_CC) $(CPP.Flags) $(C.Flags)
$(CFLAGS) $(CPPFLAGS)
\
$(TargetCommonOpts) $(CompileCommonOpts) -c
$(TargetCommonOpts) $(CompileCommonOpts) -c
- Compile.CXX = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) \
+ Compile.CXX = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \
+ $(CPPFLAGS) \
$(TargetCommonOpts) $(CompileCommonOpts) -c
$(TargetCommonOpts) $(CompileCommonOpts) -c
- Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(TargetCommonOpts) \
+ Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(
CPPFLAGS) $(
TargetCommonOpts) \
$(CompileCommonOpts) $(CXX.Flags) -E
$(CompileCommonOpts) $(CXX.Flags) -E
- Link = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) \
+ Link = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \
+ $(LDFLAGS) \
$(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
else
$(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
else
- Compile.C = $(CC) $(CPP.Flags) $(C.Flags) \
+ Compile.C = $(CC) $(CPP.Flags) $(C.Flags)
$(CFLAGS) $(CPPFLAGS)
\
$(TargetCommonOpts) $(CompileCommonOpts) -c
$(TargetCommonOpts) $(CompileCommonOpts) -c
- Compile.CXX = $(CXX) $(CPP.Flags) $(CXX.Flags) \
+ Compile.CXX = $(CXX) $(CPP.Flags) $(CXX.Flags)
$(CXXFLAGS) $(CPPFLAGS)
\
$(TargetCommonOpts) $(CompileCommonOpts) -c
$(TargetCommonOpts) $(CompileCommonOpts) -c
- Preprocess.CXX= $(CXX) $(CPP.Flags) $(TargetCommonOpts) \
+ Preprocess.CXX= $(CXX) $(CPP.Flags) $(TargetCommonOpts)
$(CPPFLAGS)
\
$(CompileCommonOpts) $(CXX.Flags) -E
$(CompileCommonOpts) $(CXX.Flags) -E
- Link = $(CXX) $(CPP.Flags) $(CXX.Flags) \
+ Link = $(CXX) $(CPP.Flags) $(CXX.Flags)
$(CXXFLAGS) $(LDFLAGS)
\
$(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
endif
$(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
endif
-BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) \
+BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) $(CFLAGS) \
+ $(CPPFLAGS) \
$(TargetCommonOpts) $(CompileCommonOpts)
$(TargetCommonOpts) $(CompileCommonOpts)
-Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) \
+Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags)
$(CPPFLAGS)
\
$(TargetCommonOpts) $(CompileCommonOpts) -E
$(TargetCommonOpts) $(CompileCommonOpts) -E
-BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CXX.Flags) \
+BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CXX.Flags) $(CXXFLAGS) \
+ $(CPPFLAGS) \
$(TargetCommonOpts) $(CompileCommonOpts)
ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
$(TargetCommonOpts) $(CompileCommonOpts)
ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
@@
-888,7
+901,7
@@
$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG)
LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS))
LLVMLibsPaths += $(LLVM_CONFIG) \
LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS))
LLVMLibsPaths += $(LLVM_CONFIG) \
- $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS))
+
$(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS))
endif
endif
endif
endif
@@
-960,7
+973,7
@@
endif
# if we're building a library ...
ifdef LIBRARYNAME
# if we're building a library ...
ifdef LIBRARYNAME
-# Make sure there isn't any extranous whitespace on the LIBRARYNAME option
+# Make sure there isn't any extran
e
ous whitespace on the LIBRARYNAME option
LIBRARYNAME := $(strip $(LIBRARYNAME))
ifdef LOADABLE_MODULE
LibName.A := $(LibDir)/$(LIBRARYNAME).a
LIBRARYNAME := $(strip $(LIBRARYNAME))
ifdef LOADABLE_MODULE
LibName.A := $(LibDir)/$(LIBRARYNAME).a
@@
-1169,7
+1182,7
@@
endif
# not exporting all of the weak symbols from the binary. This reduces dyld
# startup time by 4x on darwin in some cases.
ifdef TOOL_NO_EXPORTS
# not exporting all of the weak symbols from the binary. This reduces dyld
# startup time by 4x on darwin in some cases.
ifdef TOOL_NO_EXPORTS
-ifeq ($(OS),Darwin)
+ifeq ($(
HOST_
OS),Darwin)
# Tiger tools don't support this.
ifneq ($(DARWIN_MAJVERS),4)
# Tiger tools don't support this.
ifneq ($(DARWIN_MAJVERS),4)
@@
-1177,7
+1190,7
@@
LD.Flags += -Wl,-exported_symbol -Wl,_main
endif
endif
endif
endif
-ifeq ($(
OS), $(filter $(
OS), Linux NetBSD FreeBSD))
+ifeq ($(
HOST_OS), $(filter $(HOST_
OS), Linux NetBSD FreeBSD))
LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
endif
endif
LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
endif
endif
@@
-1212,7
+1225,7
@@
install-local::
uninstall-local::
$(Echo) Uninstall circumvented with NO_INSTALL
else
uninstall-local::
$(Echo) Uninstall circumvented with NO_INSTALL
else
-DestTool = $(PROJ_bindir)/$(TOOLNAME)
+DestTool = $(PROJ_bindir)/$(TOOLNAME)
$(EXEEXT)
install-local:: $(DestTool)
install-local:: $(DestTool)
@@
-1231,7
+1244,7
@@
endif
###############################################################################
# FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
###############################################################################
# FIXME: This should be checking for "if not GCC or ICC", not for "if HP-UX"
-ifeq ($(OS),HP-UX)
+ifeq ($(
HOST_
OS),HP-UX)
DISABLE_AUTO_DEPENDENCIES=1
endif
DISABLE_AUTO_DEPENDENCIES=1
endif