X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=Makefile.rules;h=cb4abafd2899b24df07b2d2682d424448606f378;hb=2c0470e781355a96f901fcf863f59b814eac20fa;hp=62428d1a722afce5d7f7a83350c996b11128b46f;hpb=f38b536b3d49b376c40155ae729e33ecc3069b47;p=oota-llvm.git diff --git a/Makefile.rules b/Makefile.rules index 62428d1a722..cb4abafd289 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -322,7 +322,13 @@ endif ifeq ($(ENABLE_CXX1Y),1) CXX.Flags += -std=c++1y else - CXX.Flags += -std=c++11 + ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) + # MinGW and Cygwin are a bit stricter and lack things like + # 'strdup', 'stricmp', etc in c++11 mode. + CXX.Flags += -std=gnu++11 + else + CXX.Flags += -std=c++11 + endif endif ifeq ($(ENABLE_WERROR),1) @@ -681,13 +687,13 @@ ifeq ($(HOST_OS),HP-UX) CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE endif -# If we are building a universal binary on Mac OS/X, pass extra options. This +# 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. # # The following can be optionally specified: # UNIVERSAL_SDK_PATH variable can be specified as a path to the SDK to use. -# For Mac OS/X 10.4 Intel machines, the traditional one is: +# For Mac OS X 10.4 Intel machines, the traditional one is: # UNIVERSAL_SDK_PATH=/Developer/SDKs/MacOSX10.4u.sdk/ # UNIVERSAL_ARCH can be optionally specified to be a list of architectures # to build for, e.g. UNIVERSAL_ARCH="i386 ppc ppc64". This defaults to @@ -787,7 +793,7 @@ else Ranlib = ranlib endif -AliasTool = ln -s +AliasTool = ln -sf #---------------------------------------------------------- # Get the list of source files and compute object file @@ -1151,15 +1157,19 @@ ifdef LIBRARYNAME # Make sure there isn't any extraneous whitespace on the LIBRARYNAME option LIBRARYNAME := $(strip $(LIBRARYNAME)) +LIBRARYALIASNAME := $(strip $(LIBRARYALIASNAME)) ifdef LOADABLE_MODULE BaseLibName.A := $(LIBRARYNAME).a BaseLibName.SO := $(LIBRARYNAME)$(SHLIBEXT) +BaseAliasName.SO := $(LIBRARYALIASNAME)$(SHLIBEXT) else BaseLibName.A := lib$(LIBRARYNAME).a BaseLibName.SO := $(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT) +BaseAliasName.SO := $(SharedPrefix)$(LIBRARYALIASNAME)$(SHLIBEXT) endif LibName.A := $(LibDir)/$(BaseLibName.A) LibName.SO := $(SharedLibDir)/$(BaseLibName.SO) +AliasName.SO := $(SharedLibDir)/$(BaseAliasName.SO) LibName.O := $(LibDir)/$(LIBRARYNAME).o #--------------------------------------------------------- @@ -1213,12 +1223,17 @@ else DestSharedLibDir := $(DESTDIR)$(PROJ_libdir) endif DestSharedLib := $(DestSharedLibDir)/$(BaseLibName.SO) +DestSharedAlias := $(DestSharedLibDir)/$(BaseAliasName.SO) install-local:: $(DestSharedLib) $(DestSharedLib): $(LibName.SO) $(DestSharedLibDir) $(Echo) Installing $(BuildMode) Shared Library $(DestSharedLib) $(Verb) $(INSTALL) $(LibName.SO) $(DestSharedLib) +ifdef SHARED_ALIAS + $(Echo) Creating alias from $(DestSharedLib) to $(DestSharedAlias) + $(Verb) $(AliasTool) $(DestSharedLib) $(DestSharedAlias) +endif uninstall-local:: $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)