5432N/A#
5432N/A# CDDL HEADER START
5432N/A#
5432N/A# The contents of this file are subject to the terms of the
5432N/A# Common Development and Distribution License (the "License").
5432N/A# You may not use this file except in compliance with the License.
5432N/A#
5432N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5432N/A# or http://www.opensolaris.org/os/licensing.
5432N/A# See the License for the specific language governing permissions
5432N/A# and limitations under the License.
5432N/A#
5432N/A# When distributing Covered Code, include this CDDL HEADER in each
5432N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5432N/A# If applicable, add the following below this CDDL HEADER, with the
5432N/A# fields enclosed by brackets "[]" replaced with your own identifying
5432N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5432N/A#
5432N/A# CDDL HEADER END
5432N/A#
5432N/A
5432N/A#
5432N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
5432N/A#
5432N/Aexport PARFAIT_BUILD=no
6510N/ABUILD_BITS=64
6510N/ACOMPILER=gcc
6510N/A
5432N/Ainclude ../../make-rules/shared-macros.mk
5432N/A
6921N/A# We use GCC version 4.9.3, and not another version for now.
6921N/AGCC_ROOT=/usr/gcc/4.9
6921N/A
5432N/ACOMPONENT_NAME= llvm
6510N/ACOMPONENT_VERSION= 3.8.1
5432N/ACOMPONENT_PROJECT_URL= http://llvm.org/
6510N/ACOMPONENT_SRC= $(COMPONENT_NAME)
6510N/ACOMPONENT_BUGDB= utility/llvm
6510N/A
5432N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
6510N/ACOMPONENT_SRC_NAME= $(COMPONENT_SRC).src
5432N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC_NAME).tar.xz
5432N/ACOMPONENT_ARCHIVE_HASH= \
6510N/A sha256:6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9
5432N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/releases/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
5432N/A
6510N/ATPNO= 28049
5432N/A
5432N/ACOMPONENT_NAME_1 = clang
5432N/ACOMPONENT_SRC_1 = cfe-$(COMPONENT_VERSION).src
5432N/ACOMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_1).tar.xz
5432N/ACOMPONENT_ARCHIVE_HASH_1 = \
6510N/A sha256:4cd3836dfb4b88b597e075341cae86d61c63ce3963e45c7fe6a8bf59bb382cdf
5432N/ACOMPONENT_ARCHIVE_URL_1 = $(COMPONENT_PROJECT_URL)/releases/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_1)
5432N/A
5432N/ACOMPONENT_POST_UNPACK_ACTION = \
5432N/A ( $(MV) $(COMPONENT_SRC_NAME) $(COMPONENT_SRC) )
5432N/A
5432N/ACOMPONENT_POST_UNPACK_ACTION_1 = \
5432N/A ( $(RM) -rf $(COMPONENT_SRC)/tools/$(COMPONENT_NAME_1) ; \
5432N/A $(CP) -rp $(COMPONENT_SRC_1) \
5432N/A $(COMPONENT_SRC)/tools/$(COMPONENT_NAME_1) )
5432N/A
5456N/A# Depends on S12-only changes in gcc; might be able to deal with later,
5456N/A# but avoid publishing while this is under investigation.
5456N/Aifeq ($(BUILD_TYPE), evaluation)
6510N/A BUILD_64=
6510N/A INSTALL_64=
6510N/A PUBLISH_STAMP=
5456N/Aendif
5456N/A
6510N/ABUILD_STYLE = cmake
6510N/ACLONEY = echo
6510N/AGNUCP = /usr/gnu/bin/cp
6510N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
5432N/A
5432N/APATCH_LEVEL := 0
5432N/ADEBUG_BUILD := 0
6510N/AHAVE_SPHINX := 0
5432N/A
6510N/Aexport PATH=/usr/gnu/bin:/usr/bin:/usr/perl5/$(PERL_VERSION)/bin
6510N/A
6510N/A# We're building with CMake
6510N/ACMAKE=/usr/bin/cmake
6510N/ACMAKE_VERSION := $(shell $(CMAKE) --version 2>&1 | head -n1 \
6510N/A | $(GSED) 's/cmake version \{1,\}//g')
6510N/ACMAKE_MAJOR_VERSION := $(shell echo $(CMAKE_VERSION) | cut -f1 -d'.')
6510N/ACMAKE_MINOR_VERSION := $(shell echo $(CMAKE_VERSION) | cut -f2 -d'.')
6510N/ACMAKE_MICRO_VERSION := $(shell echo $(CMAKE_VERSION) | cut -f3 -d'.')
6510N/A
6510N/A# CMake prior to 3.6.0 does not define CMAKE_HOST_SOLARIS.
6510N/A# In that case, we pass it in CMAKE_OPTIONS.
6510N/ACMAKE_NEEDS_SOLARIS_HOST := 0
6510N/Aifeq ($(shell expr $(CMAKE_MAJOR_VERSION) \<= 3 \& \
6510N/A $(CMAKE_MINOR_VERSION) \<= 5),1)
6510N/A CMAKE_NEEDS_SOLARIS_HOST = 1
6510N/Aendif
6510N/A
6510N/A# All of these shoujld probably be in shared-macros.mk
6510N/ACMAKE_INSTALL_BINDIR.32 = bin
6510N/ACMAKE_INSTALL_BINDIR.64 = bin/$(MACH64)
6510N/ACMAKE_INSTALL_BINDIR = $(CMAKE_INSTALL_BINDIR.$(BITS))
6510N/A
6510N/ACMAKE_INSTALL_LIBDIR.32 = lib
6510N/ACMAKE_INSTALL_LIBDIR.64 = lib/$(MACH64)
6510N/ACMAKE_INSTALL_LIBDIR = $(CMAKE_INSTALL_LIBDIR.$(BITS))
6510N/A
6510N/ACMAKE_INSTALL_LIBEXECDIR.32 = libexec
6510N/ACMAKE_INSTALL_LIBEXECDIR.64 = libexec/$(MACH64)
6510N/ACMAKE_INSTALL_LIBEXECDIR = $(CMAKE_INSTALL_LIBEXECDIR.$(BITS))
6510N/A
6510N/ACMAKE_INSTALL_INCLUDEDIR = include
6510N/ACMAKE_INSTALL_DATADIR = share
6510N/ACMAKE_INSTALL_DATAROOTDIR = share
6510N/A
5432N/A# We need the specific C++ runtime that clang/llvm was built and
5432N/A# linked with, and not some random and incompatible stuff from
5432N/A# /usr/lib.
6921N/ALLVM_RUNPATH_32 = $(GCC_ROOT)/lib
6921N/ALLVM_RUNPATH_64 = $(GCC_ROOT)/lib/$(MACH64)
5432N/ALLVM_RUNPATH = $(LLVM_RUNPATH_$(BITS))
5432N/A
6510N/A# -O0. GCC on SPARC dies with an out-memory error in cc1plus when
6510N/A# building with either -O1 or -O2 (32-bit). If it manages to get
6510N/A# through with -O1 or -O2 (64-bit), the resulting bits are unusable.
5432N/AOFLAG="-O0"
5432N/AGFLAG=""
5432N/A
5432N/Aifeq ($(DEBUG_BUILD), 1)
5432N/A OFLAG="-O0"
5432N/A GFLAG="-g3"
5432N/Aendif
5432N/A
5432N/A# Because LLVM's install target doesn't install everything that
5432N/A# needs to be installed.
5432N/AEXTRA_INSTALL_BITS=llvm-lto arcmt-test c-arcmt-test c-index-test diagtool
6510N/ALLVM_INSTALL_BINDIR.32=$(PROTOUSRBINDIR)
6510N/ALLVM_INSTALL_BINDIR.64=$(PROTOUSRBINDIR64)
6510N/ALLVM_INSTALL_BINDIR=$(LLVM_INSTALL_BINDIR.$(BITS))
6510N/ALLVM_BINDIR=$(BUILD_DIR_$(BITS))/bin
6510N/A
6510N/AINSTALL_CXA_FINALIZE := 0
6510N/Aifeq ($(SOLARIS_11_ONLY),)
6510N/A INSTALL_CXA_FINALIZE = 1
6510N/Aendif
5432N/A
6510N/ASCAN_VIEW_FILES=Reporter.py ScanView.py
6510N/ACLANG_FORMAT_FILES=clang-format-diff.py clang-format-sublime.py \
6510N/A clang-format.py
6510N/ALLVM_MAN_FILES=FileCheck.1 bugpoint.1 clang.1 lit.1 llc.1 lli.1 \
6510N/A llvm-ar.1 llvm-as.1 llvm-bcanalyzer.1 llvm-build.1 \
6510N/A llvm-config.1 llvm-cov.1 llvm-diff.1 llvm-dis.1 \
6510N/A llvm-dwarfdump.1 llvm-extract.1 llvm-lib.1 llvm-link.1 \
6510N/A llvm-nm.1 llvm-profdata.1 llvm-readobj.1 llvm-stress.1 \
6510N/A llvm-symbolizer.1 opt.1 tblgen.1
6510N/A
6510N/ACOMPONENT_POST_BUILD_ACTION = \
6510N/A if test -d $(COMPONENT_DIR)/cxa_finalize ; then \
6510N/A /usr/gnu/bin/touch $(COMPONENT_DIR)/cxa_finalize/.patched ; \
6510N/A /usr/gnu/bin/touch $(COMPONENT_DIR)/cxa_finalize/.prep ; \
6510N/A $(GMAKE) -C $(COMPONENT_DIR)/cxa_finalize build ; \
6510N/A /usr/gnu/bin/touch $(COMPONENT_DIR)/cxa_finalize/.built ; \
6510N/A fi
6510N/A
6510N/ACOMPONENT_POST_INSTALL_ACTION = \
6510N/A if test -d $(COMPONENT_DIR)/cxa_finalize ; then \
6510N/A $(GMAKE) -C $(COMPONENT_DIR)/cxa_finalize install ; \
6510N/A /usr/gnu/bin/touch $(COMPONENT_DIR)/cxa_finalize/.installed ; \
6510N/A fi;
5432N/A
5432N/ACOMPONENT_POST_INSTALL_ACTION += \
5432N/A list1='$(EXTRA_INSTALL_BITS)' ; for f in $$list1 ; do \
6510N/A $(INSTALL) --mode=755 $(LLVM_BINDIR)/$$f \
6510N/A $(LLVM_INSTALL_BINDIR)/$$f ; \
6510N/A done ;
6510N/A
6510N/ACOMPONENT_POST_INSTALL_ACTION += \
6510N/A $(MKDIR) \
6510N/A $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION)/vendor-packages ; \
6510N/A list2='$(SCAN_VIEW_FILES)' ; for f in $$list2 ; do \
6510N/A $(INSTALL) --mode=644 $(PROTOUSRSHAREDIR)/scan-view/$$f \
6510N/A $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION)/vendor-packages/$$f ; \
6510N/A done ;
6510N/A
6510N/ACOMPONENT_POST_INSTALL_ACTION += \
6510N/A list3='$(CLANG_FORMAT_FILES)' ; for f in $$list3 ; do \
6510N/A $(INSTALL) --mode=644 $(PROTOUSRSHAREDIR)/clang/$$f \
6510N/A $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION)/vendor-packages/$$f ; \
6510N/A done ;
6510N/A
6510N/ACOMPONENT_POST_INSTALL_ACTION += \
6510N/A cd $(COMPONENT_DIR) ; \
6510N/A $(GNUCP) -rpd $(PROTOUSRLIBDIR64)/clang $(PROTOUSRLIBDIR)/ ;
6510N/A
6510N/ACOMPONENT_POST_INSTALL_ACTION += \
6510N/A cd $(PROTOUSRLIBDIR) ; \
6510N/A $(PYTHON) -m compileall . ;
5432N/A
6510N/ACOMPONENT_POST_INSTALL_ACTION += \
6510N/A cd $(COMPONENT_DIR) ; \
6510N/A $(MKDIR) $(PROTOUSRSHAREMAN1DIR) ; \
6510N/A list4='$(LLVM_MAN_FILES)' ; for f in $$list4 ; do \
6510N/A $(INSTALL) --mode=644 $(COMPONENT_DIR)/Solaris/man1/$$f \
6510N/A $(PROTOUSRSHAREMAN1DIR)/$$f ; \
6510N/A done ;
6510N/A
6510N/Aifeq ($(INSTALL_CXA_FINALIZE),1)
6510N/ACOMPONENT_POST_INSTALL_ACTION += \
6510N/A $(INSTALL) --mode=644 \
6510N/A $(COMPONENT_DIR)/cxa_finalize/cxa_finalize-32.o \
6510N/A $(PROTOUSRLIBDIR)/clang/cxa_finalize.o ; \
6510N/A $(INSTALL) --mode=644 \
6510N/A $(COMPONENT_DIR)/cxa_finalize/cxa_finalize_pic-32.o \
6510N/A $(PROTOUSRLIBDIR)/clang/cxa_finalize_pic.o ; \
6510N/A $(INSTALL) --mode=644 \
6510N/A $(COMPONENT_DIR)/cxa_finalize/cxa_finalize-64.o \
6510N/A $(PROTOUSRLIBDIR)/clang/$(MACH64)/cxa_finalize.o ; \
6510N/A $(INSTALL) --mode=644 \
6510N/A $(COMPONENT_DIR)/cxa_finalize/cxa_finalize_pic-64.o \
6510N/A $(PROTOUSRLIBDIR)/clang/$(MACH64)/cxa_finalize_pic.o ;
6510N/Aendif
6510N/A
6510N/A# Results output is slightly different on Intel vs. SPARC.
6510N/A# Not enabled just yet because of problems with the way opt
6510N/A# and FileCheck emit and parse the test case results.
6510N/ACOMPONENT_TEST_MASTER = \
6510N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
6510N/A
6510N/A# Do not change the order of these regexp transforms.
6510N/ACOMPONENT_TEST_TRANSFORMS += \
6510N/A '-e "/gmake -f/d"' \
6510N/A '-e "/gmake/d"' \
6510N/A '-e "/--color=/d"' \
6510N/A '-e "/Entering/d"' \
6510N/A '-e "/Leaving/d"' \
6510N/A '-e "/Built target/d"' \
6510N/A '-e "/Nothing to be done/d"'
5432N/A
5432N/A# GCC options used:
5432N/A# -ftree-vectorize | -fno-tree-vectorize:
5432N/A# Enable/disable loop vectorization in optimizations. For details:
5432N/A# https://gcc.gnu.org/projects/tree-ssa/vectorization.html
5432N/A# Disabled in debug builds, will be enabled in production/optimized
5432N/A# builds at some point in the future..
5432N/A#
5432N/A# -ftree-slp-vectorize | -fno-tree-slp-vectorize:
5432N/A# Enable/disable Basic Block tree vectorization.
5432N/A# Less aggressive vectorization than -ftree-vectorize, but useful
5432N/A# in case -ftree-slp-vectorize misses some vectorization opportunities.
5432N/A# Documentation at the same URL as above.
5432N/A# Disabled in debug builds, will be enabled in production/optimized
5432N/A# builds at some point in the future.
5432N/A#
5432N/A# -freorder-blocks | -fno-reorder-blocks
5432N/A# Enable/disable BasicBlock reordering as an optimization.
5432N/A# Disabled in debug builds, will be enabled in production/optimized
5432N/A# builds at some point in the future.
5432N/A# Documented here:
5432N/A# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
5432N/A#
5432N/A# -ftoplevel-reorder | -fno-toplevel-reorder
5432N/A# Another BasiBlock depentent optimization option.
5432N/A# Disabled in debug builds, will be enabled in production/optimized
5432N/A# builds at some point in the future.
5432N/A# Documented here:
5432N/A# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
5432N/A#
5432N/A# -fstack-protector-all:
5432N/A# Enable stack smashing (stack corruption) protection and detection.
5432N/A# This flag should always be used in conjunction with -Wstack-protector.
5432N/A# -Wstack-protector acts at compile-time, -fstack-protector-all acts
5432N/A# at runtime. -fstack-protector-all enables linking with libssp.so.
5432N/A# This flag carries significant runtime overhead, but is very useful.
5432N/A# Always enabled for now. May be removed in the future.
5432N/A#
5432N/A# -g3: Enable macro visibility in GDB. With just -g, debug builds will
5432N/A# not record the expanded values of macros. With -g3, the values of
5432N/A# expanded macros will be recorded, and macros will be observable in
5432N/A# GDB.
5432N/A#
5432N/A# -mno-unaligned-doubles:
5432N/A# Assume that the code does not make use of misaligned doubles on SPARC.
5432N/A# On SPARC, doubles must align on 8. This flag makes GCC assume that
5432N/A# there is no misaligned double use in the code, and GCC will not
5432N/A# attempt to correct such misaligned loads/stores. If, however, there
5432N/A# is such broken code when using this flag, the program will SIGBUS
5432N/A# at runtime. This is a very useful debugging flag.
5432N/A#
5432N/A# -mhard-float:
5432N/A# Use hardware floating-point operations when available. Compilers
5432N/A# generally make very little use of floating-point, but this is
5432N/A# a valuable/low-cost optimization for those rare cases where
5432N/A# floating-point operations are used. No-op for quad-floating-point
5432N/A# and UltraSPARC-1/2/3 because on those ISA's quad-floating-point
5432N/A# ops are always done in software. But quad-floating-point ops in a
5432N/A# compiler are virtually non-existent.
5432N/A#
5432N/A# -mptr32 | -mptr64:
5432N/A# Tell GCC the size of a pointer on SPARC.
5432N/A#
5432N/A# -mimpure-text:
5432N/A# When used in addition to -shared on SPARC, this tells GCC to not pass
5432N/A# -z text to the linker when linking a shared object.
5432N/A# There is some suspicious interaction happening here between GCC/GAS
5432N/A# and the Sun linker. Technically, and in theory, this flag should not
5432N/A# be needed when compiling -fPIC. However, extensive documented use
5432N/A# and practice has shown that it is indeed needed. The disadvantage
5432N/A# of using this flag is that it triggers copy-on-write relocations.
5432N/A#
5432N/A# -mno-sse3 -mno-ssse3:
5432N/A# Do not use SSE3/SSSE3 instructions on Intel. These might not be
6510N/A# available and they always come with side-effects.
6510N/A# Building for Opteron - which implies SSE2 - is adequate for
6510N/A# performance purposes.
5432N/A
5432N/ACFLAGS = -m$(BITS) $(GFLAG) $(OFLAG) -pthread -std=c99 -fno-strict-aliasing
5432N/ACFLAGS += -fno-tree-slp-vectorize -fno-tree-vectorize
5432N/ACFLAGS += -fno-reorder-blocks -fno-toplevel-reorder
5432N/ACFLAGS += -Wall -Wcast-align -Wno-long-long -Woverflow
5432N/ACFLAGS += -Wstack-protector -fdata-sections -fstack-protector-all
5432N/ACFLAGS += -fkeep-static-consts -ffunction-sections
6510N/ACFLAGS += -Wl,-z -Wl,relax=common
6510N/ACFLAGS += -Wl,-z -Wl,relax=secadj
6510N/ACFLAGS += -Wl,-z -Wl,relax=transtls
6510N/ACFLAGS += -Wl,-z -Wl,relax=symbound
6510N/ACFLAGS += -Wl,-R -Wl,$(LLVM_RUNPATH)
5432N/ACFLAGS.i386 += -mtune=opteron -mno-sse3 -mno-ssse3 -fno-common
6510N/Aifeq ($(DEBUG_BUILD),1)
6510N/A CFLAGS.i386 += -fno-omit-frame-pointer
6510N/Aendif
5432N/ACFLAGS.sparc += -mtune=ultrasparc -mcpu=ultrasparc -mvis -mhard-float
5432N/ACFLAGS.sparc += -mptr$(BITS) -fdata-sections -falign-functions=8
5432N/ACFLAGS.sparc += -mno-unaligned-doubles -mimpure-text
5432N/ACFLAGS += $(CFLAGS.$(MACH))
5432N/A
5432N/ACXXFLAGS = -m$(BITS) $(GFLAG) $(OFLAG) -pthread -fno-strict-aliasing
5432N/ACXXFLAGS += -fexceptions -frtti -fstack-protector-all
5432N/ACXXFLAGS += -fno-tree-vectorize -fno-tree-slp-vectorize
5432N/ACXXFLAGS += -fno-reorder-blocks -fno-toplevel-reorder
5432N/ACXXFLAGS += -Wall -Wcast-align -Wno-long-long -Woverflow
5432N/ACXXFLAGS += -Wstack-protector -fkeep-static-consts
5432N/ACXXFLAGS += -std=c++11 -fdata-sections -ffunction-sections
6510N/ACXXFLAGS += -Wl,-z -Wl,relax=common
6510N/ACXXFLAGS += -Wl,-z -Wl,relax=secadj
6510N/ACXXFLAGS += -Wl,-z -Wl,relax=transtls
6510N/ACXXFLAGS += -Wl,-z -Wl,relax=symbound
6510N/ACXXFLAGS += -Wl,-z -Wl,relax=comdat
6510N/ACXXFLAGS += -Wl,-R -Wl,$(LLVM_RUNPATH)
5432N/ACXXFLAGS.sparc += -mptr$(BITS)
5432N/ACXXFLAGS += $(CFLAGS.$(MACH))
5432N/A
6510N/ACPPFLAGS = -D_GNU_SOURCE -DLLVM_SOLARIS -I/usr/gnu/include
5432N/A
6510N/Aifeq ($(DEBUG_BUILD),1)
5432N/A CPPFLAGS += -D_DEBUG
5432N/Aendif
5432N/A
6510N/ACPPFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE
5432N/ACPPFLAGS += -D_FILE_OFFSET_BITS=64 -D__EXTENSIONS__=1
5432N/ACPPFLAGS += -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
5432N/ACPPFLAGS += -D__STDC_LIMIT_MACROS -DHAVE_POSIX_MEMALIGN
5432N/ACPPFLAGS += -D_GLIBCXX_FULLY_DYNAMIC_STRING=1
5432N/ACPPFLAGS.i386 = -DLLVM_INTEL
5432N/ACPPFLAGS.sparc = -DLLVM_SPARC
5432N/ACPPFLAGS += $(CPPFLAGS.$(MACH))
5432N/A
6510N/ALLVM_LIBEXECDIR_32 = /usr/libexec
6510N/ALLVM_LIBEXECDIR_64 = /usr/libexec/$(MACH64)
5432N/ALLVM_LIBEXECDIR = $(LLVM_LIBEXECDIR_$(BITS))
5432N/A
7351N/ALIBFFI_INCDIR_32 = $(shell pkg-config --cflags libffi | sed -e s,-I,,)
7351N/ALIBFFI_INCDIR_64 = $(shell env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH.64) pkg-config --cflags libffi | sed -e s,-I,,)
6510N/ALIBFFI_INCDIR = $(LIBFFI_INCDIR_$(BITS))
6510N/A
6510N/ALIBFFI_LIBDIR_32 = /usr/lib
6510N/ALIBFFI_LIBDIR_64 = /usr/lib/$(MACH64)
6510N/ALIBFFI_LIBDIR = $(LIBFFI_LIBDIR_$(BITS))
6510N/A
6510N/A# -Bdirect and -M /usr/lib/ld/map.noexbss break SPARC builds.
6510N/ALD_B_DIRECT =
6510N/ALD_OPTIONS = -M /usr/lib/ld/map.noexstk
6510N/ALD_OPTIONS += -M /usr/lib/ld/map.pagealign
6510N/ALD_OPTIONS_SO = $(LD_Z_DEFS) $(LD_DEF_LIBS)
5432N/A
6510N/ACMAKE_OPTIONS = -DCMAKE_C_COMPILER:FILEPATH=$(CC)
6510N/ACMAKE_OPTIONS += -DCMAKE_CXX_COMPILER:FILEPATH=$(CXX)
6510N/ACMAKE_OPTIONS += -DCMAKE_C_CFLAGS:STRING="$(CPPFLAGS) $(CFLAGS)"
6510N/ACMAKE_OPTIONS += -DCMAKE_CXX_FLAGS:STRING="$(CPPFLAGS) $(CXXFLAGS)"
6510N/ACMAKE_OPTIONS += -DCMAKE_EXE_LINKER_FLAGS:STRING="$(LDFLAGS)"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX:FILEPATH=$(CMAKE_PREFIX)
6510N/ACMAKE_OPTIONS += -DCMAKE_AR:FILEPATH=/usr/bin/ar
6510N/A
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_BINDIR:STRING="$(CMAKE_INSTALL_BINDIR)"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_LIBDIR:STRING="$(CMAKE_INSTALL_LIBDIR)"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_LIBEXECDIR:STRING="$(CMAKE_INSTALL_LIBEXECDIR)"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_INCLUDEDIR:STRING="$(CMAKE_INSTALL_INCLUDEDIR)"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_DATADIR:STRING="$(CMAKE_INSTALL_DATADIR)"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_DATAROOTDIR:STRING="$(CMAKE_INSTALL_DATAROOTDIR)"
6510N/A
6510N/Aifeq ($(MACH),sparc)
6510N/A CMAKE_OPTIONS += -DLLVM_TARGETS_TO_BUILD:STRING="Sparc"
6510N/Aendif
6510N/Aifeq ($(MACH),i386)
6510N/A CMAKE_OPTIONS += -DLLVM_TARGETS_TO_BUILD:STRING="X86"
5432N/Aendif
5432N/A
6510N/ACMAKE_OPTIONS += -DCMAKE_MAKE_PROGRAM:STRING="/usr/bin/gmake"
6510N/ACMAKE_OPTIONS += -DCMAKE_ASM_COMPILER:STRING="/usr/gnu/bin/as"
6510N/ACMAKE_OPTIONS += -DCMAKE_INSTALL_RPATH:STRING="$(LLVM_RUNPATH)"
6510N/ACMAKE_OPTIONS += -DLLVM_BUILD_TOOLS:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_INCLUDE_TOOLS:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_BUILD_TESTS:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_INCLUDE_TESTS:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_THREADS:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_BUILD_32_BITS:BOOL=OFF
6510N/A
6510N/A# CMake tries really hard to be too smart for its own good.
6510N/Aifeq ($(DEBUG_BUILD),1)
6510N/A CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE:STRING=Debug
6510N/A CMAKE_OPTIONS += -DCMAKE_C_FLAGS_DEBUG:STRING="$(OFLAG) $(GFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS_DEBUG:STRING="$(OFLAG) $(GFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_ASM_FLAGS_DEBUG:STRING="$(OFLAG) $(GFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING="$(OFLAG) $(GFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$(OFLAG) $(GFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$(OFLAG) $(GFLAG)"
6510N/A CMAKE_OPTIONS += -DLLVM_BUILD_EXAMPLES:BOOL=ON
6510N/A CMAKE_OPTIONS += -DLLVM_INCLUDE_EXAMPLES:BOOL=ON
6510N/A CMAKE_OPTIONS += -DLLVM_ENABLE_ASSERTIONS:BOOL=ON
6510N/A CMAKE_OPTIONS += -DLLVM_ENABLE_EXPENSIVE_CHECKS:BOOL=ON
6510N/Aelse
6510N/A CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE:STRING=Release
6510N/A CMAKE_OPTIONS += -DCMAKE_C_FLAGS_DEBUG:STRING="$(OFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS_DEBUG:STRING="$(OFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_ASM_FLAGS_DEBUG:STRING="$(OFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING="$(OFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$(OFLAG)"
6510N/A CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="$(OFLAG)"
6510N/A CMAKE_OPTIONS += -DLLVM_BUILD_EXAMPLES:BOOL=OFF
6510N/A CMAKE_OPTIONS += -DLLVM_INCLUDE_EXAMPLES:BOOL=OFF
6510N/A CMAKE_OPTIONS += -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF
6510N/A CMAKE_OPTIONS += -DLLVM_ENABLE_EXPENSIVE_CHECKS:BOOL=OFF
6510N/Aendif
5432N/A
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_EH:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_PIC:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_RTTI:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_WARNINGS:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_PEDANTIC:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ABI_BREAKING_CHECKS:STRING="FORCE_OFF"
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_ZLIB:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_ENABLE_FFI:BOOL=ON
6510N/ACMAKE_OPTIONS += -DFFI_INCLUDE_DIR:STRING=$(LIBFFI_INCDIR)
6510N/ACMAKE_OPTIONS += -DFFI_LIBRARY_DIR:STRING=$(LIBFFI_LIBDIR)
6510N/A
6510N/Aifeq ($(HAVE_SPHINX),1)
6510N/A CMAKE_OPTIONS += -DSPHINX_EXECUTABLE:STRING="/usr/bin/sphinx-build"
6510N/A CMAKE_OPTIONS += -DLLVM_ENABLE_SPHINX:BOOL=ON
6510N/A CMAKE_OPTIONS += -DLLVM_BUILD_DOCS:BOOL=ON
6510N/A CMAKE_OPTIONS += -DSPHINX_OUTPUT_HTML:BOOL=ON
6510N/A CMAKE_OPTIONS += -DSPHINX_OUTPUT_MAN:BOOL=ON
5432N/Aendif
6510N/A
6510N/A# Always build the libLLVM and libclang shared libraries
6510N/ACMAKE_OPTIONS += -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON
6510N/ACMAKE_OPTIONS += -DLLVM_LINK_LLVM_DYLIB:BOOL=ON
6510N/A
6510N/ACMAKE_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
6510N/A
6510N/ACMAKE_OPTIONS += -DLLVM_COMPILER_IS_GCC_COMPATIBLE:BOOL=ON
5432N/A
6510N/Aifeq ($(CMAKE_NEEDS_SOLARIS_HOST),1)
6510N/A CMAKE_OPTIONS += -DCMAKE_HOST_SOLARIS:BOOL=TRUE
6510N/Aendif
6510N/A
6510N/ACOMPONENT_BUILD_ENV = CC="$(CC)"
6510N/ACOMPONENT_BUILD_ENV += CXX="$(CXX)"
6510N/ACOMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
6510N/ACOMPONENT_BUILD_ENV += CXXFLAGS="$(CXXFLAGS)"
6510N/ACOMPONENT_BUILD_ENV += LDFLAGS="$(LDFLAGS)"
6510N/ACOMPONENT_BUILD_ENV += LD_OPTIONS="$(LD_OPTIONS)"
6510N/ACOMPONENT_BUILD_ENV += PATH="$(PATH)"
6510N/ACOMPONENT_BUILD_ENV += LANG="C"
6510N/ACOMPONENT_BUILD_ENV += LC_ALL="C"
6510N/ACOMPONENT_BUILD_ENV += LD_EXEC_OPTIONS="-zaslr=disable"
5432N/A
5432N/A# Put this here for now until the gpatch problems are resolved.
6510N/ACOMPONENT_BUILD_ARGS += -j4
5432N/A
5432N/A# use bash(1) to run the install recipes otherwise clang header installation
5432N/A# fails
5432N/ACOMPONENT_INSTALL_ARGS += SHELL=/bin/bash
5432N/A
6510N/ACOMPONENT_PRE_BUILD_ACTION += cd $(@D) ;
6510N/ACOMPONENT_PRE_BUILD_ACTION += echo BITS: $(BITS) ;
6510N/ACOMPONENT_PRE_BUILD_ACTION += echo Running cmake with $(CMAKE_OPTIONS) ;
6510N/ACOMPONENT_PRE_BUILD_ACTION += /usr/bin/env - $(COMPONENT_BUILD_ENV) \
6510N/A $(CMAKE) $(CMAKE_OPTIONS) \
6510N/A $(COMPONENT_DIR)/$(COMPONENT_SRC) ;
6510N/A
6510N/A
6510N/A# There are no master test results just yet. But there will be
6510N/A# very soon.
5432N/Atest:
6510N/A @echo "Tests not yet implemented - coming soon in LLVM 3.8.1."
6510N/A
6510N/Asystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
5432N/A
5432N/AREQUIRED_PACKAGES += developer/gcc-4/gcc-common-49
5432N/AREQUIRED_PACKAGES += developer/gnu-binutils
5432N/AREQUIRED_PACKAGES += library/libedit
5432N/AREQUIRED_PACKAGES += library/libffi
6635N/AREQUIRED_PACKAGES += library/libiomp5
5432N/AREQUIRED_PACKAGES += library/libxml2
5432N/AREQUIRED_PACKAGES += library/zlib
6510N/AREQUIRED_PACKAGES += runtime/perl-522
6510N/AREQUIRED_PACKAGES += library/perl-5/xml-libxml
6510N/AREQUIRED_PACKAGES += library/perl-5/xml-namespacesupport
6510N/AREQUIRED_PACKAGES += library/perl-5/xml-parser
6510N/AREQUIRED_PACKAGES += library/perl-5/xml-sax
6510N/AREQUIRED_PACKAGES += library/perl-5/xml-sax-base
6510N/AREQUIRED_PACKAGES += library/perl-5/xml-simple
5432N/AREQUIRED_PACKAGES += runtime/python-27
5432N/AREQUIRED_PACKAGES += system/core-os
5432N/AREQUIRED_PACKAGES += system/header
5435N/AREQUIRED_PACKAGES += system/library/gcc/gcc-runtime-49
5432N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime-49
5435N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime-49
5435N/AREQUIRED_PACKAGES += system/library/gcc/gcc-gobjc-runtime-49
5432N/AREQUIRED_PACKAGES += system/library/math
5432N/AREQUIRED_PACKAGES += system/linker
6510N/A