Skip to content

Commit

Permalink
Merge pull request #2246 from ghaerr/owcfloat
Browse files Browse the repository at this point in the history
[libc] Initial support for OpenWatcom soft floating point
  • Loading branch information
ghaerr authored Feb 27, 2025
2 parents 313671b + 972d445 commit 8df0177
Show file tree
Hide file tree
Showing 25 changed files with 5,099 additions and 6 deletions.
7 changes: 3 additions & 4 deletions elks/tools/objtools/ewcc
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ ELKSINCLUDE2=$TOPDIR/libc/include/watcom
# -Wc,-zev # enable void arithmetic
# -Wc,-zls # remove automatically inserted symbols
# -Wc,-wcd=N # disable warning N
# -Wc,-fpi87 # inline 8087 fp
# -Wc,-x # ignore INCLUDE environment variable
# -Wc,-r # save/restore segment registers
# -fnostdlib # don't refere standard libraries
# unused:
# -fno-stack-check # don't generate stack check code
# -ztNum # specify far data threshold (default 32767, or 256 if no Num)
# -Wc,-fpi87 # inline 8087 fp
# -mhard-emu-float # -Wc,-fpi (inline 8087 w/emulation)
# -msoft-float # -Wc,-fpc
# -Wc,-fpc # non-IEEE soft fp
# -msoft-float # -Wc,-fpc (software fp)
# -fpmath
# -mabi=cdecl # push all args
# -fnonconst-initializers # -Wc,aa
Expand All @@ -57,7 +56,7 @@ CCFLAGS="\
-march=i86 \
-Os \
-std=c99 \
-Wc,-fpi87 \
-msoft-float \
-Wc,-zev \
-Wc,-zls \
-Wc,-x \
Expand Down
1 change: 1 addition & 0 deletions libc/include/assert.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef __ASSERT_H
#define __ASSERT_H
#include <features.h>

/* If NDEBUG is defined, do nothing.
If not, and EXPRESSION is zero, print an error message and abort. */
Expand Down
2 changes: 1 addition & 1 deletion libc/stdio/vfprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#if !defined(__HAS_NO_FLOATS__) && defined(HAS_WEAKEN)
#include <sys/weaken.h>
/*
* Use '#include <sys/weaken.h>` and '__STDIO_PRINT_FLOATS'
* Use '#include <sys/linksym.h>` and '__STDIO_PRINT_FLOATS'
* in user program to link in libc %e,%f,%g * printf/sprintf support
* (see below, stdio.h and sys/weaken.h).
*/
Expand Down
2 changes: 1 addition & 1 deletion libc/watcom.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CARCH =\
-march=i86 \
-std=c99 \
-fno-stack-check \
-Wc,-fpi87 \
-Wc,-fpc \
-Wc,-zev \
-Wc,-zls \
-Wc,-x \
Expand Down
Loading

0 comments on commit 8df0177

Please sign in to comment.