#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# We use GCC version 4.9.3, and not another version for now.
COMPONENT_ARCHIVE_URL_1 = $(COMPONENT_PROJECT_URL)/releases/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE_1)
# Depends on S12-only changes in gcc; might be able to deal with later,
# but avoid publishing while this is under investigation.
CLONEY = echo
# We're building with CMake
# CMake prior to 3.6.0 does not define CMAKE_HOST_SOLARIS.
# In that case, we pass it in CMAKE_OPTIONS.
# All of these shoujld probably be in shared-macros.mk
# linked with, and not some random and incompatible stuff from
# -O0. GCC on SPARC dies with an out-memory error in cc1plus when
# building with either -O1 or -O2 (32-bit). If it manages to get
# through with -O1 or -O2 (64-bit), the resulting bits are unusable.
# Because LLVM's install target doesn't install everything that
# needs to be installed.
if test -d $(COMPONENT_DIR)/cxa_finalize ; then \
fi
if test -d $(COMPONENT_DIR)/cxa_finalize ; then \
fi;
$(LLVM_INSTALL_BINDIR)/$$f ; \
done ;
$(MKDIR) \
done ;
done ;
cd $(COMPONENT_DIR) ; \
cd $(PROTOUSRLIBDIR) ; \
$(PYTHON) -m compileall . ;
cd $(COMPONENT_DIR) ; \
$(MKDIR) $(PROTOUSRSHAREMAN1DIR) ; \
$(PROTOUSRSHAREMAN1DIR)/$$f ; \
done ;
# Results output is slightly different on Intel vs. SPARC.
# Not enabled just yet because of problems with the way opt
# and FileCheck emit and parse the test case results.
# Do not change the order of these regexp transforms.
'-e "/gmake -f/d"' \
'-e "/gmake/d"' \
'-e "/--color=/d"' \
'-e "/Entering/d"' \
'-e "/Leaving/d"' \
'-e "/Built target/d"' \
'-e "/Nothing to be done/d"'
# GCC options used:
# -ftree-vectorize | -fno-tree-vectorize:
# Disabled in debug builds, will be enabled in production/optimized
# builds at some point in the future..
#
# -ftree-slp-vectorize | -fno-tree-slp-vectorize:
# Less aggressive vectorization than -ftree-vectorize, but useful
# in case -ftree-slp-vectorize misses some vectorization opportunities.
# Documentation at the same URL as above.
# Disabled in debug builds, will be enabled in production/optimized
# builds at some point in the future.
#
# -freorder-blocks | -fno-reorder-blocks
# Disabled in debug builds, will be enabled in production/optimized
# builds at some point in the future.
# Documented here:
#
# -ftoplevel-reorder | -fno-toplevel-reorder
# Another BasiBlock depentent optimization option.
# Disabled in debug builds, will be enabled in production/optimized
# builds at some point in the future.
# Documented here:
#
# -fstack-protector-all:
# Enable stack smashing (stack corruption) protection and detection.
# This flag should always be used in conjunction with -Wstack-protector.
# -Wstack-protector acts at compile-time, -fstack-protector-all acts
# at runtime. -fstack-protector-all enables linking with libssp.so.
# This flag carries significant runtime overhead, but is very useful.
# Always enabled for now. May be removed in the future.
#
# -g3: Enable macro visibility in GDB. With just -g, debug builds will
# not record the expanded values of macros. With -g3, the values of
# expanded macros will be recorded, and macros will be observable in
# GDB.
#
# -mno-unaligned-doubles:
# Assume that the code does not make use of misaligned doubles on SPARC.
# On SPARC, doubles must align on 8. This flag makes GCC assume that
# there is no misaligned double use in the code, and GCC will not
# is such broken code when using this flag, the program will SIGBUS
# at runtime. This is a very useful debugging flag.
#
# -mhard-float:
# Use hardware floating-point operations when available. Compilers
# generally make very little use of floating-point, but this is
# floating-point operations are used. No-op for quad-floating-point
# and UltraSPARC-1/2/3 because on those ISA's quad-floating-point
# ops are always done in software. But quad-floating-point ops in a
# compiler are virtually non-existent.
#
# -mptr32 | -mptr64:
# Tell GCC the size of a pointer on SPARC.
#
# -mimpure-text:
# When used in addition to -shared on SPARC, this tells GCC to not pass
# -z text to the linker when linking a shared object.
# and the Sun linker. Technically, and in theory, this flag should not
# be needed when compiling -fPIC. However, extensive documented use
# and practice has shown that it is indeed needed. The disadvantage
# of using this flag is that it triggers copy-on-write relocations.
#
# -mno-sse3 -mno-ssse3:
# available and they always come with side-effects.
# Building for Opteron - which implies SSE2 - is adequate for
# performance purposes.
LIBFFI_INCDIR_64 = $(shell env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH.64) pkg-config --cflags libffi | sed -e s,-I,,)
# -Bdirect and -M /usr/lib/ld/map.noexbss break SPARC builds.
# CMake tries really hard to be too smart for its own good.
else
# Always build the libLLVM and libclang shared libraries
# Put this here for now until the gpatch problems are resolved.
# use bash(1) to run the install recipes otherwise clang header installation
# fails
COMPONENT_PRE_BUILD_ACTION += cd $(@D) ;
$(CMAKE) $(CMAKE_OPTIONS) \
$(COMPONENT_DIR)/$(COMPONENT_SRC) ;
# There are no master test results just yet. But there will be
# very soon.
test:
@echo "Tests not yet implemented - coming soon in LLVM 3.8.1."
system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)