Age | Commit message (Collapse) | Author | Files | Lines |
|
conditional. (#96373)
|
|
baremetal. (#96372)
Downstream build issue reported:
https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8744479865106393873/overview
|
|
We only need to set `--target=` for LLD when cross compiling. This should fix
the host build using BFD or targeting the host.
Fixes: #96342
|
|
|
|
Otherwise the startup objects will fail to link since they were cross compiled,
but the linker is not informed of the intent to cross compile, which results in
linker errors when the host architecture does not match the target
architecture.
|
|
This reverts commit f333fc5c9732a5b64ae0bca09ade6f0036e80c40.
Accidentally pushed, sorry!
|
|
|
|
Function header files for epoll_pwait and epoll_pwait2 have const
modifier on
SigSetPtrType in function signature, but the linux.td file does not
reflect that.
.td file located in libc/spec/linux.td
epoll functions located in libc/src/sys/epoll
|
|
Part of #93566.
|
|
Rather than propgating a compile define, add an explicit cmake flag for
controlling the size. The default for baremetal is 100KB and the default
for others is 1GB.
|
|
|
|
|
|
functions (#95159)
Part of #93566.
|
|
Note: our baremetal arm configuration compiles this as
`--target=arm-none-eabi`, so this code is built in -marm mode. It could be
smaller with `--target=armv7-none-eabi -mthumb`. The assembler is valid ARMv5,
or THUMB2, but not THUMB(1).
|
|
Non-root users may be able to set real-time scheduling policies. Don't
expect failure to set real-time scheduling policies based on UID.
Instead, check that if it fails, it is either due to missing privileges,
or unsupported parameters if the scheduling policy is not mandated by
POSIX.
Fixes #95564.
|
|
Fixes:
llvm-project/libc/src/__support/OSUtil/linux/fcntl.cpp:63:26: error:
implicit conversion loses integer precision: '__off64_t' (aka 'long
long')
to '__off_t' (aka 'long') [-Werror,-Wshorten-64-to-32]
flk->l_start = flk64.l_start;
~ ~~~~~~^~~~~~~
llvm-project/libc/src/__support/OSUtil/linux/fcntl.cpp:64:24: error:
implicit conversion loses integer precision: '__off64_t' (aka 'long
long')
to '__off_t' (aka 'long') [-Werror,-Wshorten-64-to-32]
flk->l_len = flk64.l_len;
~ ~~~~~~^~~~~
We already have an overflow check, just need the cast to be explicit.
This
warning was observed on the 32b ARM build in overlay mode.
|
|
Fixes https://github.com/llvm/llvm-project/issues/95638
The check was `if(unsigned_num >= 0)` which will always be true. The
intent was to check for zero, but the `for` loop inside the `if` was
already doing that.
|
|
|
|
|
|
malloc in overlay mode. (#95845)
This causes an issue in overlay mode:
https://github.com/llvm/llvm-project/pull/95736#issuecomment-2172739705
|
|
Summary:
Not all platforms support this function or header, but it was being
included by every test. Move it inside of the `ifdef` for the only user,
which is aarch64.
|
|
|
|
Fixes #93711 .
This patch implements the ``fdopen`` function. Given that ``fdopen``
internally calls ``fcntl``, the implementation of ``fcntl`` has been
moved to the ``__support/OSUtil``, where it serves as an internal public
function.
|
|
(#95619)
This reverts commit eca988aa4420f33810f9830c80ff9f149b7928ff. The
underlying libc issue was fixed by PR#95576.
The original PR is #95436 , which adds printf, putchar and vprintf in
bareemetal entrypoints
|
|
|
|
Bitfield conversion problem tested at: https://godbolt.org/z/dxjhs5Ghr
|
|
|
|
|
|
Add the LIBC_INLINE annotation to all the functions in blockstore.
|
|
The putchar header was including the public stdio.h. It doesn't need to
do that and it was causing build failures for downstream baremetal users
so this patch fixes it.
|
|
This refactors some of the FreeListHeap, FreeList, and Block classes to
have constexpr ctors so we can constinit a global allocator that does
not require running some global function or global ctor to initialize.
This is needed to prevent worrying about initialization order and any
other module-ctor can invoke malloc without worry.
|
|
This reverts commit b1de42a81d838bb0c6dea7d2436820a2456c730b, which
breaks libc build for baremetal targets.
|
|
Issue: NamedType<"fenv_t"> and NamedType<"fexcept_t"> were used in Fenv
HeaderSpec Types section instead of the actual NamedType
Fixed: Changed to FEnvT and FExceptT
|
|
Part of #93566.
|
|
We now have baremetal implementations of these entrypoints.
|
|
This is similar to baremetal printf that was implemented in #94078.
|
|
Reverts llvm/llvm-project#95419 and Reland #95358.
This PR is full of temporal fixes. After a discussion with @lntue, it is
better to avoid further changes to the cmake infrastructure for now as a
rework to the cmake utilities will be landed in the future.
|
|
Some of the freelist code uses type punning which is UB in C++, namely
because we read from a union member that is not the active union member.
|
|
See Buildbot failures:
- https://lab.llvm.org/buildbot/#/builders/78/builds/13
- https://lab.llvm.org/buildbot/#/builders/182/builds/7
|
|
|
|
Part of #95250.
|
|
|
|
|
|
This is the actual freelist allocator which utilizes the generic
FreeList and the Block classes. We will eventually wrap the malloc
interface around this.
This is a part of #94270 to land in smaller patches.
|
|
|
|
|
|
Summary:
Currently we use `(~0U)` for this definition, however the ~ operator
returns a different sign, meaning that preprocessor checks against this
value will fail. See https://godbolt.org/z/TrjaY1d8q where the
preprocessor thinks that it's not `0xffffffff` while the static
assertion thinks it is. This is because the latter does implicit
conversion but the preprocessor does not. This is now consistent with
other headers.
|
|
In #94685 I discussed my ideas for cleaner baremetal output writing.
This patch is not that. This patch just uses `write_to_stderr` for
outputting from putchar and printf on baremetal. I'm still planning to
create a proper design for writing to stdout and stderr on various
platforms, but that will be a followup patch.
|
|
Part of #93566.
|
|
They were assigned from calls to find_chunk_ptr_for_size which return
size_t now.
|