ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/gcc-toolfile.spec
(Generate patch)

Comparing COMP/CMSDIST/gcc-toolfile.spec (file contents):
Revision 1.3 by eulisse, Sat Jan 5 00:48:38 2008 UTC vs.
Revision 1.21 by elmer, Tue Jan 12 10:31:43 2010 UTC

# Line 1 | Line 1
1 < ### RPM cms gcc-toolfile 1.0
1 > ### RPM cms gcc-toolfile 10.0
2  
3   # gcc has a separate spec file for the generating a
4   # toolfile because gcc.spec could be not build because of the
# Line 20 | Line 20 | fi
20   COMPILER_VERSION=`echo %cmsplatf | sed -e 's|.*gcc\([0-9]*\).*|\1|'`
21   COMPILER_VERSION_MAJOR=`echo %cmsplatf | sed -e 's|.*gcc\([0-9]\).*|\1|'`
22  
23 + # Generate general template for the tool files. Note that on top of
24 + # this template there are some additional cmsplatf-dependent substitutions
25 + # and some overall general substitutions below
26   case %cmsplatf in
27 < slc3* )
27 > slc4_ia32_gcc4* | slc5_ia32_gcc4* | slc4_amd64_gcc4* | slc5_amd64_gcc4* | slc5onl_ia32_gcc4* )
28   cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
29   <doc type=BuildSystem::ToolDoc version=1.1>
30   <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
# Line 38 | Line 41 | cat << \EOF_TOOLFILE >%i/etc/scram.d/cxx
41   <Flags CPPDEFINES="_GNU_SOURCE">
42   <Flags CXXSHAREDOBJECTFLAGS="-fPIC">
43   <Flags CXXFLAGS="-pedantic -ansi -pthread -pipe">
44 < <Flags CXXFLAGS="-O2">
44 > <Flags CXXFLAGS="@GXXOPT@">
45   <Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300">
46 < <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses">
47 < <Flags LDFLAGS="-Wl,-E">
46 > <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses -Werror=array-bounds -Wno-deprecated -Werror=overflow -Werror=return-type -Werror=format-contains-nul -Werror=missing-braces -Werror=unused-value -Werror=address -fdiagnostics-show-option">
47 > <Flags LDFLAGS="@LDOPT@">
48   <Flags CXXSHAREDFLAGS="-Wl,-E">
49   <Flags SHAREDSUFFIX="so">
50   <Flags SCRAM_LANGUAGE_TYPE="C++">
51 < <Runtime name=GCC_EXEC_PREFIX default="$GCC_BASE/lib/gcc-lib/">
49 < <Runtime name=LD_LIBRARY_PATH value="$GCC_BASE/lib" type=path>
50 < <Runtime name=PATH value="$GCC_BASE/bin" type=path>
51 < </tool>
52 < EOF_TOOLFILE
53 < cat << \EOF_TOOLFILE >%i/etc/scram.d/ccompiler
54 < <doc type=BuildSystem::ToolDoc version=1.1>
55 < <tool name=ccompiler version=@GCC_VERSION@ type=compiler>
56 < <client>
57 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
58 < <Environment name=GCCBINDIR value="$GCC_BASE/bin"></Environment>
59 < <Environment name=CC value="$GCCBINDIR/gcc"></Environment>
60 < </client>
61 < <Flags CDEBUGFLAG="-g">
62 < <Flags CSHAREDOBJECTFLAGS="-fPIC">
63 < <Flags CFLAGS="-pthread">
64 < <Flags CFLAGS="-O2">
65 < <Flags LDFLAGS="-Wl,-E">
66 < <Flags CSHAREDFLAGS="-Wl,-E">
67 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
68 < <Flags SCRAM_LANGUAGE_TYPE="C">
69 < </tool>
70 < EOF_TOOLFILE
71 < cat << \EOF_TOOLFILE >%i/etc/scram.d/f77compiler
72 < <doc type=BuildSystem::ToolDoc version=1.1>
73 < <tool name=f77compiler version=@GCC_VERSION@ type=compiler>
74 < <lib name=g2c>
75 < <lib name=m>
76 < <client>
77 < <Environment name=G77_BASE default="@GCC_ROOT@"></Environment>
78 < <Environment name=FC default="$G77_BASE/bin/g77"></Environment>
79 < </client>
80 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
81 < <Flags FFLAGS="-fno-second-underscore -Wno-globals -Wunused -Wuninitialized">
82 < <Flags FCO2Flag="-O2">
83 < <Flags FCOPTIMISED="-O2">
84 < <Flags FCDEBUGFLAG="-g">
85 < <Flags FCSHAREDOBJECTFLAGS="-fPIC">
86 < <Flags SCRAM_LANGUAGE_TYPE="FORTRAN">
87 < </tool>
88 < EOF_TOOLFILE
89 < ;;
90 < slc4_ia32_gcc345 )
91 < cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
92 < <doc type=BuildSystem::ToolDoc version=1.1>
93 < <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
94 < <client>
95 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
96 < <Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment>
97 < <Environment name=CXX value="$GCCBINDIR/c++"></Environment>
98 < </client>
99 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
100 < <Flags CCcompiler="gcc@COMPILER_VERSION_MAJOR@">
101 < <Flags MODULEFLAGS="-shared">
102 < <Flags CXXDEBUGFLAG="-g">
103 < <Flags CPPDEFINES="GNU_GCC">
104 < <Flags CPPDEFINES="_GNU_SOURCE">
105 < <Flags CXXSHAREDOBJECTFLAGS="-fPIC">
106 < <Flags CXXFLAGS="-pedantic -ansi -pthread -pipe">
107 < <Flags CXXFLAGS="-O2">
108 < <Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300">
109 < <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses">
110 < <Flags LDFLAGS="-Wl,-E">
111 < <Flags CXXSHAREDFLAGS="-Wl,-E">
112 < <Flags SHAREDSUFFIX="so">
113 < <Flags SCRAM_LANGUAGE_TYPE="C++">
114 < <Runtime name=LD_LIBRARY_PATH value="$GCC_BASE/lib" type=path>
115 < <Runtime name=PATH value="$GCC_BASE/bin" type=path>
116 < </tool>
117 < EOF_TOOLFILE
118 < cat << \EOF_TOOLFILE >%i/etc/scram.d/ccompiler
119 < <doc type=BuildSystem::ToolDoc version=1.1>
120 < <tool name=ccompiler version=@GCC_VERSION@ type=compiler>
121 < <client>
122 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
123 < <Environment name=GCCBINDIR value="$GCC_BASE/bin"></Environment>
124 < <Environment name=CC value="$GCCBINDIR/gcc"></Environment>
125 < </client>
126 < <Flags CDEBUGFLAG="-g">
127 < <Flags CSHAREDOBJECTFLAGS="-fPIC">
128 < <Flags CFLAGS="-pthread">
129 < <Flags CFLAGS="-O2">
130 < <Flags LDFLAGS="-Wl,-E">
131 < <Flags CSHAREDFLAGS="-Wl,-E">
132 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
133 < <Flags SCRAM_LANGUAGE_TYPE="C">
134 < </tool>
135 < EOF_TOOLFILE
136 < cat << \EOF_TOOLFILE >%i/etc/scram.d/f77compiler
137 < <doc type=BuildSystem::ToolDoc version=1.1>
138 < <tool name=f77compiler version=@GCC_VERSION@ type=compiler>
139 < <lib name=g2c>
140 < <lib name=m>
141 < <client>
142 < <Environment name=G77_BASE default="@GCC_ROOT@"></Environment>
143 < <Environment name=FC default="$G77_BASE/bin/g77"></Environment>
144 < </client>
145 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
146 < <Flags FFLAGS="-fno-second-underscore -Wno-globals -Wunused -Wuninitialized">
147 < <Flags FCO2Flag="-O2">
148 < <Flags FCOPTIMISED="-O2">
149 < <Flags FCDEBUGFLAG="-g">
150 < <Flags FCSHAREDOBJECTFLAGS="-fPIC">
151 < <Flags SCRAM_LANGUAGE_TYPE="FORTRAN">
152 < </tool>
153 < EOF_TOOLFILE
154 < ;;
155 < slc4_ia32_gcc4* )
156 < cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
157 < <doc type=BuildSystem::ToolDoc version=1.1>
158 < <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
159 < <client>
160 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
161 < <Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment>
162 < <Environment name=CXX value="$GCCBINDIR/c++"></Environment>
163 < </client>
164 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
165 < <Flags CCcompiler="gcc@COMPILER_VERSION_MAJOR@">
166 < <Flags MODULEFLAGS="-shared">
167 < <Flags CXXDEBUGFLAG="-g">
168 < <Flags CPPDEFINES="GNU_GCC">
169 < <Flags CPPDEFINES="_GNU_SOURCE">
170 < <Flags CXXSHAREDOBJECTFLAGS="-fPIC">
171 < <Flags CXXFLAGS="-pedantic -ansi -pthread -pipe">
172 < <Flags CXXFLAGS="-O2">
173 < <Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300">
174 < <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses">
175 < <Flags LDFLAGS="-Wl,-E">
176 < <Flags CXXSHAREDFLAGS="-Wl,-E">
177 < <Flags SHAREDSUFFIX="so">
178 < <Flags SCRAM_LANGUAGE_TYPE="C++">
179 < <Runtime name=LD_LIBRARY_PATH value="$GCC_BASE/lib" type=path>
51 > <Runtime name=LD_LIBRARY_PATH value="$GCC_BASE/@GXXLIB@" type=path>
52   <Runtime name=PATH value="$GCC_BASE/bin" type=path>
53   </tool>
54   EOF_TOOLFILE
# Line 208 | Line 80 | cat << \EOF_TOOLFILE >%i/etc/scram.d/f77
80   <Environment name=FC default="$G77_BASE/bin/gfortran"></Environment>
81   </client>
82   <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
83 < <Flags FFLAGS="-fno-second-underscore -Wunused -Wuninitialized">
212 < <Flags FCO2Flag="-O2">
213 < <Flags FCOPTIMISED="-O2">
214 < <Flags FCDEBUGFLAG="-g">
215 < <Flags FCSHAREDOBJECTFLAGS="-fPIC">
216 < <Flags SCRAM_LANGUAGE_TYPE="FORTRAN">
217 < </tool>
218 < EOF_TOOLFILE
219 < ;;
220 < slc4_amd64_* )
221 < cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
222 < <doc type=BuildSystem::ToolDoc version=1.1>
223 < <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
224 < <client>
225 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
226 < <Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment>
227 < <Environment name=CXX value="$GCCBINDIR/c++"></Environment>
228 < </client>
229 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
230 < <Flags CCcompiler="gcc@COMPILER_VERSION_MAJOR@">
231 < <Flags MODULEFLAGS="-shared">
232 < <Flags CXXDEBUGFLAG="-g">
233 < <Flags CPPDEFINES="GNU_GCC">
234 < <Flags CPPDEFINES="_GNU_SOURCE">
235 < <Flags CXXSHAREDOBJECTFLAGS="-fPIC">
236 < <Flags CXXFLAGS="-pedantic -ansi -pthread -pipe">
237 < <Flags CXXFLAGS="-O2">
238 < <Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300">
239 < <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses">
240 < <Flags LDFLAGS="-Wl,-E">
241 < <Flags CXXSHAREDFLAGS="-Wl,-E">
242 < <Flags SHAREDSUFFIX="so">
243 < <Flags SCRAM_LANGUAGE_TYPE="C++">
244 < <Runtime name=LD_LIBRARY_PATH value="$GCC_BASE/lib64" type=path>
245 < <Runtime name=PATH value="$GCC_BASE/bin" type=path>
246 < </tool>
247 < EOF_TOOLFILE
248 < cat << \EOF_TOOLFILE >%i/etc/scram.d/ccompiler
249 < <doc type=BuildSystem::ToolDoc version=1.1>
250 < <tool name=ccompiler version=@GCC_VERSION@ type=compiler>
251 < <client>
252 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
253 < <Environment name=GCCBINDIR value="$GCC_BASE/bin"></Environment>
254 < <Environment name=CC value="$GCCBINDIR/gcc"></Environment>
255 < </client>
256 < <Flags CDEBUGFLAG="-g">
257 < <Flags CSHAREDOBJECTFLAGS="-fPIC">
258 < <Flags CFLAGS="-pthread">
259 < <Flags CFLAGS="-O2">
260 < <Flags LDFLAGS="-Wl,-E">
261 < <Flags CSHAREDFLAGS="-Wl,-E">
262 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
263 < <Flags SCRAM_LANGUAGE_TYPE="C">
264 < </tool>
265 < EOF_TOOLFILE
266 < cat << \EOF_TOOLFILE >%i/etc/scram.d/f77compiler
267 < <doc type=BuildSystem::ToolDoc version=1.1>
268 < <tool name=f77compiler version=@GCC_VERSION@ type=compiler>
269 < <lib name=g2c>
270 < <lib name=m>
271 < <client>
272 < <Environment name=G77_BASE default="@GCC_ROOT@"></Environment>
273 < <Environment name=FC default="$G77_BASE/bin/g77"></Environment>
274 < </client>
275 < <Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@">
276 < <Flags FFLAGS="-fno-second-underscore -Wno-globals -Wunused -Wuninitialized">
83 > <Flags FFLAGS="-fno-second-underscore -Wunused -Wuninitialized -O2">
84   <Flags FCO2Flag="-O2">
85   <Flags FCOPTIMISED="-O2">
86   <Flags FCDEBUGFLAG="-g">
# Line 282 | Line 89 | cat << \EOF_TOOLFILE >%i/etc/scram.d/f77
89   </tool>
90   EOF_TOOLFILE
91   ;;
92 < osx104_ppc32_gcc40* )
286 < cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
287 < <doc type=BuildSystem::ToolDoc version=1.1>
288 < <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
289 < <client>
290 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
291 < <Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment>
292 < <Environment name=CXX value="$GCCBINDIR/c++"></Environment>
293 < </client>
294 < <Flags SCRAM_COMPILER_NAME="gcc40">
295 < <Flags CCcompiler="gcc40">
296 < <Flags MODULEFLAGS=" ">
297 < <Flags CXXDEBUGFLAG="-g">
298 < <Flags CPPDEFINES="GNU_GCC">
299 < <Flags CPPDEFINES="_GNU_SOURCE">
300 < <Flags CXXSHAREDOBJECTFLAGS="-fPIC">
301 < <Flags CXXFLAGS="-pedantic -ansi -pipe">
302 < <Flags CXXFLAGS="-O2">
303 < <Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300">
304 < <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses">
305 < <Flags LDFLAGS=" ">
306 < <Flags CXXSHAREDFLAGS="-dynamiclib -single_module">
307 < <Flags SHAREDSUFFIX="dylib">
308 < <Flags SCRAM_LANGUAGE_TYPE="C++">
309 < <Runtime name=DYLD_LIBRARY_PATH value="$GCC_BASE/lib" type=path>
310 < <Runtime name=PATH value="$GCC_BASE/bin" type=path>
311 < </tool>
312 < EOF_TOOLFILE
313 < ;;
314 < osx104_ia32_gcc40* )
315 < cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
316 < <doc type=BuildSystem::ToolDoc version=1.1>
317 < <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
318 < <client>
319 < <Environment name=GCC_BASE default="@GCC_ROOT@"></Environment>
320 < <Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment>
321 < <Environment name=CXX value="$GCCBINDIR/c++"></Environment>
322 < </client>
323 < <Flags SCRAM_COMPILER_NAME="gcc40">
324 < <Flags CCcompiler="gcc40">
325 < <Flags MODULEFLAGS=" ">
326 < <Flags CXXDEBUGFLAG="-g">
327 < <Flags CPPDEFINES="GNU_GCC">
328 < <Flags CPPDEFINES="_GNU_SOURCE">
329 < <Flags CXXSHAREDOBJECTFLAGS="-fPIC">
330 < <Flags CXXFLAGS="-pedantic -ansi -pipe">
331 < <Flags CXXFLAGS="-O2">
332 < <Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300">
333 < <Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses">
334 < <Flags LDFLAGS=" ">
335 < <Flags CXXSHAREDFLAGS="-dynamiclib -single_module">
336 < <Flags SHAREDSUFFIX="dylib">
337 < <Flags SCRAM_LANGUAGE_TYPE="C++">
338 < <Runtime name=DYLD_LIBRARY_PATH value="$GCC_BASE/lib" type=path>
339 < <Runtime name=PATH value="$GCC_BASE/bin" type=path>
340 < </tool>
341 < EOF_TOOLFILE
342 < ;;
343 < osx105* )
92 > osx104_ppc32_gcc40* | osx104_ia32_gcc40* | osx105* )
93   cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler
94   <doc type=BuildSystem::ToolDoc version=1.1>
95   <tool name=cxxcompiler version=@GCC_VERSION@ type=compiler>
# Line 371 | Line 120 | EOF_TOOLFILE
120   ;;
121   esac
122  
123 + # Specific substitutions to the templates above (default case needed?)
124 + case %cmsplatf in
125 +  slc4_ia32_gcc4* )
126 +    perl -p -i -e "s|\@LDOPT\@|-Wl,-E|g"   %i/etc/scram.d/cxxcompiler
127 +    perl -p -i -e "s|\@GXXLIB\@|lib|g"   %i/etc/scram.d/cxxcompiler
128 +    perl -p -i -e "s|\@GXXOPT\@|-O2 -fvisibility-inlines-hidden|g"  %i/etc/scram.d/cxxcompiler
129 +  ;;
130 +  slc5_ia32_gcc4* | slc5onl_ia32_gcc4* )
131 +    perl -p -i -e "s|\@LDOPT\@|-Wl,-E -Wl,--hash-style=gnu|g"   %i/etc/scram.d/cxxcompiler
132 +    perl -p -i -e "s|\@GXXLIB\@|lib|g"   %i/etc/scram.d/cxxcompiler
133 +    perl -p -i -e "s|\@GXXOPT\@|-O2|g"   %i/etc/scram.d/cxxcompiler
134 +  ;;
135 +  slc4_amd64_gcc4* )
136 +    perl -p -i -e "s|\@LDOPT\@|-Wl,-E|g"   %i/etc/scram.d/cxxcompiler
137 +    perl -p -i -e "s|\@GXXLIB\@|lib64|g" %i/etc/scram.d/cxxcompiler
138 +    perl -p -i -e "s|\@GXXOPT\@|-O2|g"   %i/etc/scram.d/cxxcompiler
139 +  ;;
140 +  slc5_amd64_gcc4* )
141 +    perl -p -i -e "s|\@LDOPT\@|-Wl,-E -Wl,--hash-style=gnu|g"   %i/etc/scram.d/cxxcompiler
142 +    perl -p -i -e "s|\@GXXLIB\@|lib64|g" %i/etc/scram.d/cxxcompiler
143 +    perl -p -i -e "s|\@GXXOPT\@|-O2|g"   %i/etc/scram.d/cxxcompiler
144 +  ;;
145 + esac
146 +
147 + # General substitutions
148   perl -p -i -e "s|\@GCC_ROOT\@|$GCC_ROOT|g;
149                 s|\@GCC_VERSION\@|$GCC_VERSION|g;
150                 s|\@COMPILER_VERSION\@|$COMPILER_VERSION|g;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines