From cf7da98be88f1f696fa114a8f5c1b2b4eb4a8b5f Mon Sep 17 00:00:00 2001 From: turbocat Date: Sun, 19 Jun 2022 19:27:38 +0000 Subject: [PATCH] libc.obj set "tan" as global git-svn-id: svn://kolibrios.org@9846 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/ktcc/trunk/libc.obj/source/Tupfile.lua | 6 ++---- programs/develop/ktcc/trunk/libc.obj/source/libc.c | 4 ++-- programs/develop/ktcc/trunk/libc.obj/source/math/tan.s | 4 +++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/develop/ktcc/trunk/libc.obj/source/Tupfile.lua b/programs/develop/ktcc/trunk/libc.obj/source/Tupfile.lua index 84789f5f9b..380289707f 100755 --- a/programs/develop/ktcc/trunk/libc.obj/source/Tupfile.lua +++ b/programs/develop/ktcc/trunk/libc.obj/source/Tupfile.lua @@ -32,13 +32,11 @@ GAS_SRC = { "string/memmove.s" } -OBJS = {} +OBJS = {"libc.c"} tup.append_table(OBJS, tup.foreach_rule(GAS_SRC, "as --32 %f -o %o", "%B.o") ) -table.insert(OBJS, "libc.c"); - -tup.rule(OBJS, "kos32-tcc" .. CFLAGS .. INCLUDES .. " -o %o %f " .. " && strip %o --strip-unneeded " , "libc.o") +tup.rule(OBJS, "kos32-tcc" .. CFLAGS .. INCLUDES .. " %f -o %o " .. " && strip %o --strip-unneeded " , "libc.o") tup.rule("libc.o", "objconv -fcoff32 %f %o " .. tup.getconfig("KPACK_CMD"), "%B.obj") diff --git a/programs/develop/ktcc/trunk/libc.obj/source/libc.c b/programs/develop/ktcc/trunk/libc.obj/source/libc.c index d53280f7a7..ae7acd9228 100644 --- a/programs/develop/ktcc/trunk/libc.obj/source/libc.c +++ b/programs/develop/ktcc/trunk/libc.obj/source/libc.c @@ -1,5 +1,6 @@ #include +#include "libtcc1/libtcc1.c" #include "ctype/is.c" #include "ctype/tolower.c" #include "ctype/toupper.c" @@ -80,7 +81,6 @@ #include "string/strstr.c" #include "string/strtok.c" #include "string/strxfrm.c" - #include "stdlib/abs.c" #include "stdlib/assert.c" #include "stdlib/atof.c" @@ -288,5 +288,5 @@ ksys_dll_t EXPORTS[] = { { "difftime", &difftime }, { "basename", &basename }, { "dirname", &dirname }, - NULL, + NULL }; diff --git a/programs/develop/ktcc/trunk/libc.obj/source/math/tan.s b/programs/develop/ktcc/trunk/libc.obj/source/math/tan.s index 5101c4ffbf..efe20bed54 100644 --- a/programs/develop/ktcc/trunk/libc.obj/source/math/tan.s +++ b/programs/develop/ktcc/trunk/libc.obj/source/math/tan.s @@ -1,5 +1,7 @@ /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ +.global tan; + tan.L0: .quad 0xffffffffffffffff @@ -10,7 +12,7 @@ tan: fstp %st(0) sahf jnp tan.L1 -/* fstp %st(0) - if exception, there is nothing on the stack */ + fstp %st(0) /*- if exception, there is nothing on the stack */ fldl tan.L0 tan.L1: ret