[build] Address symbol visibility and DSO builds
Added an `API` macro in `j6/api.h` that expands to mark the given declaration as a default-visible symbol. Also change `format` and `vformat` to non-template functions, and make calls to `main`, `exit`, and the library init functions in `_start` GOT-relative.
This commit is contained in:
@@ -27,7 +27,7 @@ for ext in ("h",):
|
||||
libc = module("libc",
|
||||
kind = "lib",
|
||||
deps = [ "j6" ],
|
||||
output = "libc.a",
|
||||
basename = "libc",
|
||||
include_phase = "late",
|
||||
sources = sources,
|
||||
public_headers = headers,
|
||||
@@ -35,6 +35,7 @@ libc = module("libc",
|
||||
|
||||
libc.variables["ccflags"] = [
|
||||
"${ccflags}",
|
||||
"-fvisibility=default",
|
||||
"-DPRINTF_SUPPORT_DECIMAL_SPECIFIERS=0",
|
||||
"-DPRINTF_SUPPORT_EXPONENTIAL_SPECIFIERS=0",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user