Skip to contentSkip to conversation

kvm-userspace: ppc: Add "hello world" test for

PATCH In review Deepa Srinivasan 2 participants 2 messages Nov 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm-userspace: ppc: Add "hello world" test for

# HG changeset patch
# User Deepa Srinivasan <[email protected]>
# Date 1226681616 21600
# Node ID 1a74ac23ff60cc2ab052072243dc4ff47faf5849
# Parent bdd5682d28d56e62c93a795465eb3625713a3885 [PATCH] kvm-userspace: ppc: Add "hello world" test for libcflat

From: Deepa Srinivasan <[email protected]>

Add a test program ("hello world") to exercise printf() in libcflat.
Also, include "-ffreestanding" in the compiler options to avoid any checks for built-in functions.

---

[diffstat]

 b/user/test/powerpc/helloworld.c |    8 ++++++++
 user/config-powerpc.mak          |    4 +++-
 2 files changed, 11 insertions(+), 1 deletion(-)

[diff]

user/config-powerpc.mak +3 -2
diff -r bdd5682d28d5 -r 1a74ac23ff60 user/config-powerpc.mak
@@ -1,5 +1,6 @@ CFLAGS += -I $(KERNELDIR)/include
 CFLAGS += -I $(KERNELDIR)/include
 CFLAGS += -Wa,-mregnames -I test/lib
+CFLAGS += -ffreestanding
 
 cstart := test/powerpc/cstart.o
 
@@ -7,7 +8,6 @@ cflatobjs += \
 	test/lib/powerpc/io.o
 
 $(libcflat): LDFLAGS += -nostdlib
-$(libcflat): CFLAGS += -ffreestanding
 
 # these tests do not use libcflat
 simpletests := \
@@ -17,7 +17,8 @@ simpletests := \
 
 # theses tests use cstart.o, libcflat, and libgcc
 tests := \
-	test/powerpc/exit.bin
+	test/powerpc/exit.bin \
+	test/powerpc/helloworld.bin
 
 include config-powerpc-$(PROCESSOR).mak
 
user/test/powerpc/helloworld.c new file +27 -0
diff -r bdd5682d28d5 -r 1a74ac23ff60 user/test/powerpc/helloworld.c
@@ -0,0 +1,27 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2, as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Copyright IBM Corp. 2008
+ *
+ * Authors: Deepa Srinivasan <[email protected]>
+ */
+
+#include "libcflat.h"
+
+int main()
+{
+	printf("Hello world\n");
+
+	return 1;
+}
#1 lore raw

Re: [PATCH 1 of 2] [PATCH] kvm-userspace: ppc: Add "hello world"

Quoted 7 lines · Deepa Srinivasan

# HG changeset patch
# User Deepa Srinivasan <[email protected]>
# Date 1226681616 21600
# Node ID 1a74ac23ff60cc2ab052072243dc4ff47faf5849
# Parent bdd5682d28d56e62c93a795465eb3625713a3885 [PATCH] kvm-userspace: ppc: Add "hello world" test for libcflat

Quoted 7 lines

From: Deepa Srinivasan <[email protected]>

Add a test program ("hello world") to exercise printf() in libcflat. Also, include "-ffreestanding" in the compiler options to avoid any checks for built-in functions.

Looks good Deepa, but as you described above, this really is two separate patches. Could you submit the -ffreestanding patch separately from the helloworld patch?

Signature · 2 lines
Hollis Blanchard
IBM Linux Technology Center