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|'` |
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> |