[Lunar-commits] r16042 - in lunar/trunk/var/lib/lunar: compilers functions
Auke Kok
sofar at lunar-linux.org
Tue Aug 9 09:01:11 UTC 2005
Author: sofar
Date: 2005-08-09 09:01:08 +0000 (Tue, 09 Aug 2005)
New Revision: 16042
Modified:
lunar/trunk/var/lib/lunar/compilers/c++
lunar/trunk/var/lib/lunar/compilers/cc
lunar/trunk/var/lib/lunar/compilers/g++
lunar/trunk/var/lib/lunar/compilers/gcc
lunar/trunk/var/lib/lunar/compilers/ld
lunar/trunk/var/lib/lunar/compilers/make
lunar/trunk/var/lib/lunar/functions/optimize.lunar
Log:
Adding debugging for compiler paths and also allow gcc version detection to use the present compiler instead of the 'installed' which will allow you call a newer gcc with the proper optimization options.
Modified: lunar/trunk/var/lib/lunar/compilers/c++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/c++ 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/compilers/c++ 2005-08-09 09:01:08 UTC (rev 16042)
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $CXX_EXT g++ $CCOPT \"$@\"" >&2
+ echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT \"$@\"" >&2
fi
$CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT "$@"
Modified: lunar/trunk/var/lib/lunar/compilers/cc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/cc 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/compilers/cc 2005-08-09 09:01:08 UTC (rev 16042)
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $CC_EXT gcc $COPT \"$@\"" >&2
+ echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT \"$@\"" >&2
fi
$CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT "$@"
Modified: lunar/trunk/var/lib/lunar/compilers/g++
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/g++ 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/compilers/g++ 2005-08-09 09:01:08 UTC (rev 16042)
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $CXX_EXT g++ $CCOPT \"$@\"" >&2
+ echo "++ $CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT \"$@\"" >&2
fi
$CXX_EXT ${COMPILER_PATH:-/usr/bin}/g++ $CCOPT "$@"
Modified: lunar/trunk/var/lib/lunar/compilers/gcc
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/gcc 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/compilers/gcc 2005-08-09 09:01:08 UTC (rev 16042)
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $CC_EXT gcc $COPT \"$@\"" >&2
+ echo "++ $CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT \"$@\"" >&2
fi
$CC_EXT ${COMPILER_PATH:-/usr/bin}/gcc $COPT "$@"
Modified: lunar/trunk/var/lib/lunar/compilers/ld
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/ld 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/compilers/ld 2005-08-09 09:01:08 UTC (rev 16042)
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ ld \"$@\"" >&2
+ echo "++ ${LD_PATH:-/usr/bin}/ld \"$@\"" >&2
fi
${LD_PATH:-/usr/bin}/ld "$@"
Modified: lunar/trunk/var/lib/lunar/compilers/make
===================================================================
--- lunar/trunk/var/lib/lunar/compilers/make 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/compilers/make 2005-08-09 09:01:08 UTC (rev 16042)
@@ -1,7 +1,7 @@
#!/bin/bash
if [ -n "$LUNAR_DEBUG" ] ; then
- echo "++ $MAKE_EXT make ${MAKES:+-j$MAKES} \"$@\"" >&2
+ echo "++ $MAKE_EXT ${MAKE_PATH:-/usr/bin}/make ${MAKES:+-j$MAKES} \"$@\"" >&2
fi
$MAKE_EXT ${MAKE_PATH:-/usr/bin}/make ${MAKES:+-j$MAKES} "$@"
Modified: lunar/trunk/var/lib/lunar/functions/optimize.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/optimize.lunar 2005-08-09 08:11:57 UTC (rev 16041)
+++ lunar/trunk/var/lib/lunar/functions/optimize.lunar 2005-08-09 09:01:08 UTC (rev 16042)
@@ -743,8 +743,9 @@
;;
esac
- if [ "$(installed_version gcc | cut -d. -f1,2)" == "3.4" \
- -o "$(installed_version gcc | cut -d. -f1)" == "4" ] ; then
+ local GCC_REALVERSION=$(${COMPILER_PATH:-/usr/bin}/gcc --version | head -n 1 | awk '{print $3}')
+ if [ "$(echo $GCC_REALVERSION | cut -d. -f1,2)" == "3.4" \
+ -o "$(echo $GCC_REALVERSION | cut -d. -f1)" == "4" ] ; then
CFLAGS=$(echo $CFLAGS | sed 's:-mcpu:-mtune:')
CXXFLAGS=$(echo $CXXFLAGS | sed 's:-mcpu:-mtune:')
fi
More information about the Lunar-commits
mailing list