/* Copyright IBM 1995,2003 */ /* $Id: site.mcr.proto,v 1.535.2.13 2006/10/26 05:44:16 mcnabb Exp $ */ /******************************************************************************/ /* Platform and Architecture Defines: */ /* */ /* Define the platform (operating system) and architecture (instruction set) */ /* settings. Only one platform and one architecture may be defined. Not all */ /* combinations are supported. */ /* */ /* Supported platform settings: */ /* */ /* GPFS_AIX */ /* GPFS_LINUX */ /* */ /* Supported architecture settings: */ /* */ /* GPFS_ARCH_I386 */ /* GPFS_ARCH_IA64 */ /* GPFS_ARCH_POWER */ /* GPFS_ARCH_PPC64 */ /* GPFS_ARCH_X86_64 */ /* */ /******************************************************************************/ #define GPFS_LINUX #define GPFS_ARCH_I386 #ifdef GPFS_LINUX /*****************************************************/ /* Linux portability layer defines begin. */ /* Customer editable portion of config file. */ /*****************************************************/ /* use #define SRC_BUILD to build the open source kernel module */ #define SRC_BUILD_PLACEHOLDER /******************************************************************************/ /* Linux Distribution Defines: */ /* */ /* Define the Linux distribution setting. Only one Linux distribution may be */ /* defined. */ /* */ /* Supported Distribution settings: */ /* */ /* REDHAT_LINUX */ /* REDHAT_AS_LINUX */ /* SUSE_LINUX */ /* KERNEL_ORG_LINUX */ /* */ /* Select REDHAT_AS_LINUX for: */ /* - RedHat Advanced Server */ /* - RedHat Enterprise Linux (AS|ES|WS). */ /* */ /* Select REDHAT_LINUX for RedHat professional */ /* */ /* Select SUSE_LINUX for SuSE Enterprise Server */ /* */ /******************************************************************************/ LINUX_DISTRIBUTION = KERNEL_ORG_LINUX /******************************************************************************/ /* Linux Distribution Level Defines: */ /* */ /* Define the Linux distribution level setting. Only one Linux distribution */ /* level may be defined. */ /* */ /* NOTE: */ /* */ /* The DISTRIBUTION_LEVEL may be required if the patches for a common */ /* LINUX_KERNEL_VERSION diverge across a LINUX_DISTRIBUTION. For instance, */ /* RedHat 8 and RedHat 9 have different kernel patches for a similar version */ /* number kernel. For this example, LINUX_DISTRIBUTION_LEVEL would be set to */ /* "80" for RedHat 8 and "90" for RedHat 9. /* */ /******************************************************************************/ #define LINUX_DISTRIBUTION_LEVEL 90 /******************************************************************************/ /* Linux Kernel Version Defines: */ /* */ /* Define the Linux kernel version and kernel includes directory settings. */ /* Only one Linux kernel version and one kernel includes directory may be */ /* defined. */ /* */ /* The Linux kernel version is determined from the first four components of */ /* the kernel string. It is important to note that the second, third and */ /* fourth components are specified with two digits. Any component less than */ /* 10 must be preceded by a '0', while any component greater than or equal to */ /* 100 should specify '99'. */ /* */ /* Examples: */ /* */ /* 2.4.18-21 would be 2041821 */ /* 2.4.21-111 would be 2042199 */ /* 2.6.5-7.139 would be 2060507 */ /* */ /* The kernel includes directory is where GPFS will find the kernel headers */ /* for the kernel specified by the LINUX_KERNEL_VERSION define. The kernel */ /* includes location varies by Linux distribution. */ /* */ /* Examples: */ /* */ /* /lib/modules/`uname -r`/build/include */ /* /lib/modules/`uname -r`/source/include */ /* /usr/src/linux/include */ /* */ /******************************************************************************/ #define LINUX_KERNEL_VERSION 2062003 KERNEL_HEADER_DIR = /usr/src/linux-source-2.6.20/include /******************************************************************************/ /* Linux Build Directory (Needed for Linux 2.6 kernel only) */ /* */ /* For Linux kernel version 2.6, kernel build directory needs to be specified */ /* as well. */ /* If you are running a vanilla kernel, where in the headers and the build */ /* directories are in the standard place (i.e. under /lib/modules) then */ /* running "make Autoconfig" will set the correct values for */ /* KERNEL_BUILD_DIR variable. */ /* */ /* The kernel build directory is where the kernel build tools reside. */ /* These tools are required to build the GPFS modules for Linux. */ /* Examples: */ /* /lib/modules/`uname -r`/build */ /* */ /******************************************************************************/ KERNEL_BUILD_DIR = /lib/modules/2.6.20.3-ubuntu1/build /* Flags for building with desired Linux kernel patches. * These are patches for specific problems we've discovered * with the linux kernel and are providing interim patches * for. Each patch is described below and the desired patches * should be uncommented under LINUX_PATCH_DEFINES. * * -DMMAP_LINUX_PATCH Required for use of mmapped writes. * * Descriptions and downloads for these patches may be found at * http://sourceforge.net/tracker/index.php?func=detail&aid=1153778&group_id=130828&atid=719124 */ LINUX_PATCH_DEFINES = \ /* -DMMAP_LINUX_PATCH */ /*****************************************************/ /* Linux portability layer defines end. */ /* Everything below here is irrelevent to customer */ /* compiles of the portability layer. */ /*****************************************************/ #endif /* GPFS_LINUX */ /* Descriptions of variables used by the build process: The following variables are lists available to all makefiles: DESTDIR Root of the ts directory in the build tree. CDEBUGFLAGS Passed to all compiles of code that goes in mmfsd or other process-level code. Empty by default; intended to be used temporarily within the Imakefile in a directory to turn on generation of assembly listings, say. KCDEBUGFLAGS Passed to all compiles of code that goes in kernel extensions. Empty by default. OPTFLAGS Compiler optimization flags for daemon code and code that is compiled once and bound into both the daemon and the kernel. Typical values are -g or -O. KOPTFLAGS Compiler optimization flags for code used exclusively in kernel modules. ARCH_DEFINES -D defines describing the machine architecture DEFAULT_DEFINES List of -D defines used for shipped product code. The complete list of possible -D values is given below. TEMPSHIP_DEFINES List of -D defines used for debuging, not shipped in product code after first few PTFs of new release. NEVERSHIP_DEFINES List of -D defines used for testing, never shipped in product code. SITE_DEFINES List of the complete set of -D defines used by each compilation in the build. For testing, this will be the concatenation of DEFAULT_DEFINES, ARCH_DEFINES, TEMPSHIP_DEFINES, and NEVERSHIP_DEFINES. For the shipped product, this will just contain DEFAULT_DEFINES and ARCH_DEFINES (and TEMPSHIP_DEFINES for a little while). KERNEL_HEADER_DIR Directory where Linux kernel header files are kept The following variables are either defined or undefined by this file. Tests of these are used in Imakefiles to conditionally control which lines are processed. For almost all of these there is a corresponding -Dxxx that must be specified in SITE_DEFINES. DMAPI #define this to cause code implementing the DMAPI interface to GPFS to be built. Requires -DDMAPI in SITE_DEFINES. FAR_TRACE #define this to cause calls to the routine that actually does TRACEn to be placed far away from the tests of whether tracing is enabled. When tracing is off, this results in fewer I-cache misses, and therefore better performance. Also controls several compiler options that are needed to get the correct code generated. Cannot be used with -g. LINUX_KERNEL_VERSION #define this to match the version of the Linux include files being used for the applicable architecture type. This is always an eight digit decimal number. The first four digits give the major and minor kernel version numbers. For Linux 2.4 these will always be 0204, with the leading zero omitted. The next two digits give the kernel subversion. The last two digits give the patch level. Thus the LINUX_KERNEL_VERSION of linux-2.4.18-14 is 2041814 while linux-2.4.19 is 2041900 The compile-time symbol LINUX_KERNEL_VERSION will be set to the same value as the make-time symbol LINUX_KERNEL_VERSION. The GPFS_KERNEL_VERSION macro uses the same encoding of kernel version as does LINUX_KERNEL_VERSION, and can be used to conditionally compile version dependent code. GPROF_DAEMON #define this to compile and link the daemon for gprof. Use 'mmfsadm test gprof on|off' to control when profiling is enabled. (Not tested in years, may not work.) TRY_AND_BUY #define this to build a "try and buy" version of GPFS with a timeout license key MMPMON #define this to build support for MMPMON remote performance monitoring services. Requires -DMMPMON in SITE_DEFINES. MMPMON_CUMULATIVE #define this to build support for MMPMON remote performance monitoring cumulative all-time stats. Requires -DMMPMON in SITE_DEFINES. MMPMON_HISTOGRAMS #define this to build support for MMPMON remote performance monitoring latency histogram data. Requires -DMMPMON *and* -DMMPMON_HISTOGRAMS in SITE_DEFINES. EXPORTER_EVENTS #define this to enable the APPEND_EXPORTER_EVENT code originally used by the Java GUI SMB_LOCKS #define this to add SMB share mode and oplock support Requires -DSMB_LOCKS in SITE_DEFINES CCL #define this to add support for CIFS Compatibility Layer. Requires -DCCL in SITE_DEFINES KTRACE #define this to build trace device into Linux kernel and allow trace statements in kernel. Requires -DKTRACE in SITE_DEFINES NO_ASM_UTIL #define this to prevent the use of assembler versions of utility routines in classes/basic directory CROSS_COMPILE #define this when cross-compiling to avoid running tools that must be built for the target system but run on the build system (e.g. chksystypes program) POLICY #define this to compile the policy library. Use with -DPOOLS and -DPOLICY NOKREGPARMS #define this to build gpfs compatable for a custom built 2.6 kernel with CONFIG_REGPARMS turned off. Descriptions of all -Dxxx values that control building GPFS features. To generate optional code add one or more of the following to SITE_DEFINES: Standard system features -D__FULL_PROTO Used by AIX header files to ensure that prototypes of functions include full parameter list. Needed since these functions have a C calling convention and thus must always be defined with their full proto. -DBLOCK_RESTORE Add support for block level incremental backup & restore. -DDIO Direct I/O support -DDIO_XW Define this to allow direct I/O writes to allocate new data blocks rather than falling back to normal I/O, provided that write request is block-aligned block multiple. DIO will use xw byte-range lock rather than whole-file sx lock for block-sized I/O. -DDISK_LEASE_DMS Add support for a deadman switch. When disk leasing is on, a kernel timer will be turned on, to be restarted whenever a new lease is obtained. If the lease cannot be renewed, and timer expires, and there's still some outstanding I/O requests, the node is paniced. -DDMAPI Activate DMAPI code (also define DMAPI). -DDMAPI_MOVERS Activate DMAPI parallel movers code. -DDMAPI_PREFETCH_DIRATTRS Active parallel dm_get_dirattr and dm_get_dmattr -DLC_FENCING Enable LC fencing of VSD disks -DMMAP_DIO Change mmap page-out to use direct I/O to write the page if a GPFS data buffer is not available. This removes the requirement that read/write mapped pages always have a GPFS data buffer to back them. Requires -DDIO. -DNFS_SKIP_SHRINK_TO_FIT Don't do shrink to fit for NFS when the open file is not empty. -DPOW2_COND_SHIFT Enable code that implements multiplies and divides by shifts when possible. -DSANERGY Enable SANergy interfaces. -DSFS_PERF_SKIP_SYNC Performance improvement to skip multiple sync calls for the same file. -DSFS_PERF_USE_SMALL_BUFFER try to use small buffers to avoid reading data that might not be referenced. -DSMB_LOCKS Add support for SMB open locks and oplocks. -DSPAIXLVL=432 AIX level. Must use this option when compiling on AIX 4.3.2 (with new compiler). -DSPAIXLVL=433 Must use this option when compiling on AIX 4.3.3 -DSPAIXLVL=516 Must use this option when compiling on AIX 5.1.6+ -DMMPMON Enable MMPMON performance monitoring (also enable -DMMPMON.) -DMMPMON_CUMULATIVE Enable MMPMON performance monitoring cumulative all time stats (also enable -DMMPMON and define MMPMON) -DMMPMON_DAEMON_PORT Enable code that allows mmpmon/EE connections via the standard daemon port. Authentication done by llcomm. Compatible with MMPMON_NAMED_SOCKET. -DMMPMON_HISTOGRAMS Enable MMPMON performance monitoring latency histograms (also enable -DMMPMON and define MMPMON + MMPMON_HISTOGRAMS.) -DMMPMON_NAMED_SOCKET Enable MMPMON named socket instead of the independent EE network port. Mutually exclusive. -DMMPMON_RPC Enable MMPMON rpc interface -DEXPORTER_EVENTS Enable the APPEND_EXPORTER_EVENT code originally used by the Java GUI -DFAR_TRACE LINUX: Generate calls to the TRACE subroutine out-of-line with respect to the tests of whether tracing is enabled. Do not explicitly include this in the list of -D options; it will be provided automatically if FAR_TRACE or KFAR_TRACE is #defined. -DFAR_CODE LINUX: Enable the BEGIN_FAR_CODE/END_FAR_CODE macros to place arbitrary uncommonly executed code out-of-line. Requires -DFAR_TRACE. Do not explicitly include this in the list of -D options; it will be provided automatically if FAR_TRACE or KFAR_TRACE is #defined. -DUSE51BREGS AIX: Use AIX 5.1.B register semantics in assembler code. Must be turned on for code that will run on AIX 5.x. -DTSCOMM_SECURITY Enable support for secure network communication. -DLIMIT_KSTACKS Generate code that is less efficient in the GPFS kernel module, but that uses less kernel stack space. Needed on i386 for Linux kernel versions at or beyond 2.6.6. -DPERF_STATS Additional performance statistics for benchmark runs Defines for new upcoming features: -DCCL Add support for CIFS Compatibility Layer. -DEE_WATCHDOG_START Start the EE watchdog thread (checks for anomolies) This feature used to be enabled, but since there is currently no consumer for its data, it is now disabled by default. -DNFS4_CLUSTER Add support for NFS Version 4. Requires the 2.4.18 nfsv4 kernel. -DNFS4_ACL Add support for NFSv4 ACLs. -DNFS4_VCM Add support for the AIX VCM (NFSv4 locking) -DDESCQUORUM_OVERRIDE Add support for manual overrides of the stripe group descriptor quorum. -DUIDREMAP Enable support for UID remapping in multicluster environment. -DALLOC_SUM_FILE Enable support allocation summary file -DCHECK_KXTIMESTAMP Enable code that a) links both mmfsd and mmfs with an object that contains a timestamp b) checks very early during daemon startup that kernel and userspace code have the same timestamp, i.e. the kernel extension loaded in memory is from the same build as the currently starting daemon. The intent is to prevent hard-to-diagnose problems arising (on AIX, most often) from having a stale kernel extension loaded after installing a new build. Will only be enabled in ADE/ODE builds, although CVS builders can enable it as well. -DPOOLS Add support for multiple disk storage pools. -DFILESETS Add support for filesets. -DFILESET_QUOTAS Add support for fileset quotas. Must be used with FILESETS. -DPOLICY Policy language and commands - used with POOLS and FILESETS, prereq -DPOLICY_RESTORE Initial support for new RESTORE policy attributes -DPOLICY_RESTORE_RULES Add support for new RESTORE policy rules -DSINGLE_PORT Enable support for use of a single port number. -DTHREADED_RECEIVER Enables multi-threaded receiver code. -DNO_XCLUST Avoid sending cross-cluster RPCs between different remote clusters -DWAIT_FOR_NSD_SERVERS Enables the feature to wait for NSD servers to come up on mounts, when cluster is first formed, and other select situations (see doc for details.) Defines for non GA versions of the code but turned on for our web based "try and buy" version of GPFS. -DTRY_AND_BUY Build a "try and buy" version of GPFS with a timeout license key Defines for Normal testing, not for shipped systems: -DDBGASSERTS Generate code for DBGASSERT macros -DTRIGGERS Respond to 'test trigger xxx' commands -DTRACK_USECOUNT Code to track contributing threads to a stripe group's use count. -DDIRCHECKASSERTS Check validity of directory disk data structures frequently, and assert when an inconsistency is found. Expensive, so separated from DBGASSERTS. -DPTHREAD_STATS Generate code to count how many times various paths are taken through thread, mutex, and condition variable code. -DNO_ASM_SYNCH Disable implementation of fast versions of mutex acquire/release in assembler. Enables trace calls and some debugging code under -DDBGASSERTS that is not supported by the assembler implementation. Required if -DTRACK_RESOURCE_USAGE is used. -DINSTRUMENT_LOCKS Enable summary lock instrumentation for mutexes and lock objects. Requires -DPTHREAD_STATS. -DINSTRUMENT_DETAIL_LOCKS Also enable per-mutex lock instrumentation. Requires -DINSTRUMENT_LOCKS. -DTM_DETAIL_STATS Extra counters to track which token prefetches are useful and which are not. -DVERBOSETRACE Generate code to produce traces for trace levels > 10 -DGPFS_FRAME_POINTER Tell GPFS code that -fomit-frame-pointer was not specified, so frame pointer is available. Use either -fomit-frame-pointer or -DGPFS_FRAME_POINTER when defining OPTFLAGS -DENTRYEXIT_TRACE Enable routine entry/exit tracing that is controlled by mmfsadm trace entryexit -DKSTACK_CHECK Keep track of how much kernel stack space is used within GPFS kernel modules. Print tracebacks of the point of maximum stack usage if it exceeds a threshhold. Can only be used on Linux. Defines for weird test conditions, not normally used: -DPOW2_FORCE_SHIFT Do only shifts for some math. Requires that all GPFS block sizes be power of 2. Since VTS uses 384K blocksize, this is not a shipable option. -DTIME_MUTEXES Time how long mutexes are held. Summary produced by 'mmfsadm dump lstat'. Requires -DINSTRUMENT_LOCKS. -DGPFS_PRINTF On Linux, send trace output to the console via printk instead of collecting trace output using ltrace. (requires GPFS_LINUX). -DTSCAN Enable trace points used by the tscan utility to measure CPU usage by system call. -DTRACK_RESOURCE_USAGE Keep track of resources (locks, mutexes, buffers, threads, etc.) held by a thread and verify that resources are acquired in a consistent order. Requires -DNO_ASM_SYNCH. -DSUPPORT_FOR_DOS_STATFS Hack for DOS client fsstat -DDACSPY Counts the number of times objects of each of the dynamic array classes are created. The classes are defined via the DECL_ARRAY_CLASS macro in DAC.h. This optional instrumentation allows for determining which objects being allocated on the heap may require allocation optimization such as via a linked list of preallocated objects. -DMALLOC_DEBUG Generate code to track the file and line number from which each block of MALLOCed storage was allocated -DTRACE_IO_DATA If RTPERF trace level is >= 3, dump the first few words of data read or written by any disk I/O operation. This is a security exposure, and should not be turned on in production. -DNEW_DELETE_DEBUG Override global operators new and delete, to assist in finding uninitialized dynamic storage, writing beyond the end of an allocated object, reference to deleted objects, and storage leaks. The 'mmfsadm test newdebug' command enables some of these features. -DNEW_DELETE_TRACEBACKS Save the call stack on memory allocations tracked by -DNEW_DELETE_DEBUG. Not supported on Linux. -DDIR_VERSION_NUMBERS Increment one of the reserved words in directory block headers each time the block is written to disk. Helps to sequence directory updates in time across multiple nodes. Should never be turned on except on file systems that will be reformatted. -DTEST_SMALL_DISKS=x When creating a file system or adding disks, artificially limit the disk size to x megabytes. Useful for testing ENOSPC conditions without having to fill up large disks or creating new, smaller logical volumes. -DTEST_DELDISK Ignore all but the first disk listed in mount options. This is useful when testing so that the tsdeldisk and tsrpldisk commands can be used without the "mm" commands. -DNO_VFS_STATS Do not generate any code to generate statistics for the 'mmfsadm vfsstats {enable|disable|reset|show}' family of commands. -DSTOP_TRACE_ON_FAILURE Set all trace flags to 0 as soon as LOGASSERT is triggered or deamon cleanup begins. -DDEBUG_SPINLOCK Define this if Linux kernel is built with CONFIG_DEBUG_SPINLOCK. -DFILEIDCMD_PERF Define this to enable perf measurements for mmfileid command -DKTRACE Define this to build trace device into Linux kernel and allow trace statements in kernel (also define KTRACE). -DENABLE_SKIP_DATA_MOVE Enable the 'mmfsadm test disableDataXfer 0/1' command to skip moving data between user buffers and GPFS buffers and to skip data I/O. Allows simulating a higher metadata load than the actual data I/O configuration would support. */ CDEBUGFLAGS = KCDEBUGFLAGS = #ifdef GPFS_ARCH_POWER ARCH_DEFINES = -DGPFS_ARCH_POWER #endif #ifdef GPFS_ARCH_I386 ARCH_DEFINES = -DGPFS_ARCH_I386 -DGPFS_LITTLE_ENDIAN #endif #ifdef GPFS_ARCH_IA64 ARCH_DEFINES = \ -D__64BIT__ \ -DALIGNED_DATA_ACCESS \ -DGPFS_ARCH_IA64 \ -DGPFS_LITTLE_ENDIAN \ -DAPI_32BIT #endif #ifdef GPFS_ARCH_PPC64 ARCH_DEFINES = -DGPFS_ARCH_PPC64 -D__64BIT__ -DALIGNED_DATA_ACCESS #endif #ifdef GPFS_ARCH_X86_64 ARCH_DEFINES = -DGPFS_ARCH_X86_64 -D__64BIT__ -DGPFS_LITTLE_ENDIAN \ -DAPI_32BIT #endif /***********************************/ /* Defines common to all platforms */ /***********************************/ COMMON_DEFINES = \ -DALLOC_SUM_FILE \ -DBLOCK_RESTORE \ -DDESCQUORUM_OVERRIDE \ -DDIO \ -DDIO_XW \ -DDISK_LEASE_DMS \ -DDMAPI \ -DDMAPI_MOVERS \ -DDMAPI_PREFETCH_DIRATTRS \ -DEXPORTER_EVENTS \ -DFILESETS \ -DFILESET_QUOTAS \ -DGPFS_ERRNO_MAPPING \ -DGPFS_QUOTACTL \ -DLC_FENCING \ -DMMAP_DIO \ -DMMPMON \ -DMMPMON_CUMULATIVE \ -DMMPMON_DAEMON_PORT \ -DMMPMON_HISTOGRAMS \ -DMMPMON_NAMED_SOCKET \ -DMMPMON_RPC \ -DNFS_SKIP_SHRINK_TO_FIT \ -DNFS4_ACL \ -DNFS4_VCM \ -DNO_XCLUST \ -DPERF_STATS \ -DPOLICY \ -DPOLICY_RESTORE \ -DPOOLS \ -DPOW2_COND_SHIFT \ -DSANERGY \ -DSFS_PERF_SKIP_SYNC \ -DSFS_PERF_USE_SMALL_BUFFER \ -DSINGLE_PORT \ -DSMB_LOCKS \ -DTHREADED_RECEIVER \ -DTSCOMM_SECURITY \ -DUIDREMAP \ -DWAIT_FOR_NSD_SERVERS COMMON_TEMPSHIP_DEFINES = \ -DDBGASSERTS \ -DNEW_DELETE_DEBUG \ -DTRACK_USECOUNT \ -DTRIGGERS \ -DVERBOSETRACE COMMON_NEVERSHIP_DEFINES = \ -DINSTRUMENT_LOCKS \ -DPTHREAD_STATS \ -DTRACE_IO_DATA \ -DENTRYEXIT_TRACE #define DMAPI #define EXPORTER_EVENTS #define FILESETS #define MMPMON #define MMPMON_CUMULATIVE #define MMPMON_HISTOGRAMS #define PERF_STATS #define POLICY #define SANERGY #define SMB_LOCKS #define THREADED_RECEIVER /* #define TRY_AND_BUY */ #define TSCOMM_SECURITY /*********************/ /* AIX configuration */ /*********************/ #ifdef GPFS_AIX #define AIX5 /* 64-bit AIX build (on HACMP) */ /* #define GPFSBLD64 */ #ifdef GPFSBLD64 OPTFLAGS = -g KOPTFLAGS = -g EXTRASTD_CFLAGS = -q64 -qlargetype -qsuppress=1540-0053 EXTRASTD_LDFLAGS = -q64 -g EXTRALDFLAGS2 = -b64 EXTRAARFLAGS = -X64 EXTRAM4FLAGS = -D__64BIT__ EXTRAASFLAGS = -a64 MKTRCFMT_FLAGS = -q64 #else OPTFLAGS = KOPTFLAGS = #endif /* Build for AIX4 or AIX5 * To build on AIX 5.x, you'll need these ifdefs * -DSPAIXLVL=516 -DUSE51BREGS */ #ifndef AIX5 #define AIX4 #endif #ifdef AIX4 AIX_VERSION_DEPS = -DSPAIXLVL=432 #else AIX_VERSION_DEPS = -DSPAIXLVL=516 -DUSE51BREGS #endif SITE_OTHER_KINCLUDES = SITE_OTHER_KDEFINES = -D_KERNEL SITE_FAR_TRACE_OPTS = SITE_KFAR_TRACE_OPTS = DEFAULT_DEFINES = \ $(AIX_VERSION_DEPS) \ -D__FULL_PROTO \ -DGPFS_AIX TEMPSHIP_DEFINES = \ -DNEW_DELETE_TRACEBACKS EXTRAINSTROOTFLAGS = -s EXTRAINSTPROGFLAGS = -s #endif /* end of AIX */ /***********************/ /* Linux configuration */ /***********************/ #ifdef GPFS_LINUX SITE_OTHER_KDEFINES = -D_KERNEL -D__KERNEL__ -DMODULE \ -DGPFS_EXPORT_KSYMS -DEXPORT_SYMTAB COMMON_LINUX = \ -U_GNU_SOURCE \ -D__USE_BSD \ -D_LARGEFILE64_SOURCE \ -DGPFS_LINUX \ -DYESSTR=__YESSTR \ -DNOSTR=__NOSTR \ -DLUM \ -DNPTL \ -DSSEG_SWIZZLE_PTRS \ -D$(LINUX_DISTRIBUTION) \ -DLINUX_DISTRIBUTION_LEVEL=LINUX_DISTRIBUTION_LEVEL \ $(LINUX_PATCH_DEFINES) #define LUM #define SSEG_SWIZZLE_PTRS EXTRASTD_LDFLAGS = EXTRALDFLAGS2 = SITEMCRREV_RAW = "$Revision: 1.535.2.13 $ " /* If you add -g to OPTFLAGS, you must also comment out the define of * FAR_TRACE. It is recommended to remove the -fomit-frame-pointer * option for better debugging information. If you add -g to KOPTFLAGS, you * must comment out the define of KFAR_TRACE. */ /**********************/ /* Linux i386 defines */ /**********************/ #ifdef GPFS_ARCH_I386 OPTFLAGS = -g0 -O2 -march=i686 -fno-strict-aliasing -fno-exceptions \ -DGPFS_FRAME_POINTER KOPTFLAGS = -O2 -march=i686 -fno-strict-aliasing -fno-exceptions \ -fno-common -fomit-frame-pointer #if LINUX_KERNEL_VERSION > 2060500 #if LINUX_KERNEL_VERSION >= 2061600 COMMON_26_FLAGS += -m32 -ffreestanding KOPTFLAGS += $(COMMON_26_FLAGS) -mpreferred-stack-boundary=2 OPTFLAGS += $(COMMON_26_FLAGS) #endif /* LINUX_KERNEL_VERSION >= 2061600 */ #ifdef PCE_26_PCE #define NOKREGPARMS KOPTFLAGS += -mpreferred-stack-boundary=2 -DPCE_26_PCE OPTFLAGS += -DPCE_26_PCE #endif /* PCE_26_PCE */ #ifndef NOKREGPARMS KOPTFLAGS += -mregparm=3 -mpreferred-stack-boundary=2 #else SITE_OTHER_KDEFINES += -DNOKREGPARMS #endif #endif /* LINUX_KERNEL_VERSION > 2060500 */ #define KFAR_TRACE DEFAULT_DEFINES = \ $(COMMON_LINUX) \ -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION \ -DLIMIT_KSTACKS \ -DSSEG_RESERVE_MEM NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG #endif /* end of Linux i386 defines */ /***********************/ /* Linux Power defines */ /***********************/ #ifdef GPFS_ARCH_POWER OPTFLAGS = -g0 -O2 -fno-exceptions KOPTFLAGS = -O2 -msoft-float -fno-exceptions -fno-common #undef KFAR_TRACE DEFAULT_DEFINES = \ $(COMMON_LINUX) \ -DCONFIG_UP \ -DNO_ASM_SYNCH \ -DSSEG_RESERVE_MEM \ -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION TEMPSHIP_DEFINES = -DDISABLE_KERNEL_PANIC NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG #define NO_ASM_UTIL #endif /* end of Linux power defines */ /**********************/ /* Linux ia64 defines */ /**********************/ #ifdef GPFS_ARCH_IA64 OPTFLAGS = -g0 -O2 -fno-strict-aliasing -fno-exceptions KOPTFLAGS = -O2 -fno-strict-aliasing -fno-exceptions -fno-common #undef KFAR_TRACE #undef FAR_TRACE DEFAULT_DEFINES = \ $(COMMON_LINUX) \ -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG #endif /* end of Linux ia64 defines */ /***************************/ /* Linux PowerPC64 defines */ /***************************/ #ifdef GPFS_ARCH_PPC64 #if LINUX_KERNEL_VERSION < 2060000 CC = powerpc64-linux-g++ C_COMP = powerpc64-linux-gcc CPP = powerpc64-linux-cpp BARELD = powerpc64-linux-ld AR = powerpc64-linux-ar clq AS = powerpc64-linux-as KAR = powerpc64-linux-ld $(LDFLAGS2) -r -o RANLIB = powerpc64-linux-ranlib ARDEL = $(AR) d MAKEDEPEND = $(CC) CPLUSINC = -I/opt/cross/include #endif OPTFLAGS = -g0 -O2 -mminimal-toc -fno-exceptions KOPTFLAGS = -O -msoft-float -fno-exceptions #if LINUX_KERNEL_VERSION > 2060000 OPTFLAGS += -m64 -mpowerpc64 MAKEDEPEND = $(CC) -m64 #if (LINUX_KERNEL_VERSION >= 2061600) KOPTFLAGS += -m64 -mcall-aixdesc -mno-altivec -fno-common -ffreestanding -mtune=power4 -funit-at-a-time -mstring -fno-ivopts -Wa,-maltivec #else KOPTFLAGS += -m64 -mpowerpc64 -fno-common #endif EXTRASTD_LDFLAGS = -melf64ppc -m64 EXTRALDFLAGS2 = -melf64ppc BARELD += -melf64ppc ifeq ("$(LINUX_DISTRIBUTION)","REDHAT_AS_LINUX") #if LINUX_KERNEL_VERSION >= 2060905 KOPTFLAGS += -mcall-aixdesc #endif endif #endif DEFAULT_DEFINES = \ $(COMMON_LINUX) \ -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG #endif /* end of Linux PowerPC64 defines */ /**************************************/ /* Linux Opteron (aka x86_64) defines */ /**************************************/ #ifdef GPFS_ARCH_X86_64 OPTFLAGS = -g0 -O2 -fno-strict-aliasing -fno-exceptions -fPIC KOPTFLAGS = -O2 -fno-strict-aliasing -fno-exceptions -fno-common \ -mcmodel=kernel -mno-red-zone #undef KFAR_TRACE #undef FAR_TRACE DEFAULT_DEFINES = \ $(COMMON_LINUX) \ -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION \ -DLIMIT_KSTACKS /* SMART_PTR_DEBUG turned off in ODE build due to large performance hit */ NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG #endif /* end of Linux x86_64 defines */ #ifdef FAR_TRACE SITE_FAR_TRACE_OPTS = -DFAR_TRACE -DFAR_CODE -fno-defer-pop #else SITE_FAR_TRACE_OPTS = #endif #ifdef KFAR_TRACE SITE_KFAR_TRACE_OPTS = -DFAR_TRACE -DFAR_CODE -fno-defer-pop #else SITE_KFAR_TRACE_OPTS = #endif #endif /* end of Linux defines */ /* Build complete list of -D compile flags */ SITE_DEFINES = $(ARCH_DEFINES) $(DEFAULT_DEFINES) $(COMMON_DEFINES) /* kernel source build */ #ifdef SRC_BUILD SITE_DEFINES += -DSRC_BUILD #endif /* Force compiler options needed for gprof if necessary */ #ifdef GPROF_DAEMON CDEBUGFLAGS = -g -pg #endif