Revision: | 1.59 |
Committed: | Sat May 14 06:55:09 2011 UTC (13 years, 11 months ago) by muzaffar |
Branch: | MAIN |
CVS Tags: | CMSSW_4_4_5_patch2, CMSSW_4_4_5_patch1, CMSSW_4_4_5, sm120813-44X, CMSSW_4_4_4-ports, CMSSW_4_4_4, sm20120309, sm20120309-ports, sm20120228-44X-ports, sm20120228-44X, sm120220-ports, sm120220, CMSSW_4_4_3_patch1-ports, CMSSW_4_4_3_patch1, vs20120215-50X, vs20120215-44X, vs20120215-44X-ports, da20120214-50X, CMSSW_5_0_1_patch3, daForCMSSW_5_0_1_patch3b-slc5_amd64_gcc434, daForCMSSW_5_0_1_patch3-slc5_amd64_gcc434, CMSSW_5_0_1_patch2, daForCMSSW_5_0_1_patch2c-slc5_amd64_gcc434, daForCMSSW_5_0_1_patch2b-slc5_amd64_gcc434, daForCMSSW_5_0_1_patch2-slc5_amd64_gcc434, da20120206-50X, da20120205-44X-ports, da20120205-44X, da20120205-50X, CMSSW_5_0_1_patch1, CMSSW_5_0_0_patch2, CMSSW_5_0_1, da20120129-50X, CMSSW_4_4_3-ports, CMSSW_4_4_3, sm120124-ports, da20120123-50X, da20120123-44X-ports, da20120123-44X, CMSSW_5_0_0_patch1, CMSSW_4_4_2_p10JEmalloc, da20120112-50X, da20120110-50X, da20120108-52X, da20120106-52X, CMSSW_5_0_0_g4emtest, CMSSW_4_4_2_patch10-ports, CMSSW_4_4_2_patch10, azFor442patch10gcc451, azFor442patch10, da20111220-50X, da20111219-50X, sjgFor510pre1, CMSSW_5_0_0, sjgFor500, az20111214-50X, CMSSW_4_4_2_patch9-ports, CMSSW_4_4_2_patch9, vsFor442patch9gcc451, vsFor442patch9, vs20111213-50X, fwFor500pre7-online, CMSSW_4_4_2_patch8-ports, CMSSW_4_4_2_patch8, CMSSW_5_0_0_pre7pythia424, sjgFor500pre7p424b, sjgFor500pre7p424, CMSSW_5_0_0_pre7, sjgFor500pre7, da20111205-50X, sjg20111204b-50X, sjg20111204-50X, da20111202-50X, vs20111201c-50X, vs20111201temp-50X, vs20111201b-50X, vs20111201-50X, da20111201b-50X, da20111201-50X, vs20111130-44X-ports, vs20111130-44X, da20111130-50X, CMSSW_5_0_0_pre6g494, da20111128-50X, sjgFor500pre6gcc494, az20111126-50X, sm20111126-50X, az20111125-50X, az20111124-50X, az20111123-50X, CMSSW_4_4_2_patch7-ports, CMSSW_4_4_2_patch7, azFor442patch7gcc451, azFor442patch7gcc434, CMSSW_5_0_0_pre6, sjgFor500pre6, sm20111121-50X, CMSSW_4_4_2_patch6-ports, CMSSW_4_4_2_patch6, azFor442patch6gcc451, azFor442patch6gcc434, az20111117b-50X, az20111117-50X, az20111116-50X, CMSSW_4_4_2_onlpatch2_ONLINE, az20111115-50X, CMSSW_5_0_0_pre5_root532rc1, azFor500pre5r532rc1, az20111111b-50X, az20111111-50X, CMSSW_4_4_2_patch5-ports, CMSSW_4_4_2_patch5, azFor442patch5gcc451, azFor442patch5gcc434, CMSSW_4_4_2_patch4-ports, CMSSW_4_4_2_patch4, azFor442patch4gcc451, azFor442patch4gcc434, az20111109b-44X, az20111109b-44X-ports, az20111109-44X-ports, az20111109-44X, CMSSW_4_4_2_patch3-ports, CMSSW_4_4_2_patch3, azFor442patch3gcc451, azFor442patch3gcc434, az20111108-50X, CMSSW_4_4_2_patch2-ports, CMSSW_4_4_2_patch2, CMSSW_5_0_0_pre5, sjgFor500pre5, CMSSW_4_4_2_patch1-ports, CMSSW_4_4_2_patch1, azFor442patch1gcc451, azFor442patch1gcc434, fwFor500pre4-online, az20111102b-50X, az20111102-50X, CMSSW_4_4_2_onlpatch1_ONLINE, CMSSW_4_4_2_ONLINE, az20111031c-50X, az20111031b-50X, az20111031-50X, CMSSW_4_4_2-ports, CMSSW_4_4_2, azFor442gcc451, azFor442gcc434, CMSSW_5_0_0_pre4, az20111027b-50X, az20111027-50X, sjgFor500pre4, az20111026-50X, az20111025-50X, sm20111025-50X, az20111024-50X, az20111022-50X, sjg111021d-50X, sjg111021c-50X, sjg111021b-50X, sjg111021-50X, CMSSW_4_4_0_patch4-ports, CMSSW_4_4_0_patch4, azFor440patch4gcc451, azFor440patch4gcc434, CMSSW_5_0_0_pre3, sjgFor500pre3, az20111014-50X, CMSSW_4_4_1_ONLINE, CMSSW_4_4_1-ports, CMSSW_4_4_1, az20111012-50X, azFor441gcc451, azFor441gcc434, az20111011b-50X, az20111011a-50X, CMSSW_5_0_0_pre2, sjgFor500pre2, CMSSW_4_4_0_patch3-ports, CMSSW_4_4_0_patch3, azFor440patch3gcc451, azFor440patch3gcc434, az20111007-50X, CMSSW_4_4_0_patch2-ports, CMSSW_4_4_0_patch2, azFor440patch2gcc451, azFor440patch2gcc434, CMSSW_4_4_0_patch1-ports, CMSSW_4_4_0_patch1, azFor440patch1gcc451a, azFor440patch1gcc434a, azFor440patch1gcc451, azFor440patch1gcc434, az20110928a-50X, az20110928-50X, CMSSW_5_0_0_pre1, sjgFor500pre1b, sjgFor500pre1, az20110922c-50X, CMSSW_4_4_0-ports, CMSSW_4_4_0, azFor440gcc451, azFor440gcc434, az20110922b-50X, az20110922a-50X, az20110922-50X, az20110921-44X-ports, az20110921-44X, az20110920-50X, az20110918-50X, az20110916c-50X, az20110916b-50X, az20110916a-50X, az20110916-50X, az20110914-44X-ports, az20110914-44X, az20110913-44X-ports, az20110913-44X, az20110912-50X, az20110912-44X-ports, az20110912-44X, sm20110912-50X, CMSSW_4_4_0_pre10_ONLINE, fwFor440pre10online, CMSSW_4_4_0_pre10-ports, CMSSW_4_4_0_pre10, azFor440pre10gcc451, azFor440pre10gcc434, az20110909b-44X-ports, az20110909b-44X, az20110909a-44X-ports, az20110909a-44X, az20110909-44X-ports, az20110909-44X, az20110908-50X, az20110907c-50X, az20110907b-50X, az20110906b-44X, az20110906a-44X, sm20110907-50X, az20110906-44X-ports, az20110906-44X, az20110904-50X-ports, az20110904-50X, az20110902b-50X-ports, az20110902b-50X, az20110902a-50X, az20110902-50X-ports, az20110902-50X, az20110831-50X-ports, az20110831-50X, CMSSW_4_4_0_pre9, CMSSW_4_4_0_pre9-ports, azFor440pre9gcc451, azFor440pre9gcc434, az20110827-50X-ports, az20110827-50X, az20110826b-50X-ports, az20110826b-50X, az20110826a-50X, az20110826-50X, az20110825-50X-ports, az20110825-50X, az20110823-50X-ports, az20110823-50X, az20110821-44X-ports, az20110821-44X, az20110818a-50X-ports, az20110818a-50X, az20110818-50X-ports, az20110818-50X, CMSSW_4_4_0_pre8-ports, CMSSW_4_4_0_pre8, azFor440pre8gcc451, azFor440pre8gcc434, sjg110813b-50X-ports, sjg110813b-50X, sjg110813a-50X-ports, sjg110813a-50X, az20110809b-50X-ports, az20110809b-50X, az20110809a-50X, az20110809a-44X-ports, az20110809a-44X, az20110809-50X-ports, az20110809-50X, az20110809-44X-ports, az20110809-44X, CMSSW_4_4_0_pre7_g494p02-ports, CMSSW_4_4_0_pre7_g494p02, azFor440p7g494p02-g451, azFor440p7g494p02, az20110804-44X-ports, az20110804-44X, sjg110804-50X-ports, sjg110804-50X, sjg110803-50X-ports, sjg110803-50X, CMSSW_4_4_0_pre7-ports, CMSSW_4_4_0_pre7, azFor440pre7gcc451, azFor440pre7gcc434, az20110801-44X, az20110801-44X-ports, CMSSW_4_4_0_pre6-ports, CMSSW_4_4_0_pre6, azFor440pre6gcc451, azFor440pre6gcc434, az20110729-44X-ports, az20110729-44X, DBS_2_1_6-pre1, az20110726a-44X-ports, az20110726a-44X, az20110726-44X-ports, az20110726-44X, az20110725c-44X-ports, az20110725c-44X, az20110725b-44X-ports, az20110725b-44X, az20110725a-44X-ports, az20110725-44X-ports, az20110725a-44X, az20110725-44X, az20110723a-44X-ports, az20110723a-44X, az20110723-44X, CMSSW_4_4_0_pre5-ports, CMSSW_4_4_0_pre5, azFor440pre5gcc451, azFor440pre5gcc434, az20110715a-44X-ports, az20110715a-44X, az20110715-44X, az20110714a-44X-ports, az20110714a-44X, az20110714-44X-ports, az20110714-44X, az20110713a-44X-ports, az20110713a-44X, az20110713-44X, az20110712c-44X-ports, az20110712c-44X, az20110712b-44X-ports, az20110712a-44X, ge20110712-44X-ports, az20110712-44X-ports, az20110712-44X, ge20110711-44X, ge20110711-44X-ports, ge20110710b-44X, ge20110710b-44X-ports, ge20110710-44X, ge20110710-44X-ports, ge20110709b-44X-ports, ge20110709-44X-ports, ge20110708-44X-ports, CMSSW_4_4_0_pre4-ports_FWLITE, CMSSW_4_4_0_pre4-ports, CMSSW_4_4_0_pre4_FWLITE, CMSSW_4_4_0_pre4, azFor440p4g451, azFor440p4g434, az20110706-44X-ports, az20110706-44X, az20110701-44X-ports, az20110701-44X, CMSSW_4_4_0_pre3-ports, CMSSW_4_4_0_pre3, azFor440pre3gcc451, azFor440pre3gcc434, az20110629-44X-ports, az20110629-44X, az20110627a-44X-ports, az20110627-44X-ports, az20110627-44X, CMSSW_4_4_0_pre2_FWLITE, CMSSW_4_4_0_pre2, CMSSW_4_4_0_pre2-ports_FWLITE, CMSSW_4_4_0_pre2-ports, azFor440pre2gcc451, azFor440pre2gcc434, sm20110622a-44X-ports, sm20110622a-44X, sm20110622-44X-ports, sm20110622-44X, sm20110620-44X, sm20110620-44X-ports, sm20110616-44X-ports, sm20110616-44X, sm20110614b-44X-ports, sm20110614b-44X, sm20110614a-44X-ports, sm20110614a-44X, sm20110614-44X-ports, sm20110614-44X, sjg110514a-for43x-ports, sjg110514a-for43x, sm20110514a-for43X-ports, sm20110514a-for43X, ge20110514-for43X-ports, sm20110514-for43X, sm20110514-for43X-ports |
Changes since 1.58: | +3 -0 lines |
Log Message: | -fvisibility-inlines-hidden aded for gcc45 |
# | User | Rev | Content |
---|---|---|---|
1 | elmer | 1.51 | ### RPM cms gcc-toolfile 11.0 |
2 | eulisse | 1.1 | |
3 | # gcc has a separate spec file for the generating a | ||
4 | # toolfile because gcc.spec could be not build because of the | ||
5 | # "--use-system-compiler" option. | ||
6 | |||
7 | Source: none | ||
8 | |||
9 | elmer | 1.51 | %if "%(echo %cmsos | grep osx >/dev/null && echo true)" == "true" |
10 | Requires: gfortran-macosx | ||
11 | %endif | ||
12 | |||
13 | eulisse | 1.1 | %prep |
14 | %build | ||
15 | %install | ||
16 | mkdir -p %i/etc/scram.d | ||
17 | elmer | 1.51 | |
18 | fwyzard | 1.54 | # Determine the GCC_ROOT if "use system compiler" is used. |
19 | eulisse | 1.1 | if [ "X$GCC_ROOT" = X ] |
20 | then | ||
21 | elmer | 1.51 | export GCC_PATH=`which gcc` || exit 1 |
22 | export GCC_ROOT=`echo $GCC_PATH | sed -e 's|/bin/gcc||'` | ||
23 | export GCC_VERSION=`gcc -v 2>&1 | grep "gcc version" | sed 's|[^0-9]*\([0-9].[0-9].[0-9]\).*|\1|'` || exit 1 | ||
24 | fwyzard | 1.54 | export G77_ROOT=$GCC_ROOT |
25 | elmer | 1.51 | else |
26 | export GCC_PATH | ||
27 | export GCC_ROOT | ||
28 | export GCC_VERSION | ||
29 | export G77_ROOT=$GCC_ROOT | ||
30 | eulisse | 1.1 | fi |
31 | |||
32 | fwyzard | 1.56 | if echo %cmsos | grep -q osx; then |
33 | # on Mac OS X, override G77_ROOT with GFORTRAN_MACOSX_ROOT | ||
34 | export G77_ROOT=$GFORTRAN_MACOSX_ROOT | ||
35 | fi | ||
36 | |||
37 | elmer | 1.51 | export COMPILER_VERSION=`echo %cmsplatf | sed -e 's|.*gcc\([0-9]*\).*|\1|'` |
38 | export COMPILER_VERSION_MAJOR=`echo %cmsplatf | sed -e 's|.*gcc\([0-9]\).*|\1|'` | ||
39 | export COMPILER_VERSION_MINOR=`echo %cmsplatf | sed -e 's|.*gcc[0-9]\([0-9]\).*|\1|'` | ||
40 | |||
41 | # Generic template for the toolfiles. | ||
42 | # *** USE @VARIABLE@ plus associated environment variable to customize. *** | ||
43 | # DO NOT DUPLICATE the toolfile template. | ||
44 | eulisse | 1.1 | |
45 | muzaffar | 1.22 | cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler.xml |
46 | <tool name="cxxcompiler" version="@GCC_VERSION@" type="compiler"> | ||
47 | <client> | ||
48 | elmer | 1.51 | <environment name="CXXCOMPILER_BASE" default="@GCC_ROOT@"/> |
49 | <environment name="GCCBINDIR" default="$CXXCOMPILER_BASE/bin"/> | ||
50 | <environment name="CXX" value="$GCCBINDIR/c++@COMPILER_NAME_SUFFIX@"/> | ||
51 | muzaffar | 1.22 | </client> |
52 | elmer | 1.51 | <flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@"/> |
53 | <flags CCCOMPILER="gcc@COMPILER_VERSION_MAJOR@"/> | ||
54 | <flags MODULEFLAGS="@OS_SHAREDFLAGS@ @ARCH_SHAREDFLAGS@"/> | ||
55 | <flags CXXDEBUGFLAG="-g"/> | ||
56 | <flags CPPDEFINES="GNU_GCC"/> | ||
57 | <flags CPPDEFINES="_GNU_SOURCE"/> | ||
58 | <flags CXXSHAREDOBJECTFLAGS="-fPIC"/> | ||
59 | <flags CXXFLAGS="-O2 -pedantic -ansi -pthread -pipe"/> | ||
60 | <flags CXXFLAGS="@ARCH_CXXFLAGS@ @COMPILER_CXXFLAGS@"/> | ||
61 | <flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300"/> | ||
62 | elmer | 1.58 | <flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wunused -Wparentheses -Wno-deprecated -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -fdiagnostics-show-option"/> |
63 | elmer | 1.51 | <flags LDFLAGS="@OS_LDFLAGS@"/> |
64 | <flags CXXSHAREDFLAGS="@OS_SHAREDFLAGS@ @ARCH_SHAREDFLAGS@"/> | ||
65 | <flags SHAREDSUFFIX="@OS_SHAREDSUFFIX@"/> | ||
66 | <flags LD_UNIT="@OS_LD_UNIT@ @ARCH_LD_UNIT@"/> | ||
67 | <flags SCRAM_LANGUAGE_TYPE="C++"/> | ||
68 | <runtime name="@OS_RUNTIME_LDPATH_NAME@" value="$CXXCOMPILER_BASE/@ARCH_LIB64DIR@" type="path"/> | ||
69 | <runtime name="@OS_RUNTIME_LDPATH_NAME@" value="$CXXCOMPILER_BASE/lib" type="path"/> | ||
70 | <runtime name="PATH" value="$CXXCOMPILER_BASE/bin" type="path"/> | ||
71 | muzaffar | 1.22 | </tool> |
72 | elmer | 1.7 | EOF_TOOLFILE |
73 | elmer | 1.51 | |
74 | muzaffar | 1.22 | cat << \EOF_TOOLFILE >%i/etc/scram.d/ccompiler.xml |
75 | <tool name="ccompiler" version="@GCC_VERSION@" type="compiler"> | ||
76 | <client> | ||
77 | elmer | 1.51 | <environment name="CCOMPILER_BASE" default="@GCC_ROOT@"/> |
78 | <environment name="GCCBINDIR" value="$CCOMPILER_BASE/bin"/> | ||
79 | <environment name="CC" value="$GCCBINDIR/gcc@COMPILER_NAME_SUFFIX@"/> | ||
80 | muzaffar | 1.22 | </client> |
81 | elmer | 1.51 | <flags CDEBUGFLAG="-g"/> |
82 | <flags CSHAREDOBJECTFLAGS="-fPIC"/> | ||
83 | <flags CFLAGS="-pthread"/> | ||
84 | <flags CFLAGS="-O2"/> | ||
85 | <flags LDFLAGS="@OS_LDFLAGS@"/> | ||
86 | <flags CSHAREDFLAGS="@OS_SHAREDFLAGS@ @ARCH_SHAREDFLAGS@"/> | ||
87 | <flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@"/> | ||
88 | <flags SCRAM_LANGUAGE_TYPE="C"/> | ||
89 | muzaffar | 1.22 | </tool> |
90 | elmer | 1.7 | EOF_TOOLFILE |
91 | elmer | 1.51 | |
92 | # Notice that on OSX we have a LIBDIR defined for f77compiler because gcc C++ | ||
93 | # compiler (which comes from the system) does not know about where to find | ||
94 | # libgfortran. | ||
95 | muzaffar | 1.22 | cat << \EOF_TOOLFILE >%i/etc/scram.d/f77compiler.xml |
96 | <tool name="f77compiler" version="@GCC_VERSION@" type="compiler"> | ||
97 | <lib name="gfortran"/> | ||
98 | <lib name="m"/> | ||
99 | <client> | ||
100 | elmer | 1.51 | <environment name="F77COMPILER_BASE" default="@G77_ROOT@"/> |
101 | <environment name="FC" default="$F77COMPILER_BASE/bin/gfortran"/> | ||
102 | @ARCH_FORTRAN_LIBDIR@ | ||
103 | muzaffar | 1.22 | </client> |
104 | elmer | 1.51 | <flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@"/> |
105 | <flags FFLAGS="-fno-second-underscore -Wunused -Wuninitialized -O2"/> | ||
106 | <flags FCO2FLAG="-O2"/> | ||
107 | <flags FCOPTIMISED="-O2"/> | ||
108 | <flags FCDEBUGFLAG="-g"/> | ||
109 | <flags FCSHAREDOBJECTFLAGS="-fPIC"/> | ||
110 | <flags SCRAM_LANGUAGE_TYPE="FORTRAN"/> | ||
111 | fwyzard | 1.50 | </tool> |
112 | EOF_TOOLFILE | ||
113 | elmer | 1.51 | |
114 | # NON-empty defaults | ||
115 | export COMPILER_EXEC_NAME="c++" | ||
116 | |||
117 | # First of all handle OS specific options. | ||
118 | case %cmsplatf in | ||
119 | slc* ) | ||
120 | export OS_SHAREDFLAGS="-shared -Wl,-E" | ||
121 | export OS_SHAREDSUFFIX="so" | ||
122 | export OS_LDFLAGS="-Wl,-E -Wl,--hash-style=gnu" | ||
123 | export OS_RUNTIME_LDPATH_NAME="LD_LIBRARY_PATH" | ||
124 | ;; | ||
125 | osx* ) | ||
126 | export OS_SHAREDFLAGS="-shared -dynamic -single_module" | ||
127 | export OS_SHAREDSUFFIX="dylib" | ||
128 | export OS_LDFLAGS="-Wl,-commons -Wl,use_dylibs" | ||
129 | export OS_RUNTIME_LDPATH_NAME="DYLD_LIBRARY_PATH" | ||
130 | ;; | ||
131 | eulisse | 1.1 | esac |
132 | |||
133 | elmer | 1.51 | # Then handle OS + architecture specific options (maybe we should enable more |
134 | # aggressive optimizations for amd64 as well??) | ||
135 | elmer | 1.15 | case %cmsplatf in |
136 | elmer | 1.51 | osx*_ia32_* ) |
137 | export ARCH_CXXFLAGS="-arch i386" | ||
138 | export ARCH_SHAREDFLAGS="-arch i386" | ||
139 | export ARCH_LIB64DIR="lib" | ||
140 | export ARCH_FORTRAN_LIBDIR='<environment name="LIBDIR" default="$F77COMPILER_BASE/lib/gcc/i686-apple-darwin10/4.2.1"/>' | ||
141 | ;; | ||
142 | osx*_amd64_* ) | ||
143 | export ARCH_CXXFLAGS="-arch x86_64" | ||
144 | export ARCH_SHAREDFLAGS="-arch x86_64" | ||
145 | export ARCH_LIB64DIR="lib" | ||
146 | export ARCH_FORTRAN_LIBDIR='<environment name="LIBDIR" default="$F77COMPILER_BASE/lib/gcc/i686-apple-darwin10/4.2.1/x86_64"/>' | ||
147 | elmer | 1.15 | ;; |
148 | elmer | 1.51 | osx*_ppc32_* ) |
149 | export ARCH_CXXFLAGS="-arch ppc" | ||
150 | export ARCH_SHAREDFLAGS="-arch ppc" | ||
151 | export ARCH_LIB64DIR="lib" | ||
152 | dsr | 1.24 | ;; |
153 | elmer | 1.51 | slc*_amd64_* ) |
154 | # For some reason on mac, some of the header do not compile if this is | ||
155 | # defined. Ignore for now. | ||
156 | export ARCH_CXXFLAGS="-Werror=overflow" | ||
157 | export ARCH_LIB64DIR="lib64" | ||
158 | export ARCH_LD_UNIT="-r -m elf_x86_64" | ||
159 | muzaffar | 1.35 | ;; |
160 | elmer | 1.51 | slc*_ia32_* ) |
161 | # For some reason on mac, some of the header do not compile if this is | ||
162 | # defined. Ignore for now. | ||
163 | export ARCH_CXXFLAGS="-Werror=overflow" | ||
164 | export ARCH_LIB64DIR="lib" | ||
165 | export ARCH_LD_UNIT="-r -m elf_i386" | ||
166 | ;; | ||
167 | *) | ||
168 | echo "Unsupported." | ||
169 | exit 1 | ||
170 | ;; | ||
171 | esac | ||
172 | |||
173 | # Then handle compiler specific options. E.g. enable | ||
174 | # optimizations as they become available in gcc. | ||
175 | COMPILER_CXXFLAGS= | ||
176 | fwyzard | 1.55 | # The following is the default even if not set here |
177 | F77_MMD="-MMD" | ||
178 | elmer | 1.58 | |
179 | # Set the following for all gcc < 4.6. gcc46 claims it is no longer needed | ||
180 | # This is perhaps the case also for the earlier versions, but leave it | ||
181 | # there for now. | ||
182 | case %cmsplatf in | ||
183 | *_gcc4[2345]* ) | ||
184 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -Wimplicit" | ||
185 | ;; | ||
186 | esac | ||
187 | |||
188 | # The following causes problems for gcc46 and boost 1.45.0 so downgrade it | ||
189 | case %cmsplatf in | ||
190 | *_gcc4[2345]* ) | ||
191 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -Werror=strict-overflow" | ||
192 | ;; | ||
193 | *_gcc4[6789]* ) | ||
194 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -Wstrict-overflow" | ||
195 | ;; | ||
196 | esac | ||
197 | |||
198 | |||
199 | elmer | 1.51 | case %cmsplatf in |
200 | *_gcc4[56789]* ) | ||
201 | elmer | 1.57 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -std=c++0x -msse3 -ftree-vectorize" |
202 | elmer | 1.51 | F77_MMD="-cpp -MMD" |
203 | ;; | ||
204 | esac | ||
205 | fwyzard | 1.55 | export F77_MMD |
206 | elmer | 1.51 | |
207 | case %cmsplatf in | ||
208 | *_gcc4[3456789]* ) | ||
209 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits" | ||
210 | ;; | ||
211 | esac | ||
212 | |||
213 | # Enable visibility inlines hidden. Should drastically remove | ||
214 | # the amount of symbols due to templates. | ||
215 | # FIXME: not enabled on linux, yet, change the case statement | ||
216 | # to *_gcc4[23456789]* when stable. | ||
217 | case %cmsplatf in | ||
218 | osx* ) | ||
219 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fvisibility-inlines-hidden" | ||
220 | eulisse | 1.45 | ;; |
221 | muzaffar | 1.59 | *_gcc4[56789]* ) |
222 | COMPILER_CXXFLAGS="$COMPILER_CXXFLAGS -fvisibility-inlines-hidden" | ||
223 | ;; | ||
224 | elmer | 1.51 | esac |
225 | |||
226 | export COMPILER_CXXFLAGS | ||
227 | |||
228 | # Handle here platform specific overrides. In case we | ||
229 | # want to tune something for a specific architecture. | ||
230 | case %cmsplatf in | ||
231 | osx10[56]*) | ||
232 | # On macosx we explicitly pick up a compiler version so that there is | ||
233 | # actually matching between the platform specified to cmsBuild and the | ||
234 | # compiler. | ||
235 | export COMPILER_NAME_SUFFIX="-$COMPILER_VERSION_MAJOR.$COMPILER_VERSION_MINOR" | ||
236 | dsr | 1.24 | ;; |
237 | elmer | 1.15 | esac |
238 | |||
239 | # General substitutions | ||
240 | elmer | 1.51 | perl -p -i -e 's|\@([^@]*)\@|$ENV{$1}|g' %i/etc/scram.d/*.xml |
241 | |||
242 | eulisse | 1.1 | %post |
243 | muzaffar | 1.52 | %{relocateConfig}etc/scram.d/*.xml |
244 | elmer | 1.51 | echo "GCC_TOOLFILE_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'; export GCC_TOOLFILE_ROOT" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh |
245 | echo "setenv GCC_TOOLFILE_ROOT '$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh |