components/llvm/patches/023-Makefile.config.in.patch
changeset 5434 9f55c805ce9d
equal deleted inserted replaced
5428:3c05d530e67e 5434:9f55c805ce9d
       
     1 # ${prefix/libdir must be set correctly for 64-bit builds.
       
     2 # We can't have $ORIGIN in RPATH/RUNPATH.
       
     3 # Not for upstream. The autoconf-based build system is removed in 3.8.X.
       
     4 --- Makefile.config.in	2016-02-02 09:12:17.972038970 -0800
       
     5 +++ Makefile.config.in	2016-02-02 09:46:11.950055804 -0800
       
     6 @@ -13,6 +13,10 @@
       
     7  #===------------------------------------------------------------------------===#
       
     8  
       
     9  MACH = $(shell uname -p)
       
    10 +MACH64=sparcv9
       
    11 +ifeq ($(MACH),i386)
       
    12 +  MACH64=amd64
       
    13 +endif
       
    14  
       
    15  # Define LLVM specific info and directories based on the autoconf variables
       
    16  LLVMPackageName   := @PACKAGE_TARNAME@
       
    17 @@ -182,6 +186,10 @@
       
    18  # Path to the nm program
       
    19  NM_PATH = @NM@
       
    20  
       
    21 +ifeq ($(findstring -m32,$(CXXFLAGS)),)
       
    22 +  PROJ_libdir = $(PROJ_prefix)/lib/$(MACH64)
       
    23 +endif
       
    24 +
       
    25  # The pathnames of the programs we require to build
       
    26  CMP        := @CMP@
       
    27  CP         := @CP@
       
    28 --- Makefile.rules	2016-02-02 09:59:19.111715578 -0800
       
    29 +++ Makefile.rules	2016-02-02 11:51:02.057248471 -0800
       
    30 @@ -604,7 +604,7 @@
       
    31  endif
       
    32  
       
    33  ifdef SHARED_LIBRARY
       
    34 -ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
       
    35 +ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW SunOS))
       
    36  ifneq ($(HOST_OS),Darwin)
       
    37    LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
       
    38  else
       
    39 @@ -665,7 +665,9 @@
       
    40    endif
       
    41    ifneq ($(HOST_OS), Darwin)
       
    42      ifdef TOOLNAME
       
    43 +      ifneq ($(HOST_OS), $(filter $(HOST_OS), SunOS))
       
    44        LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
       
    45 +      endif
       
    46        ifeq ($(HOST_OS), $(filter $(HOST_OS), SunOS))
       
    47          LD.Flags += -Wl,-z -Wl,discard-unused=sections
       
    48          LD.Flags += -Wl,-M -Wl,$(PROJ_SRC_ROOT)/mapfiles/map.gnu-sections