Changeset 7914


Ignore:
Timestamp:
03/13/19 00:04:40 (2 months ago)
Author:
baker
Message:

define all the *nix gmake/make compiler flags; prevents existing environment variables from breaking the build

Location:
trunk/environment
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/environment/ew_cygwin.bash

    r7716 r7914  
    2727# gcc -pthread compiles and links with POSIX Threads support 
    2828 
    29 export GLOBALFLAGS="-D_CYGWIN -Dlinux -D__i386 -D_LINUX -D_INTEL -D_USE_SCHED -pthread -D_USE_PTHREADS -D_USE_TERMIOS -I${EW_HOME}/${EW_VERSION}/include" 
     29# Set initial defaults 
    3030 
    31 export CFLAGS=$GLOBALFLAGS 
     31# C compiler flags (also used for ld flags) 
     32export CFLAGS="-g -pthread" 
     33# C++ compiler flags 
     34export CXXFLAGS="${CFLAGS}" 
     35# C preprocessor defs and includes 
     36export CPPFLAGS="-D_CYGWIN -D_LINUX -Dlinux -D_INTEL -D_USE_SCHED -D_USE_PTHREADS -D_USE_TERMIOS -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     37 
     38# Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     39# makefiles have been converted yet to use the implicit gmake target rules 
     40export GLOBALFLAGS="${CFLAGS} ${CPPFLAGS}" 
  • trunk/environment/ew_linux.bash

    r7839 r7914  
    7979   # gcc -pthread compiles and links with POSIX Threads support 
    8080 
    81    export GLOBALFLAGS="${TARGET} -g -D_LINUX -Dlinux -D_INTEL -D_USE_SCHED -pthread -D_USE_PTHREADS -D_USE_TERMIOS -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     81   # Set initial defaults for the gmake implicit .c.o and .cpp.o target rules 
     82 
     83   # C compiler flags (also used for ld flags) 
     84   export CFLAGS="${TARGET} -g -pthread ${WARNFLAGS}" 
     85   # C++ compiler flags 
     86   export CXXFLAGS="${CFLAGS}" 
     87   # C preprocessor defs and includes 
     88   export CPPFLAGS="-D_LINUX -Dlinux -D_INTEL -D_USE_SCHED -D_USE_PTHREADS -D_USE_TERMIOS -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     89 
     90   # Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     91   # makefiles have been converted yet to use the implicit gmake target rules 
     92   export GLOBALFLAGS="${CFLAGS} ${CPPFLAGS}" 
    8293 
    8394   # Use the Linux makefile.unix options 
    8495   export PLATFORM="LINUX" 
    85  
    86    # Set initial defaults 
    87    export CFLAGS=${GLOBALFLAGS} 
    88    export CXXFLAGS=${GLOBALFLAGS} 
    8996 
    9097else 
     
    114121   # ifort version 15 introduced the -init option; older compilers complain, but ignore it 
    115122   # ifort complains about comments past column 72; -warn truncated_source is pretty useless 
    116    #export FFLAGS="${TARGET} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -diag-disable 8290 -traceback" 
    117    export FFLAGS="${TARGET} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -diag-disable 8290 -traceback" 
     123   #export FFLAGS="${TARGET} -g -O3 -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -diag-disable 8290 -traceback" 
     124   export FFLAGS="${TARGET} -g -O3 -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -diag-disable 8290 -traceback" 
    118125 
    119126   # Intel Fortran supplies main() unless told not to 
  • trunk/environment/ew_linux_arm.bash

    r7839 r7914  
    7272   # gcc -pthread compiles and links with POSIX Threads support 
    7373 
    74    export GLOBALFLAGS="-g -D_LINUX -Dlinux -D_INTEL -D_USE_SCHED -pthread -D_USE_PTHREADS -D_USE_TERMIOS -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     74   # Set initial defaults for the gmake implicit .c.o and .cpp.o target rules 
     75 
     76   # C compiler flags (also used for ld flags) 
     77   export CFLAGS="-g -pthread ${WARNFLAGS}" 
     78   # C++ compiler flags 
     79   export CXXFLAGS="${CFLAGS}" 
     80   # C preprocessor defs and includes 
     81   export CPPFLAGS="-D_LINUX -Dlinux -D_INTEL -D_USE_SCHED -D_USE_PTHREADS -D_USE_TERMIOS -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     82 
     83   # Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     84   # makefiles have been converted yet to use the implicit gmake target rules 
     85   export GLOBALFLAGS="${CFLAGS} ${CPPFLAGS}" 
    7586 
    7687   # Use the Linux makefile.unix options 
    7788   export PLATFORM="LINUX" 
    78  
    79    # Set initial defaults 
    80    export CFLAGS=${GLOBALFLAGS} 
    81    export CXXFLAGS=${GLOBALFLAGS} 
    8289 
    8390else 
     
    94101 
    95102   # Extra run-time checks: -fcheck=all 
    96    #export FFLAGS="-O -g -Wuninitialized -Werror=line-truncation -ffpe-trap=invalid,zero,overflow -fcheck=all,no-array-temps -fbacktrace" 
    97    export FFLAGS="-O -g -Wuninitialized -Werror=line-truncation -ffpe-trap=invalid,zero,overflow -fbacktrace" 
     103   #export FFLAGS="-g -O -Wuninitialized -Werror=line-truncation -ffpe-trap=invalid,zero,overflow -fcheck=all,no-array-temps -fbacktrace" 
     104   export FFLAGS="-g -O -Wuninitialized -Werror=line-truncation -ffpe-trap=invalid,zero,overflow -fbacktrace" 
    98105 
    99106   # FC_MAIN_IS_C is not needed with gfortran 
  • trunk/environment/ew_macosx_intel.sh

    r7839 r7914  
    9494   # gcc -pthread compiles and links with POSIX Threads support 
    9595 
    96    export GLOBALFLAGS="${TARGET} -g -D_MACOSX -D_DARWIN_C_SOURCE -D_INTEL -D_USE_SCHED -pthread -D_USE_PTHREADS -D_DARWIN_USE_64_BIT_INODE -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     96   # Set initial defaults for the gmake implicit .c.o and .cpp.o target rules 
     97 
     98   # C compiler flags (also used for ld flags) 
     99   export CFLAGS="${TARGET} -g -pthread ${WARNFLAGS}" 
     100   # C++ compiler flags 
     101   export CXXFLAGS="${CFLAGS}" 
     102   # C preprocessor defs and includes 
     103   export CPPFLAGS="-D_MACOSX -D_DARWIN_C_SOURCE -D_INTEL -D_USE_SCHED -pthread -D_USE_PTHREADS -D_DARWIN_USE_64_BIT_INODE -I${EW_HOME}/${EW_VERSION}/include" 
     104 
     105   # This is needed for the linker to use our libutil instead of the MacOS libutil 
     106   export LDFLAGS=-Wl,-search_paths_first 
     107 
     108   # Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     109   # makefiles have been converted yet to use the implicit gmake target rules 
     110   export GLOBALFLAGS="${CFLAGS} ${CPPFLAGS}" 
    97111 
    98112   # MacOS uses the same makefile.unix options as Linux 
    99113   export PLATFORM="LINUX" 
    100  
    101    # Set initial defaults 
    102    export CFLAGS=${GLOBALFLAGS} 
    103    export CXXFLAGS=${GLOBALFLAGS} 
    104  
    105    # This is needed for the linker to use our libutil instead of the MacOS libutil 
    106    export LDFLAGS=-Wl,-search_paths_first 
    107114 
    108115else 
     
    132139   # ifort version 15 introduced the -init option; older compilers complain, but ignore it 
    133140   # ifort complains about comments past column 72; -warn truncated_source is pretty useless 
    134    #export FFLAGS="${TARGET} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -diag-disable 8290 -traceback" 
    135    export FFLAGS="${TARGET} -O3 -g -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -diag-disable 8290 -traceback" 
     141   #export FFLAGS="${TARGET} -g -O3 -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -check bounds,uninit -diag-disable 8290 -traceback" 
     142   export FFLAGS="${TARGET} -g -O3 -init=snan -init=arrays -extend-source -warn truncated_source -fpe-all=0 -diag-disable 8290 -traceback" 
    136143 
    137144   # Intel Fortran supplies main() unless told not to 
  • trunk/environment/ew_sol_intel.bash

    r7839 r7914  
    4040WARNFLAGS="" 
    4141 
    42 # -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) on a 32-bit compile; it is benign on a 64-bit compile 
     42# -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) 
     43# on a 32-bit compile; it is benign on a 64-bit compile 
    4344 
    4445# cc -mt compiles (-D_REENTRANT) and links with Solaris threads (-lthread) support 
    4546 
    46 export GLOBALFLAGS="${TARGET} -g -D_SOLARIS -D_INTEL -mt -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     47# Set initial defaults for the SunOS make implicit .c.o and .cpp.o target rules 
     48 
     49# C compiler flags (also used for ld flags) 
     50export CFLAGS="${TARGET} -g -mt ${WARNFLAGS}" 
     51# C++ compiler flags 
     52export CCFLAGS=$"{CFLAGS}" 
     53# C preprocessor defs and includes 
     54export CPPFLAGS="-D_SOLARIS -D_INTEL -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     55 
     56# Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     57# makefiles have been converted yet to use the implicit make target rules 
     58export GLOBALFLAGS="${CFLAGS} ${CPPFLAGS}" 
    4759 
    4860# Use the Solaris makefile.unix options 
    4961export PLATFORM="SOLARIS" 
    50  
    51 # Set initial defaults 
    52 export CFLAGS=${GLOBALFLAGS} 
    53 export CXXFLAGS=${GLOBALFLAGS} 
    5462 
    5563# Eventually replace with gfortran when we move away from Forte compilers 
     
    5866then 
    5967   export FC=f90 
    60    export FFLAGS="${TARGET} -O -g" 
     68   export FFLAGS="${TARGET} -g -O" 
    6169fi 
    6270 
  • trunk/environment/ew_sol_intel.cmd

    r7839 r7914  
    4545set WARNFLAGS = "" 
    4646 
    47 # -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) on a 32-bit compile; it is benign on a 64-bit compile 
     47# -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) 
     48# on a 32-bit compile; it is benign on a 64-bit compile 
    4849 
    4950# cc -mt compiles (-D_REENTRANT) and links with Solaris threads (-lthread) support 
    5051 
    51 setenv GLOBALFLAGS      "${TARGET} -g -D_SOLARIS -D_INTEL -mt -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     52# Set initial defaults for the SunOS make implicit .c.o and .cpp.o target rules 
     53 
     54# C compiler flags (also used for ld flags) 
     55setenv CFLAGS           "${TARGET} -g -mt ${WARNFLAGS}" 
     56# C++ compiler flags 
     57setenv CCFLAGS          "${CFLAGS}" 
     58# C preprocessor defs and includes 
     59setenv CPPFLAGS         "-D_SOLARIS -D_INTEL -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     60setenv FFLAGS           "${TARGET} -g -O" 
     61 
     62# Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     63# makefiles have been converted yet to use the implicit make target rules 
     64setenv GLOBALFLAGS      "${CFLAGS} ${CPPFLAGS}" 
    5265 
    5366# Use the Solaris makefile.unix options 
    5467setenv PLATFORM         "SOLARIS" 
    5568 
    56 # Set initial defaults 
    57 setenv CFLAGS           "${GLOBALFLAGS}" 
    58 setenv CXXFLAGS         "${GLOBALFLAGS}" 
    59 setenv FFLAGS           "${TARGET} -O -g" 
    60  
    6169# Number of available file descriptors 
    6270limit descriptors 256 
  • trunk/environment/ew_sol_sparc.bash

    r7839 r7914  
    4040WARNFLAGS="" 
    4141 
    42 # -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) on a 32-bit compile; it is benign on a 64-bit compile 
     42# -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) 
     43# on a 32-bit compile; it is benign on a 64-bit compile 
    4344 
    4445# cc -mt compiles (-D_REENTRANT) and links with Solaris threads (-lthread) support 
    4546 
    46 export GLOBALFLAGS="${TARGET} -g -D_SOLARIS -D_SPARC -mt -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     47# Set initial defaults for the SunOS make implicit .c.o and .cpp.o target rules 
     48 
     49# C compiler flags (also used for ld flags) 
     50export CFLAGS="${TARGET} -g -mt ${WARNFLAGS}" 
     51# C++ compiler flags 
     52export CCFLAGS="${CFLAGS}" 
     53# C preprocessor defs and includes 
     54export CPPFLAGS="-D_SOLARIS -D_SPARC -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     55 
     56# Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     57# makefiles have been converted yet to use the implicit make target rules 
     58export GLOBALFLAGS="${CFLAGS} ${CPPFLAGS}" 
    4759 
    4860# Use the Solaris makefile.unix options 
    4961export PLATFORM="SOLARIS" 
    50  
    51 # Set initial defaults 
    52 export CFLAGS=${GLOBALFLAGS} 
    53 export CXXFLAGS=${GLOBALFLAGS} 
    5462 
    5563# Eventually replace with gfortran when we move away from Forte compilers 
     
    5866then 
    5967   export FC=f90 
    60    export FFLAGS="${TARGET} -O -g" 
     68   export FFLAGS="${TARGET} -g -O" 
    6169fi 
    6270 
  • trunk/environment/ew_sol_sparc.cmd

    r7839 r7914  
    4545set WARNFLAGS = "" 
    4646 
    47 # -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) on a 32-bit compile; it is benign on a 64-bit compile 
     47# -D_FILE_OFFSET_BITS=64 is for Large Filesystem Support (64-bit offsets) 
     48# on a 32-bit compile; it is benign on a 64-bit compile 
    4849 
    4950# cc -mt compiles (-D_REENTRANT) and links with Solaris threads (-lthread) support 
    5051 
    51 setenv GLOBALFLAGS      "${TARGET} -g -D_SOLARIS -D_SPARC -mt -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include ${WARNFLAGS}" 
     52# Set initial defaults for the SunOS make implicit .c.o and .cpp.o target rules 
     53 
     54# C compiler flags (also used for ld flags) 
     55setenv CFLAGS           "${TARGET} -g -mt ${WARNFLAGS}" 
     56# C++ compiler flags 
     57setenv CCFLAGS          "${CFLAGS}" 
     58# C preprocessor defs and includes 
     59setenv CPPFLAGS         "-D_SOLARIS -D_SPARC -D_FILE_OFFSET_BITS=64 -I${EW_HOME}/${EW_VERSION}/include" 
     60setenv FFLAGS           "${TARGET} -g -O" 
     61 
     62# Earthworm makefiles override CFLAGS=$(GLOBALFLAGS) (for now), and not all 
     63# makefiles have been converted yet to use the implicit make target rules 
     64setenv GLOBALFLAGS      "${CFLAGS} ${CPPFLAGS}" 
    5265 
    5366# Use the Solaris makefile.unix options 
    5467setenv PLATFORM         "SOLARIS" 
    5568 
    56 # Set initial defaults 
    57 setenv CFLAGS           "${GLOBALFLAGS}" 
    58 setenv CXXFLAGS         "${GLOBALFLAGS}" 
    59 setenv FFLAGS           "${TARGET} -O -g" 
    60  
    6169# Number of available file descriptors 
    6270limit descriptors 256 
Note: See TracChangeset for help on using the changeset viewer.