Skip to content

Commit

Permalink
[libc] Include locale support in baremetal configuration (llvm#127103)
Browse files Browse the repository at this point in the history
Having locale is a requirement for C++ streams.
  • Loading branch information
petrhosek authored and joaosaffran committed Feb 14, 2025
1 parent 10d8446 commit 63d2a67
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 0 deletions.
38 changes: 38 additions & 0 deletions libc/config/baremetal/aarch64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,50 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.ctype.tolower
libc.src.ctype.toupper

# ctype.h entrypoints
libc.src.ctype.isalnum_l
libc.src.ctype.isalpha_l
libc.src.ctype.isblank_l
libc.src.ctype.iscntrl_l
libc.src.ctype.isdigit_l
libc.src.ctype.isgraph_l
libc.src.ctype.islower_l
libc.src.ctype.isprint_l
libc.src.ctype.ispunct_l
libc.src.ctype.isspace_l
libc.src.ctype.isupper_l
libc.src.ctype.isxdigit_l
libc.src.ctype.tolower_l
libc.src.ctype.toupper_l

# stdlib.h entrypoints
libc.src.stdlib.strtod_l
libc.src.stdlib.strtof_l
libc.src.stdlib.strtol_l
libc.src.stdlib.strtold_l
libc.src.stdlib.strtoll_l
libc.src.stdlib.strtoul_l
libc.src.stdlib.strtoull_l

# string.h entrypoints
libc.src.string.strcoll_l
libc.src.string.strxfrm_l

# compiler entrypoints (no corresponding header)
libc.src.compiler.__stack_chk_fail

# errno.h entrypoints
libc.src.errno.errno

# locale.h entrypoints
libc.src.locale.localeconv
libc.src.locale.duplocale
libc.src.locale.freelocale
libc.src.locale.localeconv
libc.src.locale.newlocale
libc.src.locale.setlocale
libc.src.locale.uselocale

# setjmp.h entrypoints
libc.src.setjmp.longjmp
libc.src.setjmp.setjmp
Expand Down
1 change: 1 addition & 0 deletions libc/config/baremetal/aarch64/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(TARGET_PUBLIC_HEADERS
libc.include.fenv
libc.include.float
libc.include.inttypes
libc.include.locale
libc.include.math
libc.include.setjmp
libc.include.stdfix
Expand Down
38 changes: 38 additions & 0 deletions libc/config/baremetal/arm/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,50 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.ctype.tolower
libc.src.ctype.toupper

# ctype.h entrypoints
libc.src.ctype.isalnum_l
libc.src.ctype.isalpha_l
libc.src.ctype.isblank_l
libc.src.ctype.iscntrl_l
libc.src.ctype.isdigit_l
libc.src.ctype.isgraph_l
libc.src.ctype.islower_l
libc.src.ctype.isprint_l
libc.src.ctype.ispunct_l
libc.src.ctype.isspace_l
libc.src.ctype.isupper_l
libc.src.ctype.isxdigit_l
libc.src.ctype.tolower_l
libc.src.ctype.toupper_l

# stdlib.h entrypoints
libc.src.stdlib.strtod_l
libc.src.stdlib.strtof_l
libc.src.stdlib.strtol_l
libc.src.stdlib.strtold_l
libc.src.stdlib.strtoll_l
libc.src.stdlib.strtoul_l
libc.src.stdlib.strtoull_l

# string.h entrypoints
libc.src.string.strcoll_l
libc.src.string.strxfrm_l

# compiler entrypoints (no corresponding header)
libc.src.compiler.__stack_chk_fail

# errno.h entrypoints
libc.src.errno.errno

# locale.h entrypoints
libc.src.locale.localeconv
libc.src.locale.duplocale
libc.src.locale.freelocale
libc.src.locale.localeconv
libc.src.locale.newlocale
libc.src.locale.setlocale
libc.src.locale.uselocale

# setjmp.h entrypoints
libc.src.setjmp.longjmp
libc.src.setjmp.setjmp
Expand Down
1 change: 1 addition & 0 deletions libc/config/baremetal/arm/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(TARGET_PUBLIC_HEADERS
libc.include.fenv
libc.include.float
libc.include.inttypes
libc.include.locale
libc.include.math
libc.include.setjmp
libc.include.stdfix
Expand Down
38 changes: 38 additions & 0 deletions libc/config/baremetal/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,50 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.ctype.tolower
libc.src.ctype.toupper

# ctype.h entrypoints
libc.src.ctype.isalnum_l
libc.src.ctype.isalpha_l
libc.src.ctype.isblank_l
libc.src.ctype.iscntrl_l
libc.src.ctype.isdigit_l
libc.src.ctype.isgraph_l
libc.src.ctype.islower_l
libc.src.ctype.isprint_l
libc.src.ctype.ispunct_l
libc.src.ctype.isspace_l
libc.src.ctype.isupper_l
libc.src.ctype.isxdigit_l
libc.src.ctype.tolower_l
libc.src.ctype.toupper_l

# stdlib.h entrypoints
libc.src.stdlib.strtod_l
libc.src.stdlib.strtof_l
libc.src.stdlib.strtol_l
libc.src.stdlib.strtold_l
libc.src.stdlib.strtoll_l
libc.src.stdlib.strtoul_l
libc.src.stdlib.strtoull_l

# string.h entrypoints
libc.src.string.strcoll_l
libc.src.string.strxfrm_l

# compiler entrypoints (no corresponding header)
libc.src.compiler.__stack_chk_fail

# errno.h entrypoints
libc.src.errno.errno

# locale.h entrypoints
libc.src.locale.localeconv
libc.src.locale.duplocale
libc.src.locale.freelocale
libc.src.locale.localeconv
libc.src.locale.newlocale
libc.src.locale.setlocale
libc.src.locale.uselocale

# string.h entrypoints
libc.src.string.memccpy
libc.src.string.memchr
Expand Down
1 change: 1 addition & 0 deletions libc/config/baremetal/riscv/headers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(TARGET_PUBLIC_HEADERS
libc.include.fenv
libc.include.float
libc.include.inttypes
libc.include.locale
libc.include.math
libc.include.stdfix
libc.include.stdint
Expand Down

0 comments on commit 63d2a67

Please sign in to comment.