Author: wmb
Date: Tue Aug 17 19:22:56 2010
New Revision: 1937
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1937
Log:
x86 - memtest86 - changed -Os to -O1 in Makefile to fix runtime errors
that occurred when compiling with GCC 4.4.3 (-Os worked well with GCC 4.2).
The specific symptom was that Test #2 would report lots of errors in the
0xfffxx range - which wasn't supposed to be tested at all.
Modified:
clients/memtest86/Makefile
Modified: clients/memtest86/Makefile
==============================================================================
--- clients/memtest86/Makefile Wed Aug 11 20:30:05 2010 (r1936)
+++ clients/memtest86/Makefile Tue Aug 17 19:22:56 2010 (r1937)
@@ -28,8 +28,9 @@
CC=gcc
#
# gcc compiler options, these settings should suffice
+# (It is tempting to use -Os, but that causes runtime failures when compiled with GCC >4.2)
#
-CCFLAGS=-Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding
+CCFLAGS=-Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding
CCFLAGS += -fno-stack-protector
CCFLAGS += $(DEFINES)
Author: wmb
Date: Wed Aug 11 10:51:38 2010
New Revision: 1935
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1935
Log:
ARM - more cross-compile tweaks.
Modified:
cpu/arm/Linux/armforth.static
cpu/x86/Linux/armforth
forth/wrapper/wrapper.c
Modified: cpu/arm/Linux/armforth.static
==============================================================================
Binary file (source and/or target). No diff available.
Modified: cpu/x86/Linux/armforth
==============================================================================
--- cpu/x86/Linux/armforth Wed Aug 11 10:50:37 2010 (r1934)
+++ cpu/x86/Linux/armforth Wed Aug 11 10:51:38 2010 (r1935)
@@ -1,2 +1,11 @@
#!/bin/sh
-qemu-arm ${BP}/cpu/arm/Linux/armforth.static $*
+
+# The "-0 $0" below causes the wrapper to skip arguments
+# before the -0, so the program name appears to be the
+# name of this script ($0). That makes the logger put the
+# this script name in the "command: " line, instead of
+# putting cpu/arm/Linux/armforth.static, which is not
+# directly executable in the cross environment, there.
+# That makes fast-rebuilds from the .log file work right.
+
+qemu-arm ${BP}/cpu/arm/Linux/armforth.static -0 $0 $*
Modified: forth/wrapper/wrapper.c
==============================================================================
--- forth/wrapper/wrapper.c Wed Aug 11 10:50:37 2010 (r1934)
+++ forth/wrapper/wrapper.c Wed Aug 11 10:51:38 2010 (r1935)
@@ -815,6 +815,20 @@
argc = ccommand(&argv);
#endif
+ /*
+ * This is a special accomodation for running the wrapper under an emulator
+ * like QEMU. You can make a shell script containing a line like:
+ * qemu-arm wrapper_name -0 script_name ...
+ * The logger will then log the name of script instead of the actual wrapper.
+ * An alternate would be to use Linux's binfmt_misc facility to bind the
+ * emulator to the wrapper binary, but the problem with that is that it
+ * requires root to register the binding every time you start the computer.
+ */
+ if (argc > 1 && (0 == strcmp(argv[1], "-0"))) {
+ argv += 2;
+ argc -= 2;
+ }
+
progname = argv[0];
log_command_line(progname, dictfile, f, argc, argv);