From e6138735bda8bb022b3173ef284e696f45c216dc Mon Sep 17 00:00:00 2001 From: Ziyao Date: Sun, 3 Apr 2022 10:37:29 +0800 Subject: [PATCH] Add Hello World --- tests/Compile.sh | 8 ++++++++ tests/Hello_World.c | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100755 tests/Compile.sh create mode 100644 tests/Hello_World.c diff --git a/tests/Compile.sh b/tests/Compile.sh new file mode 100755 index 0000000..d86d19c --- /dev/null +++ b/tests/Compile.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# Compiling one C source with tcc and musl +# tcc-musl tests +# file: /tests/Compile.sh +# Date: 2022.04.03 + +tcc $1 -nostdlib ../lib/Scrt1.o ../lib/libc.a -o $2 -Wall -Werror -g -O0 -pedantic -Wextra -I ../include -I ../obj/include -I ../arch/x86_64/ diff --git a/tests/Hello_World.c b/tests/Hello_World.c new file mode 100644 index 0000000..42c581c --- /dev/null +++ b/tests/Hello_World.c @@ -0,0 +1,15 @@ +/* + musl-tcc tests + src:/tests/Hello_World.c + Date:2022.04.03 + By MIT License. + Copyright(c) 2022 Ziyao.All rights reserved. +*/ + +#include + +int main(void) +{ + write(0,"Hello World\n",12); + return 0; +}