Fix r3434 check-in. Added missing end to Options.lb. Not entirely sure how it
[coreboot.git] / targets / buildtarget
index 7fce1e149754e87d7d40cad329bd2e28b838ff9a..2b3b83bfce02552f4e979cdec8e021dfe6da9a12 100755 (executable)
@@ -3,7 +3,7 @@ PYTHON=python
 # Target build script
 
 if [ $# -lt 1 ]; then
-       echo "usage: buildtarget target [path-to-linuxbios]"
+       echo "usage: buildtarget target [path-to-coreboot]"
        exit 1
 fi
 
@@ -44,7 +44,7 @@ if [ ! -d $build_dir ] ; then
        mkdir -p $build_dir
 fi
 if [ ! -f $config_py ]; then
-       echo "No linuxbios config script found. Rebuilding it.."
+       echo "No coreboot config script found. Rebuilding it.."
        $PYTHON $yapps2_py $config_g $config_py
 fi
 
@@ -61,7 +61,7 @@ if [ -z "$CC" ]; then
        CC=gcc
 fi
 
-$CC -fno-stack-protector -S -xc /dev/null -o .$$.tmp
+$CC -fno-stack-protector -S -xc /dev/null -o .$$.tmp 2>/dev/null
 
 if [ $? -eq 0 ]; then
        EXTRA_CFLAGS=-fno-stack-protector
@@ -69,9 +69,14 @@ fi
 
 rm -rf .$$.tmp
 
+if $CC -Wl,--help | grep -q build-id; then
+       EXTRA_LFLAGS="$EXTRA_LFLAGS -Wl,--build-id=none"
+fi
+
 for i in $build_dir/Makefile.settings $build_dir/*/Makefile.settings
 do
-       echo CFLAGS+=$EXTRA_CFLAGS >>$i
+       echo DISTRO_CFLAGS+=$EXTRA_CFLAGS >>$i
+       echo DISTRO_LFLAGS+=$EXTRA_LFLAGS >>$i
 done
 
 exit $?