1 |
< |
### RPM cms gcc-toolfile 1.0 |
1 |
> |
### RPM cms gcc-toolfile 4.3.2 |
2 |
|
|
3 |
|
# gcc has a separate spec file for the generating a |
4 |
|
# toolfile because gcc.spec could be not build because of the |
14 |
|
then |
15 |
|
GCC_PATH=`which gcc` || exit 1 |
16 |
|
GCC_ROOT=`echo $GCC_PATH | sed -e 's|/bin/gcc||'` |
17 |
< |
GCC_VERSION=`gcc -v 2>&1 | grep "gcc version" | sed 's|.*\([0-9].[0-9].[0-9]\).*|\1|'` || exit 1 |
17 |
> |
GCC_VERSION=`gcc -v 2>&1 | grep "gcc version" | sed 's|[^0-9]*\([0-9].[0-9].[0-9]\).*|\1|'` || exit 1 |
18 |
|
fi |
19 |
|
|
20 |
|
COMPILER_VERSION=`echo %cmsplatf | sed -e 's|.*gcc\([0-9]*\).*|\1|'` |
152 |
|
</tool> |
153 |
|
EOF_TOOLFILE |
154 |
|
;; |
155 |
< |
slc4_ia32_gcc4* ) |
155 |
> |
slc4_ia32_gcc4* | slc5_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> |
169 |
|
<Flags CPPDEFINES="_GNU_SOURCE"> |
170 |
|
<Flags CXXSHAREDOBJECTFLAGS="-fPIC"> |
171 |
|
<Flags CXXFLAGS="-pedantic -ansi -pthread -pipe"> |
172 |
< |
<Flags CXXFLAGS="-O2"> |
172 |
> |
<Flags CXXFLAGS="-O2 -fvisibility-inlines-hidden"> |
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"> |
174 |
> |
<Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses -Werror=array-bounds"> |
175 |
|
<Flags LDFLAGS="-Wl,-E"> |
176 |
|
<Flags CXXSHAREDFLAGS="-Wl,-E"> |
177 |
|
<Flags SHAREDSUFFIX="so"> |
217 |
|
</tool> |
218 |
|
EOF_TOOLFILE |
219 |
|
;; |
220 |
< |
slc4_amd64_* ) |
220 |
> |
slc4_amd64_gcc3* | slc5_amd64_gcc3* ) |
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> |
282 |
|
</tool> |
283 |
|
EOF_TOOLFILE |
284 |
|
;; |
285 |
+ |
slc4_amd64_gcc4* | slc5_amd64_gcc4* ) |
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="gcc@COMPILER_VERSION@"> |
295 |
+ |
<Flags CCcompiler="gcc@COMPILER_VERSION_MAJOR@"> |
296 |
+ |
<Flags MODULEFLAGS="-shared"> |
297 |
+ |
<Flags CXXDEBUGFLAG="-g"> |
298 |
+ |
<Flags CPPDEFINES="GNU_GCC"> |
299 |
+ |
<Flags CPPDEFINES="_GNU_SOURCE"> |
300 |
+ |
<Flags CXXSHAREDOBJECTFLAGS="-fPIC"> |
301 |
+ |
<Flags CXXFLAGS="-pedantic -ansi -pthread -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 -Werror=array-bounds"> |
305 |
+ |
<Flags LDFLAGS="-Wl,-E"> |
306 |
+ |
<Flags CXXSHAREDFLAGS="-Wl,-E"> |
307 |
+ |
<Flags SHAREDSUFFIX="so"> |
308 |
+ |
<Flags SCRAM_LANGUAGE_TYPE="C++"> |
309 |
+ |
<Runtime name=LD_LIBRARY_PATH value="$GCC_BASE/lib64" type=path> |
310 |
+ |
<Runtime name=PATH value="$GCC_BASE/bin" type=path> |
311 |
+ |
</tool> |
312 |
+ |
EOF_TOOLFILE |
313 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/ccompiler |
314 |
+ |
<doc type=BuildSystem::ToolDoc version=1.1> |
315 |
+ |
<tool name=ccompiler version=@GCC_VERSION@ type=compiler> |
316 |
+ |
<client> |
317 |
+ |
<Environment name=GCC_BASE default="@GCC_ROOT@"></Environment> |
318 |
+ |
<Environment name=GCCBINDIR value="$GCC_BASE/bin"></Environment> |
319 |
+ |
<Environment name=CC value="$GCCBINDIR/gcc"></Environment> |
320 |
+ |
</client> |
321 |
+ |
<Flags CDEBUGFLAG="-g"> |
322 |
+ |
<Flags CSHAREDOBJECTFLAGS="-fPIC"> |
323 |
+ |
<Flags CFLAGS="-pthread"> |
324 |
+ |
<Flags CFLAGS="-O2"> |
325 |
+ |
<Flags LDFLAGS="-Wl,-E"> |
326 |
+ |
<Flags CSHAREDFLAGS="-Wl,-E"> |
327 |
+ |
<Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@"> |
328 |
+ |
<Flags SCRAM_LANGUAGE_TYPE="C"> |
329 |
+ |
</tool> |
330 |
+ |
EOF_TOOLFILE |
331 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/f77compiler |
332 |
+ |
<doc type=BuildSystem::ToolDoc version=1.1> |
333 |
+ |
<tool name=f77compiler version=@GCC_VERSION@ type=compiler> |
334 |
+ |
<lib name=gfortran> |
335 |
+ |
<lib name=m> |
336 |
+ |
<client> |
337 |
+ |
<Environment name=G77_BASE default="@GCC_ROOT@"></Environment> |
338 |
+ |
<Environment name=FC default="$G77_BASE/bin/gfortran"></Environment> |
339 |
+ |
</client> |
340 |
+ |
<Flags SCRAM_COMPILER_NAME="gcc@COMPILER_VERSION@"> |
341 |
+ |
<Flags FFLAGS="-fno-second-underscore -Wunused -Wuninitialized"> |
342 |
+ |
<Flags FCO2Flag="-O2"> |
343 |
+ |
<Flags FCOPTIMISED="-O2"> |
344 |
+ |
<Flags FCDEBUGFLAG="-g"> |
345 |
+ |
<Flags FCSHAREDOBJECTFLAGS="-fPIC"> |
346 |
+ |
<Flags SCRAM_LANGUAGE_TYPE="FORTRAN"> |
347 |
+ |
</tool> |
348 |
+ |
EOF_TOOLFILE |
349 |
+ |
;; |
350 |
|
osx104_ppc32_gcc40* ) |
351 |
|
cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler |
352 |
|
<doc type=BuildSystem::ToolDoc version=1.1> |
353 |
|
<tool name=cxxcompiler version=@GCC_VERSION@ type=compiler> |
354 |
+ |
<client> |
355 |
+ |
<Environment name=GCC_BASE default="@GCC_ROOT@"></Environment> |
356 |
+ |
<Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment> |
357 |
+ |
<Environment name=CXX value="$GCCBINDIR/c++"></Environment> |
358 |
+ |
</client> |
359 |
+ |
<Flags SCRAM_COMPILER_NAME="gcc40"> |
360 |
+ |
<Flags CCcompiler="gcc40"> |
361 |
+ |
<Flags MODULEFLAGS=" "> |
362 |
+ |
<Flags CXXDEBUGFLAG="-g"> |
363 |
+ |
<Flags CPPDEFINES="GNU_GCC"> |
364 |
+ |
<Flags CPPDEFINES="_GNU_SOURCE"> |
365 |
+ |
<Flags CXXSHAREDOBJECTFLAGS="-fPIC"> |
366 |
+ |
<Flags CXXFLAGS="-pedantic -ansi -pipe"> |
367 |
+ |
<Flags CXXFLAGS="-O2"> |
368 |
+ |
<Flags CXXFLAGS="-felide-constructors -fmessage-length=0 -ftemplate-depth-300"> |
369 |
+ |
<Flags CXXFLAGS="-Wall -Wno-non-template-friend -Wno-long-long -Wimplicit -Wreturn-type -Wunused -Wparentheses"> |
370 |
+ |
<Flags LDFLAGS=" "> |
371 |
+ |
<Flags CXXSHAREDFLAGS="-dynamiclib -single_module"> |
372 |
+ |
<Flags SHAREDSUFFIX="dylib"> |
373 |
+ |
<Flags SCRAM_LANGUAGE_TYPE="C++"> |
374 |
+ |
<Runtime name=DYLD_LIBRARY_PATH value="$GCC_BASE/lib" type=path> |
375 |
+ |
<Runtime name=PATH value="$GCC_BASE/bin" type=path> |
376 |
+ |
</tool> |
377 |
+ |
EOF_TOOLFILE |
378 |
+ |
;; |
379 |
+ |
osx104_ia32_gcc40* ) |
380 |
+ |
cat << \EOF_TOOLFILE >%i/etc/scram.d/cxxcompiler |
381 |
+ |
<doc type=BuildSystem::ToolDoc version=1.1> |
382 |
+ |
<tool name=cxxcompiler version=@GCC_VERSION@ type=compiler> |
383 |
|
<client> |
384 |
|
<Environment name=GCC_BASE default="@GCC_ROOT@"></Environment> |
385 |
|
<Environment name=GCCBINDIR default="$GCC_BASE/bin"></Environment> |