[OpenBIOS] r776 - clients/lib/x86

svn at openbios.org svn at openbios.org
Sat Jan 12 18:22:24 CET 2008


Author: wmb
Date: 2008-01-12 18:22:24 +0100 (Sat, 12 Jan 2008)
New Revision: 776

Modified:
   clients/lib/x86/makefile
Log:
Client demo "hello" makefile - added cc flags to force 32 bit compilation.


Modified: clients/lib/x86/makefile
===================================================================
--- clients/lib/x86/makefile	2008-01-07 09:31:33 UTC (rev 775)
+++ clients/lib/x86/makefile	2008-01-12 17:22:24 UTC (rev 776)
@@ -3,7 +3,7 @@
 # -fno-builtin has the effect of suppressing some warnings about
 # functions that conflict with gcc builtins
 CC=gcc
-CFLAGS=-g -fno-builtin
+CFLAGS=-g -m32 -fno-builtin -fno-stack-protector
 
 all: libobp.a hello hello.elf start.o
 
@@ -56,13 +56,16 @@
 # Hello is a demo program that uses the stdio library
 
 hello.elf: libobp.a start.o hello.o
-	ld -Bstatic -N -Ttext 0x100000 -o $@ start.o hello.o libobp.a -lc
+	ld -melf_i386 -Bstatic -N -Ttext 0x100000 -o $@ start.o hello.o libobp.a -lc
 	cp hello.elf hello.syms
 	strip hello.elf
 
 hello.o: ../../hello/hello.c
 	${CC} ${CFLAGS} -c ../../hello/hello.c
 
+hello: hello.o
+	${CC} -m32 $< -o $@
+
 # Binary to ELF converter program
 
 bintoelf: ../bintoelf.c




More information about the OpenBIOS mailing list