Blame Makerules/Target.LINUX.INTEL.IA64

Packit 857059
# BEGIN_ICS_COPYRIGHT8 ****************************************
Packit 857059
# 
Packit 857059
# Copyright (c) 2015, Intel Corporation
Packit 857059
# 
Packit 857059
# Redistribution and use in source and binary forms, with or without
Packit 857059
# modification, are permitted provided that the following conditions are met:
Packit 857059
# 
Packit 857059
#     * Redistributions of source code must retain the above copyright notice,
Packit 857059
#       this list of conditions and the following disclaimer.
Packit 857059
#     * Redistributions in binary form must reproduce the above copyright
Packit 857059
#       notice, this list of conditions and the following disclaimer in the
Packit 857059
#       documentation and/or other materials provided with the distribution.
Packit 857059
#     * Neither the name of Intel Corporation nor the names of its contributors
Packit 857059
#       may be used to endorse or promote products derived from this software
Packit 857059
#       without specific prior written permission.
Packit 857059
# 
Packit 857059
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Packit 857059
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit 857059
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Packit 857059
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
Packit 857059
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit 857059
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Packit 857059
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Packit 857059
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Packit 857059
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Packit 857059
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Packit 857059
# 
Packit 857059
# END_ICS_COPYRIGHT8   ****************************************
Packit 857059
# suffixes and commands to build targets for:
Packit 857059
# BUILD_TARGET_OS=LINUX
Packit 857059
# BUILD_TARGET_TOOLCHAIN=INTEL
Packit 857059
# BUILD_TARGET=IA64
Packit 857059
# Target specific defines for building Linux target using Intel Compiler 7.0 tools
Packit 857059
Packit 857059
SHLIB_VERSION		?= 0.0
Packit 857059
LIB_PREFIX			= $(BUILDDIR)/lib
Packit 857059
SHLIB_SUFFIX		= .so
Packit 857059
SHLIB_VERSION_SUFFIX= .so.$(SHLIB_VERSION)
Packit 857059
ARLIB_SUFFIX		= .a
Packit 857059
EXE_SUFFIX			= 
Packit 857059
OBJ_SUFFIX			= .o
Packit 857059
EXP_SUFFIX			= .exp
Packit 857059
RES_SUFFIX			= .res
Packit 857059
PRE_SUFFIX			= .pre
Packit 857059
Packit 857059
# Paths:
Packit 857059
# let compiler default inclusion of /usr/include, otherwise g++ builds broken
Packit 857059
SYS_INCLUDE_DIRS =
Packit 857059
SYS_LIB_DIRS	 =
Packit 857059
Packit 857059
CC			= ecc
Packit 857059
CCC			= ecc
Packit 857059
LD			= xild
Packit 857059
LINT			= lint
Packit 857059
AR			= xiar
Packit 857059
NM			= nm
Packit 857059
OBJCOPY			= objcopy
Packit 857059
Packit 857059
include $(TL_DIR)/Makerules/Defs.INTEL
Packit 857059
Packit 857059
# for GNU we set an soname on shared libraries
Packit 857059
SHLIB_SONAME=$(notdir $(CMD_TARGETS_SHLIB))
Packit 857059
Packit 857059
# C/C++ compilation
Packit 857059
# ----------------------------
Packit 857059
CMACH		= -DTARGET_CPU_FAMILY_IA64 -D__IA64__ -DLINUX -Dlinux -D__LINUX__ -fno-strict-aliasing # use Wall later
Packit 857059
CCMACH		= $(CMACH)
Packit 857059
CSYS		=
Packit 857059
CCSYS		=
Packit 857059
CCLIBS		= 
Packit 857059
release_CCOPT_Flags	=
Packit 857059
debug_CCOPT_Flags	=
Packit 857059
release_COPT_Flags	=
Packit 857059
debug_COPT_Flags	=
Packit 857059
# Assemble the optimization flags based upon desired build configuration.
Packit 857059
CCOPT		= $($(strip $(BUILD_CONFIG))_CCOPT_Flags)
Packit 857059
COPT		= $($(strip $(BUILD_CONFIG))_COPT_Flags)
Packit 857059
release_CCDEBUG_Flags	=
Packit 857059
release_CDEBUG_Flags	=
Packit 857059
debug_CCDEBUG_Flags	=-g -O0 -DIB_DEBUG -DIB_TRACE $(CCPROJDEBUG) $(CCLOCALDEBUG)
Packit 857059
debug_CDEBUG_Flags	=-g -O0 -DIB_DEBUG -DIB_TRACE $(CPROJDEBUG) $(CLOCALDEBUG)
Packit 857059
# Assemble the debug flags based upon desired build configuration.
Packit 857059
CCDEBUG		= $($(strip $(BUILD_CONFIG))_CCDEBUG_Flags)
Packit 857059
CDEBUG		= $($(strip $(BUILD_CONFIG))_CDEBUG_Flags)
Packit 857059
Packit 857059
# Kernel build settings
Packit 857059
#---------------------------------------------
Packit 857059
# use CKERNEL and KERNEL_INCLUDE_DIRS to augment CLOCAL, LOCAL_INCLUDE_DIRS when
Packit 857059
# building a kernel module
Packit 857059
Packit 857059
# strict-aliasing - disables optimizations related to unions/casts
Packit 857059
# no-common - will put globals uninitialized in .bss instead of common
Packit 857059
# 		hence get link error if multiple declaration
Packit 857059
# -D_I386_PTRACE_H was a workaround for a ptrace.h header file inclusion issue
Packit 857059
# 		identify where needed and just put in that one makefile
Packit 857059
# -include picks up special flags for SMP and MODVERSIONS, this allows portable
Packit 857059
# kernel modules to be built for multiple system types from a single running
Packit 857059
# system
Packit 857059
CKERNEL=-D_KERNEL -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -include $(TL_DIR)/Makerules/LINUX/$(BUILD_TARGET).$(BUILD_TARGET_OS_VENDOR).$(BUILD_TARGET_OS_VERSION).h
Packit 857059
Packit 857059
# omit frame pointer for simple functions
Packit 857059
ifeq "$(BUILD_CONFIG)" "release"
Packit 857059
CKERNEL+= #-fomit-frame-pointer 
Packit 857059
else
Packit 857059
# due to extern inline virt_to_phys in io.h in kernel, we must use at least -O1
Packit 857059
# COPT will follow CLOCAL in CFLAGS, so it can request a different level
Packit 857059
# of optimization if needed
Packit 857059
CKERNEL+= #-O1
Packit 857059
endif
Packit 857059
Packit 857059
# Include directories for kernel
Packit 857059
KERNELDIR=/lib/modules/$(BUILD_TARGET_OS_VERSION)/build
Packit 857059
KERNEL_INCLUDE_DIRS=$(KERNELDIR)/include /usr/include/g++-3/ke /usr/include/g++-3
Packit 857059
Packit 857059
# linking
Packit 857059
# ----------------------------
Packit 857059
LDMACH		= 
Packit 857059
LDSYS		=
Packit 857059
MKSHLIB		= $(CCC) $(CCDEBUG) $(COPT) -shared
Packit 857059
ifeq "$(strip $(LIBFILES))" ""
Packit 857059
MKARLIB		= $(AR) crus$(space)
Packit 857059
else
Packit 857059
MKARLIB		= $(MAKETOOLS_DIR)/mkarlib.sh $(AR) crus$(space)
Packit 857059
endif
Packit 857059
MKPARTIAL	= $(LD) -r -o
Packit 857059
MKMODULE	= $(LD) -r -o
Packit 857059
Packit 857059
SYSLIBS		= -lpthread -lstdc++
Packit 857059
LDLIBS		= -Xlinker --start-group $(foreach lib,$(LOCALLIBS) $(LOCALDEPLIBS) $(MODLIBS) $(MODDEPLIBS) $(PROJLIBS) $(PROJDEPLIBS),-l$(lib)) -Xlinker --end-group $(SYSLIBS)
Packit 857059
Packit 857059
# libraries for partial link of a kernel loadable module
Packit 857059
KERNELLIBS		=