source: gpfs_3.1_ker2.6.20/lpp/mmfs/src/config/site.mcr @ 152

Last change on this file since 152 was 16, checked in by rock, 17 years ago
File size: 40.5 KB
RevLine 
[16]1/* Copyright IBM 1995,2003 */
2/* $Id: site.mcr.proto,v 1.535.2.13 2006/10/26 05:44:16 mcnabb Exp $ */
3
4/******************************************************************************/
5/* Platform and Architecture Defines:                                         */
6/*                                                                            */
7/* Define the platform (operating system) and architecture (instruction set)  */
8/* settings. Only one platform and one architecture may be defined. Not all   */
9/* combinations are supported.                                                */
10/*                                                                            */
11/* Supported platform settings:                                               */
12/*                                                                            */
13/*    GPFS_AIX                                                                */
14/*    GPFS_LINUX                                                              */
15/*                                                                            */
16/* Supported architecture settings:                                           */
17/*                                                                            */
18/*    GPFS_ARCH_I386                                                          */
19/*    GPFS_ARCH_IA64                                                          */
20/*    GPFS_ARCH_POWER                                                         */
21/*    GPFS_ARCH_PPC64                                                         */
22/*    GPFS_ARCH_X86_64                                                        */
23/*                                                                            */
24/******************************************************************************/
25#define GPFS_LINUX
26#define GPFS_ARCH_I386
27
28
29#ifdef GPFS_LINUX
30/*****************************************************/
31/* Linux portability layer defines begin.            */
32/* Customer editable portion of config file.         */
33/*****************************************************/
34
35/* use #define SRC_BUILD to build the open source kernel module */
36#define SRC_BUILD_PLACEHOLDER
37
38/******************************************************************************/
39/* Linux Distribution Defines:                                                */
40/*                                                                            */
41/* Define the Linux distribution setting. Only one Linux distribution may be  */
42/* defined.                                                                   */
43/*                                                                            */
44/* Supported Distribution settings:                                           */
45/*                                                                            */
46/*    REDHAT_LINUX                                                            */
47/*    REDHAT_AS_LINUX                                                         */
48/*    SUSE_LINUX                                                              */
49/*    KERNEL_ORG_LINUX                                                        */
50/*                                                                            */
51/* Select REDHAT_AS_LINUX for:                                                */
52/*    - RedHat Advanced Server                                                */
53/*    - RedHat Enterprise Linux (AS|ES|WS).                                   */
54/*                                                                            */
55/* Select REDHAT_LINUX for RedHat professional                                */
56/*                                                                            */
57/* Select SUSE_LINUX for SuSE Enterprise Server                               */
58/*                                                                            */
59/******************************************************************************/
60LINUX_DISTRIBUTION = KERNEL_ORG_LINUX
61
62
63/******************************************************************************/
64/* Linux Distribution Level Defines:                                          */
65/*                                                                            */
66/* Define the Linux distribution level setting. Only one Linux distribution   */
67/* level may be defined.                                                      */
68/*                                                                            */
69/* NOTE:                                                                      */
70/*                                                                            */
71/* The DISTRIBUTION_LEVEL may be required if the patches for a common         */
72/* LINUX_KERNEL_VERSION diverge across a LINUX_DISTRIBUTION. For instance,    */
73/* RedHat 8 and RedHat 9 have different kernel patches for a similar version  */
74/* number kernel. For this example, LINUX_DISTRIBUTION_LEVEL would be set to  */
75/* "80" for RedHat 8 and "90" for RedHat 9.
76/*                                                                            */
77/******************************************************************************/
78#define LINUX_DISTRIBUTION_LEVEL 90
79
80
81/******************************************************************************/
82/* Linux Kernel Version Defines:                                              */
83/*                                                                            */
84/* Define the Linux kernel version and kernel includes directory settings.    */
85/* Only one Linux kernel version and one kernel includes directory may be     */
86/* defined.                                                                   */
87/*                                                                            */
88/* The Linux kernel version is determined from the first four components of   */
89/* the kernel string. It is important to note that the second, third and      */
90/* fourth components are specified with two digits. Any component less than   */
91/* 10 must be preceded by a '0', while any component greater than or equal to */
92/* 100 should specify '99'.                                                   */
93/*                                                                            */
94/* Examples:                                                                  */
95/*                                                                            */
96/*    2.4.18-21   would be 2041821                                            */
97/*    2.4.21-111  would be 2042199                                            */
98/*    2.6.5-7.139 would be 2060507                                            */
99/*                                                                            */
100/* The kernel includes directory is where GPFS will find the kernel headers   */
101/* for the kernel specified by the LINUX_KERNEL_VERSION define. The kernel    */
102/* includes location varies by Linux distribution.                            */
103/*                                                                            */
104/* Examples:                                                                  */
105/*                                                                            */
106/*    /lib/modules/`uname -r`/build/include                                   */
107/*    /lib/modules/`uname -r`/source/include                                  */
108/*    /usr/src/linux/include                                                  */
109/*                                                                            */
110/******************************************************************************/
111#define LINUX_KERNEL_VERSION 2062015
112KERNEL_HEADER_DIR = /usr/src/linux-headers-2.6.20-15-generic/include
113
114/******************************************************************************/
115/* Linux Build Directory (Needed for Linux 2.6 kernel only)                   */
116/*                                                                            */
117/* For Linux kernel version 2.6, kernel build directory needs to be specified */
118/* as well.                                                                   */
119/* If you are running a vanilla kernel, where in the headers and the build    */
120/* directories are in the standard place (i.e. under /lib/modules) then       */
121/* running "make Autoconfig" will set the correct values for                  */
122/* KERNEL_BUILD_DIR variable.                                                 */
123/*                                                                            */
124/* The kernel build directory is where the kernel build tools reside.         */
125/* These tools are required to build the GPFS modules for Linux.              */
126/* Examples:                                                                  */
127/*    /lib/modules/`uname -r`/build                                           */
128/*                                                                            */
129/******************************************************************************/
130KERNEL_BUILD_DIR = /lib/modules/2.6.20-15-generic/build
131
132/* Flags for building with desired Linux kernel patches.
133 * These are patches for specific problems we've discovered
134 * with the linux kernel and are providing interim patches
135 * for.  Each patch is described below and the desired patches
136 * should be uncommented under LINUX_PATCH_DEFINES.
137 *
138 * -DMMAP_LINUX_PATCH  Required for use of mmapped writes.
139 *
140 * Descriptions and downloads for these patches may be found at
141 * http://sourceforge.net/tracker/index.php?func=detail&aid=1153778&group_id=130828&atid=719124
142 */
143LINUX_PATCH_DEFINES = \
144/*  -DMMAP_LINUX_PATCH  */
145
146/*****************************************************/
147/* Linux portability layer defines end.              */
148/* Everything below here is irrelevent to customer   */
149/* compiles of the portability layer.                */
150/*****************************************************/
151#endif /* GPFS_LINUX */
152
153/* Descriptions of variables used by the build process:
154
155   The following variables are lists available to all makefiles:
156     DESTDIR              Root of the ts directory in the build tree.
157     CDEBUGFLAGS          Passed to all compiles of code that goes in mmfsd
158                            or other process-level code.  Empty by default;
159                            intended to be used temporarily within the
160                            Imakefile in a directory to turn on generation of
161                            assembly listings, say.
162     KCDEBUGFLAGS         Passed to all compiles of code that goes in kernel
163                            extensions.  Empty by default.
164     OPTFLAGS             Compiler optimization flags for daemon code and
165                            code that is compiled once and bound into both
166                            the daemon and the kernel.  Typical values are -g
167                            or -O.
168     KOPTFLAGS            Compiler optimization flags for code used exclusively
169                            in kernel modules.
170     ARCH_DEFINES         -D defines describing the machine architecture
171     DEFAULT_DEFINES      List of -D defines used for shipped product code.
172                            The complete list of possible -D values is given
173                            below.
174     TEMPSHIP_DEFINES     List of -D defines used for debuging, not shipped
175                            in product code after first few PTFs of new release.
176     NEVERSHIP_DEFINES    List of -D defines used for testing, never shipped
177                            in product code.
178     SITE_DEFINES         List of the complete set of -D defines used by each
179                            compilation in the build.  For testing, this will
180                            be the concatenation of DEFAULT_DEFINES,
181                            ARCH_DEFINES, TEMPSHIP_DEFINES, and
182                            NEVERSHIP_DEFINES.  For the shipped product,
183                            this will just contain DEFAULT_DEFINES and
184                            ARCH_DEFINES (and TEMPSHIP_DEFINES for a
185                            little while).
186
187     KERNEL_HEADER_DIR    Directory where Linux kernel header files are kept
188
189   The following variables are either defined or undefined by this file.
190   Tests of these are used in Imakefiles to conditionally control which
191   lines are processed.  For almost all of these there is a
192   corresponding -Dxxx that must be specified in SITE_DEFINES.
193
194     DMAPI                #define this to cause code implementing the DMAPI
195                            interface to GPFS to be built.  Requires -DDMAPI
196                            in SITE_DEFINES.
197     FAR_TRACE            #define this to cause calls to the routine that
198                            actually does TRACEn to be placed far away from
199                            the tests of whether tracing is enabled.  When
200                            tracing is off, this results in fewer I-cache
201                            misses, and therefore better performance.  Also
202                            controls several compiler options that are needed
203                            to get the correct code generated.  Cannot be
204                            used with -g.
205     LINUX_KERNEL_VERSION  #define this to match the version of the Linux
206                            include files being used for the applicable
207                            architecture type.  This is always an eight
208                            digit decimal number.  The first four
209                            digits give the major and minor kernel version
210                            numbers.  For Linux 2.4 these will always be
211                            0204, with the leading zero omitted.  The next
212                            two digits give the kernel subversion.  The last
213                            two digits give the patch level.  Thus the
214                            LINUX_KERNEL_VERSION of
215                              linux-2.4.18-14 is 2041814
216                            while
217                              linux-2.4.19    is 2041900
218
219                            The compile-time symbol LINUX_KERNEL_VERSION
220                            will be set to the same value as the make-time
221                            symbol LINUX_KERNEL_VERSION. 
222                            The GPFS_KERNEL_VERSION macro uses the same
223                            encoding of kernel version as does
224                            LINUX_KERNEL_VERSION, and can be used to
225                            conditionally compile version dependent code.
226     GPROF_DAEMON         #define this to compile and link the daemon for
227                            gprof.  Use 'mmfsadm test gprof on|off' to control
228                            when profiling is enabled.  (Not tested in years,
229                            may not work.)
230     TRY_AND_BUY          #define this to build a "try and buy" version of
231                            GPFS with a timeout license key
232     MMPMON               #define this to build support for MMPMON remote
233                            performance monitoring services.  Requires -DMMPMON
234                            in SITE_DEFINES.
235     MMPMON_CUMULATIVE    #define this to build support for MMPMON remote
236                            performance monitoring cumulative all-time stats.
237          Requires -DMMPMON in SITE_DEFINES.
238     MMPMON_HISTOGRAMS    #define this to build support for MMPMON remote
239                            performance monitoring latency histogram data.
240          Requires -DMMPMON *and* -DMMPMON_HISTOGRAMS
241                            in SITE_DEFINES.
242     EXPORTER_EVENTS      #define this to enable the APPEND_EXPORTER_EVENT code
243          originally used by the Java GUI
244     SMB_LOCKS            #define this to add SMB share mode and oplock support
245                            Requires -DSMB_LOCKS in SITE_DEFINES
246     CCL                  #define this to add support for CIFS Compatibility
247                           Layer.  Requires -DCCL in SITE_DEFINES
248     KTRACE               #define this to build trace device into Linux
249                            kernel and allow trace statements in kernel.
250                            Requires -DKTRACE in SITE_DEFINES
251     NO_ASM_UTIL          #define this to prevent the use of assembler versions
252                            of utility routines in classes/basic directory
253     CROSS_COMPILE        #define this when cross-compiling to avoid running
254                            tools that must be built for the target system but
255                            run on the build system (e.g. chksystypes program)
256     POLICY               #define this to compile the policy library. Use with
257                      -DPOOLS and -DPOLICY
258     NOKREGPARMS          #define this to build gpfs compatable for a
259          custom built 2.6 kernel with CONFIG_REGPARMS
260          turned off.
261
262   Descriptions of all -Dxxx values that control building GPFS features.
263   To generate optional code add one or more of the following to
264   SITE_DEFINES:
265
266   Standard system features
267     -D__FULL_PROTO       Used by AIX header files to ensure that prototypes
268                          of functions include full parameter list.  Needed
269                          since these functions have a C calling convention and
270                          thus must always be defined with their full proto.
271     -DBLOCK_RESTORE      Add support for block level incremental
272                      backup & restore.
273     -DDIO                Direct I/O support
274     -DDIO_XW             Define this to allow direct I/O writes to
275                            allocate new data blocks rather than falling
276                            back to normal I/O, provided that write request
277                            is block-aligned block multiple.  DIO will use
278                            xw byte-range lock rather than whole-file sx
279                            lock for block-sized I/O.
280     -DDISK_LEASE_DMS     Add support for a deadman switch.  When disk leasing
281                            is on, a kernel timer will be turned on, to be
282                            restarted whenever a new lease is obtained.  If
283                            the lease cannot be renewed, and timer expires,
284                            and there's still some outstanding I/O requests,
285                            the node is paniced.
286     -DDMAPI              Activate DMAPI code (also define DMAPI).
287     -DDMAPI_MOVERS       Activate DMAPI parallel movers code.
288     -DDMAPI_PREFETCH_DIRATTRS Active parallel dm_get_dirattr and dm_get_dmattr
289     -DLC_FENCING         Enable LC fencing of VSD disks
290     -DMMAP_DIO           Change mmap page-out to use direct I/O to write
291                            the page if a GPFS data buffer is not available.
292                            This removes the requirement that read/write
293                            mapped pages always have a GPFS data buffer to
294                            back them.  Requires -DDIO.
295     -DNFS_SKIP_SHRINK_TO_FIT Don't do shrink to fit for NFS when the open
296                            file is not empty.
297     -DPOW2_COND_SHIFT    Enable code that implements multiplies and divides
298                            by shifts when possible.
299     -DSANERGY            Enable SANergy interfaces.
300     -DSFS_PERF_SKIP_SYNC Performance improvement to skip multiple sync calls
301                            for the same file.
302     -DSFS_PERF_USE_SMALL_BUFFER try to use small buffers to avoid reading
303                            data that might not be referenced.
304     -DSMB_LOCKS          Add support for SMB open locks and oplocks.
305     -DSPAIXLVL=432       AIX level. Must use this option when compiling on
306                            AIX 4.3.2 (with new compiler).
307     -DSPAIXLVL=433       Must use this option when compiling on AIX 4.3.3
308     -DSPAIXLVL=516       Must use this option when compiling on AIX 5.1.6+
309     -DMMPMON             Enable MMPMON performance monitoring
310       (also enable -DMMPMON.)
311     -DMMPMON_CUMULATIVE  Enable MMPMON performance monitoring cumulative
312        all time stats (also enable -DMMPMON and
313        define MMPMON)
314     -DMMPMON_DAEMON_PORT Enable code that allows mmpmon/EE connections via
315                           the standard daemon port.  Authentication done by
316                           llcomm.  Compatible with MMPMON_NAMED_SOCKET.
317     -DMMPMON_HISTOGRAMS  Enable MMPMON performance monitoring latency
318        histograms (also enable -DMMPMON and
319        define MMPMON + MMPMON_HISTOGRAMS.)
320     -DMMPMON_NAMED_SOCKET Enable MMPMON named socket instead of the
321                           independent EE network port.  Mutually exclusive.
322     -DMMPMON_RPC         Enable MMPMON rpc interface
323     -DEXPORTER_EVENTS    Enable the APPEND_EXPORTER_EVENT code
324          originally used by the Java GUI
325     -DFAR_TRACE          LINUX: Generate calls to the TRACE subroutine
326                            out-of-line with respect to the tests of whether
327                            tracing is enabled.  Do not explicitly include
328                            this in the list of -D options; it will be
329                            provided automatically if FAR_TRACE or
330                            KFAR_TRACE is #defined.
331     -DFAR_CODE           LINUX: Enable the BEGIN_FAR_CODE/END_FAR_CODE macros
332                            to place arbitrary uncommonly executed code
333                            out-of-line.  Requires -DFAR_TRACE.  Do not
334                            explicitly include this in the list of -D
335                            options; it will be provided automatically
336                            if FAR_TRACE or KFAR_TRACE is #defined.
337     -DUSE51BREGS         AIX: Use AIX 5.1.B register semantics in assembler
338                          code.  Must be turned on for code that will
339                          run on AIX 5.x.
340     -DTSCOMM_SECURITY    Enable support for secure network communication.
341     -DLIMIT_KSTACKS      Generate code that is less efficient in the GPFS
342                            kernel module, but that uses less kernel stack
343                            space.  Needed on i386 for Linux kernel versions
344                            at or beyond 2.6.6.
345     -DPERF_STATS         Additional performance statistics for benchmark runs
346
347   Defines for new upcoming features:
348     -DCCL                Add support for CIFS Compatibility Layer.
349     -DEE_WATCHDOG_START  Start the EE watchdog thread (checks for anomolies)
350                          This feature used to be enabled, but since there
351                          is currently no consumer for its data, it is now
352                          disabled by default.
353     -DNFS4_CLUSTER       Add support for NFS Version 4.
354                            Requires the 2.4.18 nfsv4 kernel.
355     -DNFS4_ACL           Add support for NFSv4 ACLs.
356     -DNFS4_VCM           Add support for the AIX VCM (NFSv4 locking)
357
358     -DDESCQUORUM_OVERRIDE Add support for manual overrides of the stripe
359                             group descriptor quorum.
360     -DUIDREMAP           Enable support for UID remapping in multicluster
361                          environment.
362     -DALLOC_SUM_FILE     Enable support allocation summary file
363
364     -DCHECK_KXTIMESTAMP  Enable code that a) links both mmfsd and mmfs with
365                          an object that contains a timestamp b) checks very
366                          early during daemon startup that kernel and userspace
367                          code have the same timestamp, i.e. the kernel
368                          extension loaded in memory is from the same build as
369                          the currently starting daemon.  The intent is to
370                          prevent hard-to-diagnose problems arising (on AIX,
371                          most often) from having a stale kernel extension
372                          loaded after installing a new build.  Will only be
373                          enabled in ADE/ODE builds, although CVS builders
374                          can enable it as well.
375     -DPOOLS              Add support for multiple disk storage pools.
376     -DFILESETS           Add support for filesets.
377     -DFILESET_QUOTAS     Add support for fileset quotas. Must be used with
378                          FILESETS.
379     -DPOLICY             Policy language and commands - used with POOLS and FILESETS, prereq
380     -DPOLICY_RESTORE       Initial support for new RESTORE policy attributes
381     -DPOLICY_RESTORE_RULES Add support for new RESTORE policy rules
382     -DSINGLE_PORT        Enable support for use of a single port number.
383     -DTHREADED_RECEIVER  Enables multi-threaded receiver code.
384     -DNO_XCLUST          Avoid sending cross-cluster RPCs between different
385                          remote clusters
386     -DWAIT_FOR_NSD_SERVERS Enables the feature to wait for NSD servers to
387                          come up on mounts, when cluster is first formed,
388                          and other select situations (see doc for details.)
389
390   Defines for non GA versions of the code but turned on for our web
391   based "try and buy" version of GPFS.
392     -DTRY_AND_BUY        Build a "try and buy" version of
393                            GPFS with a timeout license key
394
395   Defines for Normal testing, not for shipped systems:
396     -DDBGASSERTS         Generate code for DBGASSERT macros
397     -DTRIGGERS           Respond to 'test trigger xxx' commands
398     -DTRACK_USECOUNT     Code to track contributing threads to a stripe
399                            group's use count.
400     -DDIRCHECKASSERTS    Check validity of directory disk data structures
401                            frequently, and assert when an inconsistency is
402                            found.  Expensive, so separated from DBGASSERTS.
403     -DPTHREAD_STATS      Generate code to count how many times various
404                            paths are taken through thread, mutex, and
405                            condition variable code.
406     -DNO_ASM_SYNCH       Disable implementation of fast versions of mutex
407                            acquire/release in assembler.  Enables trace
408                            calls and some debugging code under -DDBGASSERTS
409                            that is not supported by the assembler
410                            implementation.  Required if -DTRACK_RESOURCE_USAGE
411                            is used.
412     -DINSTRUMENT_LOCKS   Enable summary lock instrumentation for mutexes
413                            and lock objects.  Requires -DPTHREAD_STATS.
414     -DINSTRUMENT_DETAIL_LOCKS
415                          Also enable per-mutex lock instrumentation.
416                            Requires -DINSTRUMENT_LOCKS.
417     -DTM_DETAIL_STATS    Extra counters to track which token prefetches
418                            are useful and which are not.
419     -DVERBOSETRACE       Generate code to produce traces for trace levels > 10
420     -DGPFS_FRAME_POINTER Tell GPFS code that -fomit-frame-pointer was not
421                           specified, so frame pointer is available. Use
422                           either -fomit-frame-pointer or -DGPFS_FRAME_POINTER
423                           when defining OPTFLAGS
424     -DENTRYEXIT_TRACE    Enable routine entry/exit tracing that is controlled
425                           by mmfsadm trace entryexit <n>
426     -DKSTACK_CHECK       Keep track of how much kernel stack space is used
427                           within GPFS kernel modules.  Print tracebacks of
428                           the point of maximum stack usage if it exceeds a
429                           threshhold.  Can only be used on Linux.
430
431   Defines for weird test conditions, not normally used:
432     -DPOW2_FORCE_SHIFT   Do only shifts for some math. Requires that all
433                          GPFS block sizes be power of 2.
434                          Since VTS uses 384K blocksize, this is not a
435                          shipable option.
436     -DTIME_MUTEXES       Time how long mutexes are held.  Summary produced
437                            by 'mmfsadm dump lstat'. 
438                            Requires -DINSTRUMENT_LOCKS.
439     -DGPFS_PRINTF        On Linux, send trace output to the console via printk
440                            instead of collecting trace output using ltrace.
441                            (requires GPFS_LINUX).
442     -DTSCAN              Enable trace points used by the tscan utility to
443                            measure CPU usage by system call.
444     -DTRACK_RESOURCE_USAGE
445                          Keep track of resources (locks, mutexes, buffers,
446                            threads, etc.) held by a thread and verify that
447                            resources are acquired in a consistent order.
448                            Requires -DNO_ASM_SYNCH.
449     -DSUPPORT_FOR_DOS_STATFS  Hack for DOS client fsstat
450     -DDACSPY             Counts the number of times objects of each of
451                            the dynamic array classes are created.
452                            The classes are defined via the DECL_ARRAY_CLASS
453                            macro in DAC.h.  This optional instrumentation
454                            allows for determining which objects being
455                            allocated on the heap may require allocation
456                            optimization such as via a linked list of
457                            preallocated objects.
458     -DMALLOC_DEBUG       Generate code to track the file and line number from
459                            which each block of MALLOCed storage was allocated
460     -DTRACE_IO_DATA      If RTPERF trace level is >= 3, dump the first few
461                            words of data read or written by any disk I/O
462                            operation.  This is a security exposure, and should
463                            not be turned on in production.
464     -DNEW_DELETE_DEBUG   Override global operators new and delete, to assist
465                            in finding uninitialized dynamic storage, writing
466                            beyond the end of an allocated object, reference to
467                            deleted objects, and storage leaks.  The 'mmfsadm
468                            test newdebug' command enables some of these
469                            features.
470     -DNEW_DELETE_TRACEBACKS
471                          Save the call stack on memory allocations tracked
472                            by -DNEW_DELETE_DEBUG.  Not supported on Linux.
473     -DDIR_VERSION_NUMBERS
474                          Increment one of the reserved words in directory
475                            block headers each time the block is written to
476                            disk.  Helps to sequence directory updates in time
477                            across multiple nodes.  Should never be turned on
478                            except on file systems that will be reformatted.
479     -DTEST_SMALL_DISKS=x When creating a file system or adding disks,
480                            artificially limit the disk size to x megabytes.
481                            Useful for testing ENOSPC conditions without having
482                            to fill up large disks or creating new, smaller
483                            logical volumes.
484     -DTEST_DELDISK       Ignore all but the first disk listed in mount
485                            options.  This is useful when testing so that
486                            the tsdeldisk and tsrpldisk commands can be used
487                            without the "mm" commands.
488     -DNO_VFS_STATS       Do not generate any code to generate statistics for
489                            the 'mmfsadm vfsstats {enable|disable|reset|show}'
490                            family of commands.
491     -DSTOP_TRACE_ON_FAILURE Set all trace flags to 0 as soon as LOGASSERT
492                            is triggered or deamon cleanup begins.
493     -DDEBUG_SPINLOCK     Define this if Linux kernel is built with
494                            CONFIG_DEBUG_SPINLOCK.
495     -DFILEIDCMD_PERF     Define this to enable perf measurements for mmfileid
496                            command
497     -DKTRACE             Define this to build trace device into Linux
498                            kernel and allow trace statements in kernel
499                            (also define KTRACE).
500     -DENABLE_SKIP_DATA_MOVE Enable the 'mmfsadm test disableDataXfer 0/1'
501                            command to skip moving data between user buffers
502                            and GPFS buffers and to skip data I/O.  Allows
503                            simulating a higher metadata load than the actual
504                            data I/O configuration would support.
505*/
506
507CDEBUGFLAGS =
508KCDEBUGFLAGS =
509
510#ifdef GPFS_ARCH_POWER
511ARCH_DEFINES = -DGPFS_ARCH_POWER
512#endif
513
514#ifdef  GPFS_ARCH_I386
515ARCH_DEFINES = -DGPFS_ARCH_I386 -DGPFS_LITTLE_ENDIAN
516#endif
517
518#ifdef  GPFS_ARCH_IA64
519ARCH_DEFINES = \
520  -D__64BIT__ \
521  -DALIGNED_DATA_ACCESS \
522  -DGPFS_ARCH_IA64 \
523  -DGPFS_LITTLE_ENDIAN \
524  -DAPI_32BIT
525#endif
526
527#ifdef  GPFS_ARCH_PPC64
528ARCH_DEFINES = -DGPFS_ARCH_PPC64 -D__64BIT__ -DALIGNED_DATA_ACCESS
529#endif
530
531#ifdef  GPFS_ARCH_X86_64
532ARCH_DEFINES = -DGPFS_ARCH_X86_64 -D__64BIT__ -DGPFS_LITTLE_ENDIAN \
533               -DAPI_32BIT
534#endif
535
536/***********************************/
537/* Defines common to all platforms */
538/***********************************/
539COMMON_DEFINES = \
540  -DALLOC_SUM_FILE \
541  -DBLOCK_RESTORE \
542  -DDESCQUORUM_OVERRIDE \
543  -DDIO \
544  -DDIO_XW \
545  -DDISK_LEASE_DMS \
546  -DDMAPI \
547  -DDMAPI_MOVERS \
548  -DDMAPI_PREFETCH_DIRATTRS \
549  -DEXPORTER_EVENTS \
550  -DFILESETS \
551  -DFILESET_QUOTAS \
552  -DGPFS_ERRNO_MAPPING \
553  -DGPFS_QUOTACTL \
554  -DLC_FENCING \
555  -DMMAP_DIO \
556  -DMMPMON \
557  -DMMPMON_CUMULATIVE \
558  -DMMPMON_DAEMON_PORT \
559  -DMMPMON_HISTOGRAMS \
560  -DMMPMON_NAMED_SOCKET \
561  -DMMPMON_RPC \
562  -DNFS_SKIP_SHRINK_TO_FIT \
563  -DNFS4_ACL \
564  -DNFS4_VCM \
565  -DNO_XCLUST \
566  -DPERF_STATS \
567  -DPOLICY \
568  -DPOLICY_RESTORE \
569  -DPOOLS \
570  -DPOW2_COND_SHIFT \
571  -DSANERGY \
572  -DSFS_PERF_SKIP_SYNC \
573  -DSFS_PERF_USE_SMALL_BUFFER \
574  -DSINGLE_PORT \
575  -DSMB_LOCKS \
576  -DTHREADED_RECEIVER \
577  -DTSCOMM_SECURITY \
578  -DUIDREMAP \
579  -DWAIT_FOR_NSD_SERVERS
580
581COMMON_TEMPSHIP_DEFINES = \
582  -DDBGASSERTS \
583  -DNEW_DELETE_DEBUG  \
584  -DTRACK_USECOUNT \
585  -DTRIGGERS \
586  -DVERBOSETRACE
587
588COMMON_NEVERSHIP_DEFINES = \
589  -DINSTRUMENT_LOCKS \
590  -DPTHREAD_STATS \
591  -DTRACE_IO_DATA \
592  -DENTRYEXIT_TRACE
593
594#define DMAPI
595#define EXPORTER_EVENTS
596#define FILESETS
597#define MMPMON
598#define MMPMON_CUMULATIVE
599#define MMPMON_HISTOGRAMS
600#define PERF_STATS
601#define POLICY
602#define SANERGY
603#define SMB_LOCKS
604#define THREADED_RECEIVER
605/* #define TRY_AND_BUY */
606#define TSCOMM_SECURITY
607
608/*********************/
609/* AIX configuration */
610/*********************/
611#ifdef GPFS_AIX
612#define AIX5
613
614/* 64-bit AIX build (on HACMP) */
615/* #define GPFSBLD64 */
616
617#ifdef GPFSBLD64
618  OPTFLAGS = -g
619  KOPTFLAGS = -g
620  EXTRASTD_CFLAGS = -q64 -qlargetype -qsuppress=1540-0053
621  EXTRASTD_LDFLAGS = -q64 -g
622  EXTRALDFLAGS2 = -b64
623  EXTRAARFLAGS = -X64
624  EXTRAM4FLAGS = -D__64BIT__
625  EXTRAASFLAGS = -a64
626  MKTRCFMT_FLAGS = -q64
627#else
628  OPTFLAGS =
629  KOPTFLAGS =
630#endif
631
632/* Build for AIX4 or AIX5
633 * To build on AIX 5.x, you'll need these ifdefs
634 *   -DSPAIXLVL=516 -DUSE51BREGS
635 */
636#ifndef AIX5
637#define AIX4
638#endif
639
640#ifdef AIX4
641  AIX_VERSION_DEPS = -DSPAIXLVL=432
642#else
643  AIX_VERSION_DEPS = -DSPAIXLVL=516 -DUSE51BREGS
644#endif
645
646SITE_OTHER_KINCLUDES =
647SITE_OTHER_KDEFINES = -D_KERNEL
648
649SITE_FAR_TRACE_OPTS =
650SITE_KFAR_TRACE_OPTS =
651
652DEFAULT_DEFINES = \
653  $(AIX_VERSION_DEPS) \
654  -D__FULL_PROTO \
655  -DGPFS_AIX
656
657TEMPSHIP_DEFINES = \
658  -DNEW_DELETE_TRACEBACKS
659
660EXTRAINSTROOTFLAGS = -s
661EXTRAINSTPROGFLAGS = -s
662
663#endif /* end of AIX */
664
665/***********************/
666/* Linux configuration */
667/***********************/
668#ifdef GPFS_LINUX
669
670SITE_OTHER_KDEFINES = -D_KERNEL -D__KERNEL__ -DMODULE \
671                      -DGPFS_EXPORT_KSYMS -DEXPORT_SYMTAB
672
673COMMON_LINUX = \
674  -U_GNU_SOURCE \
675  -D__USE_BSD \
676  -D_LARGEFILE64_SOURCE \
677  -DGPFS_LINUX \
678  -DYESSTR=__YESSTR \
679  -DNOSTR=__NOSTR \
680  -DLUM \
681  -DNPTL \
682  -DSSEG_SWIZZLE_PTRS \
683  -D$(LINUX_DISTRIBUTION) \
684  -DLINUX_DISTRIBUTION_LEVEL=LINUX_DISTRIBUTION_LEVEL \
685  $(LINUX_PATCH_DEFINES)
686
687#define LUM
688#define SSEG_SWIZZLE_PTRS
689
690EXTRASTD_LDFLAGS =
691EXTRALDFLAGS2 = 
692
693SITEMCRREV_RAW = "$Revision: 1.535.2.13 $ "
694
695/* If you add -g to OPTFLAGS, you must also comment out the define of
696 * FAR_TRACE.  It is recommended to remove the -fomit-frame-pointer
697 * option for better debugging information.  If you add -g to KOPTFLAGS, you
698 * must comment out the define of KFAR_TRACE.
699 */
700
701/**********************/
702/* Linux i386 defines */
703/**********************/
704#ifdef GPFS_ARCH_I386
705
706OPTFLAGS  = -g0 -O2 -march=i686 -fno-strict-aliasing -fno-exceptions \
707            -DGPFS_FRAME_POINTER
708
709KOPTFLAGS = -O2 -march=i686 -fno-strict-aliasing -fno-exceptions \
710            -fno-common -fomit-frame-pointer
711
712#if LINUX_KERNEL_VERSION > 2060500
713
714#if LINUX_KERNEL_VERSION >= 2061600
715COMMON_26_FLAGS += -m32 -ffreestanding                                                                                     
716KOPTFLAGS += $(COMMON_26_FLAGS) -mpreferred-stack-boundary=2                                                               
717OPTFLAGS  += $(COMMON_26_FLAGS)                                                                                           
718#endif /* LINUX_KERNEL_VERSION >= 2061600 */
719                                                                                 
720#ifdef PCE_26_PCE
721#define NOKREGPARMS
722KOPTFLAGS += -mpreferred-stack-boundary=2 -DPCE_26_PCE
723OPTFLAGS  += -DPCE_26_PCE           
724#endif /* PCE_26_PCE */
725
726#ifndef NOKREGPARMS
727KOPTFLAGS += -mregparm=3 -mpreferred-stack-boundary=2
728#else
729SITE_OTHER_KDEFINES += -DNOKREGPARMS
730#endif
731#endif /* LINUX_KERNEL_VERSION > 2060500 */
732
733#define KFAR_TRACE
734
735DEFAULT_DEFINES = \
736  $(COMMON_LINUX) \
737  -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION \
738  -DLIMIT_KSTACKS \
739  -DSSEG_RESERVE_MEM
740
741NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG
742
743#endif /* end of Linux i386 defines */
744
745
746/***********************/
747/* Linux Power defines */
748/***********************/
749#ifdef GPFS_ARCH_POWER
750
751OPTFLAGS = -g0 -O2 -fno-exceptions
752KOPTFLAGS = -O2 -msoft-float -fno-exceptions -fno-common
753
754#undef KFAR_TRACE
755
756DEFAULT_DEFINES = \
757  $(COMMON_LINUX) \
758  -DCONFIG_UP \
759  -DNO_ASM_SYNCH \
760  -DSSEG_RESERVE_MEM \
761  -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION
762
763TEMPSHIP_DEFINES = -DDISABLE_KERNEL_PANIC
764NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG
765
766#define NO_ASM_UTIL
767
768#endif /* end of Linux power defines */
769
770
771/**********************/
772/* Linux ia64 defines */
773/**********************/
774#ifdef GPFS_ARCH_IA64
775
776OPTFLAGS = -g0 -O2 -fno-strict-aliasing -fno-exceptions
777KOPTFLAGS = -O2 -fno-strict-aliasing -fno-exceptions -fno-common
778
779#undef KFAR_TRACE
780#undef FAR_TRACE
781
782DEFAULT_DEFINES = \
783  $(COMMON_LINUX) \
784  -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION
785
786NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG
787
788#endif /* end of Linux ia64 defines */
789
790/***************************/
791/* Linux PowerPC64 defines */
792/***************************/
793#ifdef GPFS_ARCH_PPC64
794
795#if LINUX_KERNEL_VERSION < 2060000
796CC = powerpc64-linux-g++
797C_COMP = powerpc64-linux-gcc
798CPP = powerpc64-linux-cpp
799BARELD = powerpc64-linux-ld
800AR = powerpc64-linux-ar clq
801AS = powerpc64-linux-as
802KAR = powerpc64-linux-ld $(LDFLAGS2) -r -o
803RANLIB = powerpc64-linux-ranlib
804ARDEL = $(AR) d
805MAKEDEPEND = $(CC)
806CPLUSINC = -I/opt/cross/include
807#endif
808
809OPTFLAGS = -g0 -O2 -mminimal-toc -fno-exceptions
810KOPTFLAGS = -O -msoft-float -fno-exceptions
811
812#if LINUX_KERNEL_VERSION > 2060000
813OPTFLAGS += -m64 -mpowerpc64
814MAKEDEPEND = $(CC) -m64
815#if (LINUX_KERNEL_VERSION >= 2061600)
816KOPTFLAGS += -m64 -mcall-aixdesc -mno-altivec -fno-common -ffreestanding -mtune=power4 -funit-at-a-time -mstring -fno-ivopts -Wa,-maltivec
817#else
818KOPTFLAGS += -m64 -mpowerpc64 -fno-common
819#endif
820
821EXTRASTD_LDFLAGS = -melf64ppc -m64
822EXTRALDFLAGS2 =  -melf64ppc
823BARELD += -melf64ppc
824
825ifeq ("$(LINUX_DISTRIBUTION)","REDHAT_AS_LINUX")
826#if LINUX_KERNEL_VERSION >= 2060905
827KOPTFLAGS += -mcall-aixdesc
828#endif
829endif
830
831#endif
832
833
834DEFAULT_DEFINES = \
835  $(COMMON_LINUX) \
836  -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION
837
838NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG
839
840#endif /* end of Linux PowerPC64 defines */
841
842/**************************************/
843/* Linux Opteron (aka x86_64) defines */
844/**************************************/
845#ifdef GPFS_ARCH_X86_64
846
847OPTFLAGS = -g0 -O2 -fno-strict-aliasing -fno-exceptions -fPIC
848KOPTFLAGS = -O2 -fno-strict-aliasing -fno-exceptions -fno-common \
849            -mcmodel=kernel -mno-red-zone
850
851#undef KFAR_TRACE
852#undef FAR_TRACE
853
854DEFAULT_DEFINES = \
855  $(COMMON_LINUX) \
856  -DLINUX_KERNEL_VERSION=LINUX_KERNEL_VERSION \
857  -DLIMIT_KSTACKS
858
859/* SMART_PTR_DEBUG turned off in ODE build due to large performance hit */
860NEVERSHIP_DEFINES = -DKSTACK_CHECK -DSMART_PTR_DEBUG
861
862#endif /* end of Linux x86_64 defines */
863
864#ifdef FAR_TRACE
865SITE_FAR_TRACE_OPTS = -DFAR_TRACE -DFAR_CODE -fno-defer-pop
866#else
867SITE_FAR_TRACE_OPTS =
868#endif
869
870#ifdef KFAR_TRACE
871SITE_KFAR_TRACE_OPTS = -DFAR_TRACE -DFAR_CODE -fno-defer-pop
872#else
873SITE_KFAR_TRACE_OPTS =
874#endif
875
876#endif /* end of Linux defines */
877
878/* Build complete list of -D compile flags */
879SITE_DEFINES = $(ARCH_DEFINES) $(DEFAULT_DEFINES) $(COMMON_DEFINES)
880
881/* kernel source build */
882#ifdef SRC_BUILD
883SITE_DEFINES += -DSRC_BUILD
884#endif
885
886
887/* Force compiler options needed for gprof if necessary */
888#ifdef GPROF_DAEMON
889CDEBUGFLAGS = -g -pg
890#endif
891
Note: See TracBrowser for help on using the repository browser.