Skip to content

Commit 537e6e7

Browse files
author
Siva Chandra
committed
[libc] Enable more functions on riscv64.
The list of headers has also been updated. Some duplicated entrypoints have been removed.
1 parent c024fa4 commit 537e6e7

File tree

2 files changed

+68
-5
lines changed

2 files changed

+68
-5
lines changed

libc/config/linux/riscv64/entrypoints.txt

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ set(TARGET_LIBC_ENTRYPOINTS
5454
libc.src.string.strdup
5555
libc.src.string.strerror
5656
libc.src.string.strerror_r
57-
libc.src.string.strdup
58-
libc.src.string.strerror
59-
libc.src.string.strerror_r
6057
libc.src.string.strlcat
6158
libc.src.string.strlcpy
6259
libc.src.string.strlen
@@ -65,12 +62,10 @@ set(TARGET_LIBC_ENTRYPOINTS
6562
libc.src.string.strncmp
6663
libc.src.string.strncpy
6764
libc.src.string.strndup
68-
libc.src.string.strndup
6965
libc.src.string.strnlen
7066
libc.src.string.strpbrk
7167
libc.src.string.strrchr
7268
libc.src.string.strsignal
73-
libc.src.string.strsignal
7469
libc.src.string.strspn
7570
libc.src.string.strstr
7671
libc.src.string.strtok
@@ -332,6 +327,44 @@ if(LLVM_LIBC_FULL_BUILD)
332327
libc.src.network.ntohl
333328
libc.src.network.ntohs
334329

330+
# pthread.h entrypoints
331+
libc.src.pthread.pthread_atfork
332+
libc.src.pthread.pthread_attr_destroy
333+
libc.src.pthread.pthread_attr_init
334+
libc.src.pthread.pthread_attr_getdetachstate
335+
libc.src.pthread.pthread_attr_getguardsize
336+
libc.src.pthread.pthread_attr_getstack
337+
libc.src.pthread.pthread_attr_getstacksize
338+
libc.src.pthread.pthread_attr_setdetachstate
339+
libc.src.pthread.pthread_attr_setguardsize
340+
libc.src.pthread.pthread_attr_setstack
341+
libc.src.pthread.pthread_attr_setstacksize
342+
libc.src.pthread.pthread_create
343+
libc.src.pthread.pthread_detach
344+
libc.src.pthread.pthread_equal
345+
libc.src.pthread.pthread_exit
346+
libc.src.pthread.pthread_getname_np
347+
libc.src.pthread.pthread_getspecific
348+
libc.src.pthread.pthread_join
349+
libc.src.pthread.pthread_key_create
350+
libc.src.pthread.pthread_key_delete
351+
libc.src.pthread.pthread_self
352+
libc.src.pthread.pthread_setname_np
353+
libc.src.pthread.pthread_mutex_destroy
354+
libc.src.pthread.pthread_mutex_init
355+
libc.src.pthread.pthread_mutex_lock
356+
libc.src.pthread.pthread_mutex_unlock
357+
libc.src.pthread.pthread_mutexattr_destroy
358+
libc.src.pthread.pthread_mutexattr_init
359+
libc.src.pthread.pthread_mutexattr_getpshared
360+
libc.src.pthread.pthread_mutexattr_getrobust
361+
libc.src.pthread.pthread_mutexattr_gettype
362+
libc.src.pthread.pthread_mutexattr_setpshared
363+
libc.src.pthread.pthread_mutexattr_setrobust
364+
libc.src.pthread.pthread_mutexattr_settype
365+
libc.src.pthread.pthread_once
366+
libc.src.pthread.pthread_setspecific
367+
335368
# sched.h entrypoints
336369
libc.src.sched.__sched_getcpucount
337370

@@ -371,6 +404,18 @@ if(LLVM_LIBC_FULL_BUILD)
371404
libc.src.stdlib.exit
372405
libc.src.stdlib.getenv
373406

407+
# signal.h entrypoints
408+
libc.src.signal.raise
409+
libc.src.signal.kill
410+
libc.src.signal.sigaction
411+
libc.src.signal.sigaltstack
412+
libc.src.signal.sigdelset
413+
libc.src.signal.sigaddset
414+
libc.src.signal.sigemptyset
415+
libc.src.signal.sigprocmask
416+
libc.src.signal.sigfillset
417+
libc.src.signal.signal
418+
374419
# threads.h entrypoints
375420
libc.src.threads.call_once
376421
libc.src.threads.cnd_broadcast
@@ -408,6 +453,15 @@ if(LLVM_LIBC_FULL_BUILD)
408453

409454
# unistd.h entrypoints
410455
libc.src.unistd.environ
456+
libc.src.unistd.execv
457+
libc.src.unistd.getopt
458+
libc.src.unistd.optarg
459+
libc.src.unistd.optind
460+
libc.src.unistd.optopt
461+
libc.src.unistd.opterr
462+
463+
# sys/select.h entrypoints
464+
libc.src.sys.select.select
411465
)
412466
endif()
413467

libc/config/linux/riscv64/headers.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
set(TARGET_PUBLIC_HEADERS
2+
libc.include.assert
23
libc.include.ctype
34
libc.include.errno
5+
libc.include.fenv
46
libc.include.inttypes
57
libc.include.math
8+
libc.include.pthread
9+
libc.include.signal
610
libc.include.sched
711
libc.include.stdio
812
libc.include.stdlib
913
libc.include.string
1014
libc.include.strings
15+
libc.include.sys_mman
16+
libc.include.sys_socket
17+
libc.include.sys_syscall
18+
libc.include.threads
1119
libc.include.time
20+
libc.include.unistd
1221
)

0 commit comments

Comments
 (0)