[coreboot] -Wa, --divide command not found

Roger rogerx.oss at gmail.com
Sun Jan 9 00:16:50 CET 2011


I get the following after typing "make" within coreboot source folder using
SeaBIOS, "/bin/sh: -Wa,--divide: command not found"

---snip---
Checking out SeaBIOS 0.6.1-stable
Already up-to-date.
M       src/config.h
Already on '0.6.1-stable'
/bin/sh: -Wa,--divide: command not found
  Compiling whole program out/ccode.16.s
---snip---


$ fgrep coreboot/ -r -e "--divide"

./payloads/libpayload/util/xcompile/xcompile:testcc "$CC" "$CFLAGS-Wa,--divide " && CFLAGS="$CFLAGS-Wa,--divide "
./util/abuild/abuild:           # i386-elf target needs --divide, for i386-linux, that's the default
./util/abuild/abuild:                   CC="$CC -Wa,--divide"
./util/xcompile/xcompile:testcc "$CC" "$CFLAGS-Wa,--divide " && CFLAGS="$CFLAGS-Wa,--divide "

(removed .svn folders from above listing)


Ah, looks like there's a missing space char between "$CFLAGS" and "-Wa"
within xcompile:testcc within the above grep!  (First line within the
above grep listing.)

Executing a little further, I'm getting another error with the flags syntax
used within the code.  Looks like somebody substituted commas for spaces on
some of the flags used.

Seems I've corrected some within both xcompile and abuild, but am still
getting "/bin/sh: -fno-stack-protector: command not found" some place.

Attaching an svn diff of what I have so far.

-- 
Roger
http://rogerx.freeshell.org/
-------------- next part --------------
Index: payloads/libpayload/util/xcompile/xcompile
===================================================================
--- payloads/libpayload/util/xcompile/xcompile	(revision 6247)
+++ payloads/libpayload/util/xcompile/xcompile	(working copy)
@@ -17,7 +17,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
-
 testcc()
 {
 	echo "_start(void) {}" > .$$$$.c
@@ -75,9 +74,9 @@
 fi
 
 CC="${GCCPREFIX}gcc"
-testcc "$CC" "$CFLAGS-Wa,--divide " && CFLAGS="$CFLAGS-Wa,--divide "
-testcc "$CC" "$CFLAGS-fno-stack-protector " && CFLAGS="$CFLAGS-fno-stack-protector "
-testcc "$CC" "$CFLAGS-Wl,--build-id=none " && CFLAGS="$CFLAGS-Wl,--build-id=none "
+testcc "$CC" "$CFLAGS -Wa --divide " && CFLAGS="$CFLAGS -Wa --divide "
+testcc "$CC" "$CFLAGS -fno-stack-protector " && CFLAGS="$CFLAGS -fno-stack-protector "
+testcc "$CC" "$CFLAGS -Wl --build-id=none " && CFLAGS="$CFLAGS -Wl --build-id=none "
 
 if which gcc 2>/dev/null >/dev/null; then
 	HOSTCC=gcc
Index: util/xcompile/xcompile
===================================================================
--- util/xcompile/xcompile	(revision 6247)
+++ util/xcompile/xcompile	(working copy)
@@ -75,9 +75,9 @@
 fi
 
 CC="${GCCPREFIX}gcc"
-testcc "$CC" "$CFLAGS-Wa,--divide " && CFLAGS="$CFLAGS-Wa,--divide "
-testcc "$CC" "$CFLAGS-fno-stack-protector " && CFLAGS="$CFLAGS-fno-stack-protector "
-testcc "$CC" "$CFLAGS-Wl,--build-id=none " && CFLAGS="$CFLAGS-Wl,--build-id=none "
+testcc "$CC" "$CFLAGS -Wa --divide " && CFLAGS="$CFLAGS -Wa --divide "
+testcc "$CC" "$CFLAGS -fno-stack-protector " && CFLAGS="$CFLAGS -fno-stack-protector "
+testcc "$CC" "$CFLAGS -Wl --build-id=none " && CFLAGS="$CFLAGS -Wl --build-id=none "
 
 if which gcc 2>/dev/null >/dev/null; then
 	HOSTCC=gcc
Index: util/abuild/abuild
===================================================================
--- util/abuild/abuild	(revision 6247)
+++ util/abuild/abuild	(working copy)
@@ -327,7 +327,7 @@
 	if which $TARCH-elf-gcc 2>/dev/null >/dev/null; then
 		# i386-elf target needs --divide, for i386-linux, that's the default
 		if [ "$TARCH" = "i386" ]; then
-			CC="$CC -Wa,--divide"
+			CC="$CC -Wa --divide"
 		fi
 		CROSS_COMPILE="$TARCH-elf-"
 		CC=gcc


More information about the coreboot mailing list