Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fec31be
Merge pull request #271 from AmigaLabs/master
walkero-gr Apr 28, 2025
905bc88
Merge branch 'master' into development
walkero-gr Apr 28, 2025
f28a4c4
Improved memalign (#272)
afxgroup Jun 7, 2025
35539a9
Pthreads fixes (#273)
afxgroup Jun 10, 2025
7d6500a
Roundeven functions (#274)
afxgroup Jun 15, 2025
dd0350c
Profile fixes (#278)
afxgroup Jun 22, 2025
3cc20ed
Small change on profile reverted (#279)
afxgroup Jun 23, 2025
7c22f41
Canonicalize file name (#281)
afxgroup Jun 28, 2025
f63710d
Fixed a crash when debug was enabled (#282)
afxgroup Jun 29, 2025
fec61cd
Ctype (#283)
afxgroup Jul 3, 2025
254e7ba
Fix memory alignment in SIMPLE and BLOCK_FAST memory allocators (wmem).
elfpipe Jul 11, 2025
49e9c76
Merge branch 'development' of https://github.com/AmigaLabs/clib4 into…
elfpipe Jul 11, 2025
a842ec2
Fix alignment issues with wmem allocator (BLOCK).
elfpipe Jul 23, 2025
a940a01
Delete unnecessary files.
elfpipe Jul 23, 2025
fb358b0
Allocator alignment (#284)
elfpipe Jul 23, 2025
a2b9be9
Fix problem with jumbo blocks (wmem - BLOCK).
elfpipe Jul 24, 2025
a814c5f
Merge branch 'development' into allocator_alignment
elfpipe Jul 26, 2025
c13d3db
Merge pull request #285 from AmigaLabs/allocator_alignment
elfpipe Jul 26, 2025
b6928d6
Remove #endif.
elfpipe Jul 26, 2025
0ee9533
Merge pull request #286 from AmigaLabs/allocator_alignment
elfpipe Jul 26, 2025
f8d315d
Fixed pthread lib (#287)
afxgroup Jul 29, 2025
8a6f8e2
Tidy up memory allocation code. Fix singular problem with BLOCK. Sugg…
elfpipe Aug 1, 2025
f057d34
Speedup I/O a little bit (#289)
afxgroup Aug 1, 2025
dd9fea4
Fixed a problem on Input/Output/Error streams (#290)
afxgroup Aug 5, 2025
64d3630
Preliminary fix for the workbench startup message issue. (#291)
elfpipe Aug 6, 2025
83adeb9
This is another fix for the BLOCK allocator. (#292)
elfpipe Aug 7, 2025
5b3cae8
Various speed up improvements (#293)
afxgroup Aug 14, 2025
67b1257
Replaced Semaphores with Mutexes in pthread library (#294)
afxgroup Aug 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 0 additions & 196 deletions .clang-format

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ build/
clib4/

.idea
.vscode
.vscode

Makefile
15 changes: 11 additions & 4 deletions GNUmakefile.os4
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ DPKG_LIB ?= clib4_1.0_amd64
WARNINGS := \
-Wall -W -Wextra -Wpointer-arith -Wsign-compare -Wmissing-prototypes \
-Wundef -Wmissing-declarations -Wunused -Wwrite-strings -Wno-unused-value -Wno-comment -Wno-missing-braces \
-Wno-deprecated-declarations -Wno-sign-compare -Wno-unused-variable -Wno-parentheses -Wno-missing-prototypes \
-Wno-deprecated-declarations -Wno-unused-variable -Wno-parentheses -Wno-missing-prototypes \
-Wstrict-aliasing -Wno-shadow -Wno-discarded-qualifiers -Wno-unused-function -Wno-unused-parameter -Wno-strict-aliasing \
-Wno-type-limits -Wno-cast-function-type -Wno-frame-address -Wno-error=unused-but-set-variable -Wno-stringop-overflow -Werror \
# -Wbad-function-cast -Wconversion -Wformat
Expand Down Expand Up @@ -116,7 +116,7 @@ STATIC := $(if $(STATIC),$(STATIC),yes)
LARGEDATA :=
OPTIONS += $(LARGEDATA) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wa,-mregnames -fno-builtin -nostdlib -D_GNU_SOURCE -D_XOPEN_SOURCE -D_USE_GNU -pipe \
-nostdinc -nostartfiles -nostdlib
OPTIMIZE := -O3 -mregnames -mmultiple -mupdate -mstrict-align
OPTIMIZE := -O3 -mregnames

STABS :=
DLIBS :=
Expand All @@ -128,9 +128,14 @@ else
DLIBS += $(BUILD_DIR)/lib/libdebug.a
endif


CFLAGS := $(WARNINGS) $(OPTIMIZE) $(OPTIONS) $(INCLUDES) -D__USE_INLINE__
CFLAGS_N := $(WARNINGS) $(OPTIMIZE) $(OPTIONS) $(INCLUDES)
AFLAGS := -Wa,-mregnames -mstrict-align
AFLAGS := -Wa,-mregnames

ifdef USE_TEMPFILES
CFLAGS += -DUSE_TEMPFILES
endif

ifdef SPE
CC := ppc-amigaos-gcc-6.4.0
Expand All @@ -146,7 +151,8 @@ ifdef SPE
endif

ifdef PROFILE
CFLAGS += -pg
CFLAGS += -pg -falign-functions=32 -fno-omit-frame-pointer
AFLAGS += -fno-omit-frame-pointer
DLIBS += -Lbuild/lib -lprofile
endif

Expand Down Expand Up @@ -196,6 +202,7 @@ include libpthread.gmk
include libcrypt.gmk
include librt.gmk
include shared.gmk
# Leave profile as latest one
include libprofile.gmk

prepare:
Expand Down
11 changes: 11 additions & 0 deletions installer/Install
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
(complete 0)
(set @default-dest "LIBS:")
(set @default-sdk-dest "SDK:clib4")
(set @default-env-dest "ENVARC:")
(set @default-dest
(askdir
(prompt "Where would you like to install clib4.library?\nA new Drawer will be created if necessary")
Expand All @@ -19,6 +20,16 @@
(dest @default-dest)
(confirm)
)
(complete 45)
(copyfiles
(prompt "Do you want to install Terminfo files?")
(help @copyfiles-help)
(source "misc")
(choices "terminfo")
(dest @default-env-dest)
(confirm)
)

(complete 60)
(copyfiles
(prompt "Do you want to install development files?")
Expand Down
4 changes: 4 additions & 0 deletions libc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ C_BYTESWAP := \
byteswap/swab64.o

C_CTYPE := \
ctype/ctype_.o \
ctype/isalnum.o \
ctype/isalpha.o \
ctype/isascii.o \
Expand Down Expand Up @@ -492,6 +493,7 @@ C_STDLIB := \
stdlib/atoll.o \
stdlib/bsearch.o \
stdlib/calloc.o \
stdlib/canonicalize_file_name.o \
stdlib/div.o \
stdlib/divsi3.o \
stdlib/dladdr.o \
Expand Down Expand Up @@ -1009,11 +1011,13 @@ SHARED_LIB_STUBS := \
C_LIB := \
c.lib_rev.o \
$(SHARED_LIB_STUBS) \
ctype/ctype_.o \
unistd/getopt.o \
unistd/getopt_long.o \
socket/in6addr_any.o \
socket/in6addr_loopback.o


SOURCES_SHARED = $(addprefix $(OUT_SHARED)/, $(C_LIB))
SOURCES_STATIC = $(addprefix $(OUT_STATIC)/, $(C_LIB))

Expand Down
5 changes: 4 additions & 1 deletion libm.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@ C_MATH := \
math/s_tgammal.o \
math/s_trunc.o \
math/s_truncf.o \
math/s_truncl.o
math/s_truncl.o \
math/s_roundeven.o \
math/s_roundevenf.o \
math/s_roundevenl.o

ifdef SPE
$(info Using SPE math objects)
Expand Down
2 changes: 1 addition & 1 deletion library/argz/replace.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _buf_findstr(const char *str, char **buf, size_t *buf_len) {
size_t i = 0;
size_t j = 0;

for (i = 0; i < *buf_len; i++) {
for (i = 0; i < (size_t) *buf_len; i++) {
if (str[0] == (*buf)[i]) {
j = i;
while (str[j - i] && (str[j - i] == (*buf)[j]))
Expand Down
33 changes: 33 additions & 0 deletions library/cpu/4xx/ppc4xx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,39 @@
#define r30 %r30
#define r31 %r31

#define fp0 %f0
#define fp1 %f1
#define fp2 %f2
#define fp3 %f3
#define fp4 %f4
#define fp5 %f5
#define fp6 %f6
#define fp7 %f7
#define fp8 %f8
#define fp9 %f9
#define fp10 %f10
#define fp11 %f11
#define fp12 %f12
#define fp13 %f13
#define fp14 %f14
#define fp15 %f15
#define fp16 %f16
#define fp17 %f17
#define fp18 %f18
#define fp19 %f19
#define fp20 %f20
#define fp21 %f21
#define fp22 %f22
#define fp23 %f23
#define fp24 %f24
#define fp25 %f25
#define fp26 %f26
#define fp27 %f27
#define fp28 %f28
#define fp29 %f29
#define fp30 %f30
#define fp31 %f31

#define cr0 %cr0
#define cr1 %cr1
#define cr2 %cr2
Expand Down
Loading
Loading