Commit graph

33306 commits

Author SHA1 Message Date
Daniel Bertalan
4055c393fc Toolchain: Add support for building the userland with the mold linker
This commit adds support for building the SerenityOS userland with the
new [mold linker].

This is not enabled by default yet; to link using mold, run the
`Toolchain/BuildMold.sh` script to build the latest release of mold, and
set the `ENABLE_MOLD_LINKER` CMake variable to ON. This option relies on
toolchain support that has been added just recently, so you might need
to rebuild your toolchain for mold to work.

[mold linker]: https://github.com/rui314/mold
2022-01-24 10:41:47 +00:00
Daniel Bertalan
ad649c48da Toolchain: Backport support for the mold linker
The `-fuse-ld=mold` flag was only added in the not-yet-released GCC 12.

Cherry-picked from the following upstream commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ad964f7eaef9c03ce68a01cfdd7fde9d56524868
2022-01-24 10:41:47 +00:00
Daniel Bertalan
bd3ed700f2 Toolchain+Ports: Use the GNU hash format by default
This hash format offers faster symbol lookup than the System V hash.

We've been using it in all our shared libraries for a long time, but did
not have it enabled by default in our toolchain, so ports couldn't make
use of it.
2022-01-24 10:41:47 +00:00
Daniel Bertalan
5576e9c4c5 Kernel+Toolchain: Use .init_array section for global constructors
Before this change, our dynamic linker's global constructor handler
relied on the GNU linker implicitly including the content of `.ctors`
section inside `.init_array`. The mold linker does not do this, so
global constructors would fail to be called in the mold-built userland.

There is no point in sticking to `.ctors`, as most other systems already
use the superior `.init_array` scheme. This commit changes the kernel
linker script to not discard this new section, and enables it by default
in our toolchain.
2022-01-24 10:41:47 +00:00
Kenneth Myhra
eeb74e2578 mktemp: Port to LibMain 2022-01-24 14:01:58 +03:30
Kenneth Myhra
b4d55f2a55 mkfifo: Port to LibMain 2022-01-24 14:01:58 +03:30
Kenneth Myhra
c10abd6be2 LibCore: Add mkfifo() syscall wrapper 2022-01-24 14:01:58 +03:30
Kenneth Myhra
3af7a5dd61 mknod: Port to LibMain 2022-01-24 14:01:58 +03:30
Kenneth Myhra
9fe1ebebdc LibCore: Add mknod() syscall wrapper 2022-01-24 14:01:58 +03:30
Kenneth Myhra
38472d7e02 LibC: Add POSIX spec link for unistd mknod() API 2022-01-24 14:01:58 +03:30
Sahan Fernando
d6432a3f99 Ports: Enable menu support for half-life port
This partially enables support for menus in half-life. Currently, mouse
input does not work in it, the arrow keys are needed for navigation.
2022-01-24 07:55:39 +00:00
Sahan Fernando
9d97902081 Ports: Add link flags to pkgconfig file installed by fontconfig port 2022-01-24 07:55:39 +00:00
Sahan Fernando
62192c88a6 Ports: Fix freetype port 2022-01-24 07:55:39 +00:00
Xavier Defrang
070d70848f LibCore: Improve handling of parsing errors in FilePermissionsMask 2022-01-24 07:50:32 +00:00
Xavier Defrang
30f58de800 LibCore: Restore support for multiple symbolic classes
Reverts recent change introduced to support implicit symbolic permission
which broke the parser when multiple classes are specified.
The state machine must assume it's dealing with classes until an
operation character is consumed.
2022-01-24 07:50:32 +00:00
electrikmilk
c839ff574a Base: Add Pumpkin (Orange+Purple) theme 2022-01-24 07:03:04 +00:00
Jesse Buhagiar
5b7682b352 Prekernel: Handle synchronous EL1 exceptions in C++ on aarch64
We now have a mechanism to save the current CPU context to the stack,
and then pass that to the C++ common exception handler.
2022-01-24 06:57:59 +00:00
Jesse Buhagiar
547322fb95 Prekernel: Install EL1 vector table at boot on aarch64
We now have a function to install a (currently default) vector
table, meaning that any exceptions (or interrupts for that matter)
will be caught by the processor and routed to one of the vectors
inside the table.
2022-01-24 06:57:59 +00:00
Jesse Buhagiar
28e36a70d6 Prekernel: Implement print_hex UART function on aarch64
This allows us to print a hex number to the serial
terminal.
2022-01-24 06:57:59 +00:00
electrikmilk
7b237e5028 Base: Add Italic, Bold & Latin Extended to Source 2022-01-24 06:53:13 +00:00
Gurkirat Singh
ecf53105b0 Documentation: Replace deprecated osxfuse with macfuse 2022-01-24 05:43:36 +00:00
Michel Hermier
395d9a2702 sort: Port to LibMain 2022-01-24 05:38:30 +00:00
Michel Hermier
176de579f2 shuf: Port to LibMain 2022-01-24 05:38:30 +00:00
Michel Hermier
4e02b204ef rev: Port to LibMain 2022-01-24 05:38:30 +00:00
Rummskartoffel
4eb5fdcfe0 UserspaceEmulator: Support ioctls TCSETSF and TCSETSW 2022-01-24 03:02:35 +00:00
Andrew Kaster
1306fab711 Ports: Update mold port to v1.0.2
Patches regenerated with the new ./package.sh dev mode. It seems to
work as advertised, after a bit of experimentation :^).
2022-01-24 02:53:04 +00:00
Andreas Kling
1b15144e78 LibWeb: Make sure painted CSS borders are snapped to integer pixels
This is a bit of a hack to get box content to stop bleeding 1px outside
the border sometimes. We will need to come up with a more general
solution for this problem eventually.
2022-01-24 02:36:33 +01:00
Andreas Kling
9201f626c1 LibWeb: Use BFC root relative coordinates when flowing around floats
While IFC flows text into a block container, floating objects are
anchored at the BFC root, not necessarily the local block container.

Because of this, we have to use root-relative coordinates when checking
how much space is available in between left and right floated objects.
2022-01-24 02:16:13 +01:00
Andreas Kling
54beb7433e LibWeb: Place block-level boxes vertically before formatting them inside
Block placement is now divided into a vertical and horizontal step. The
vertical step runs before formatting boxes internally. The horizontal
step still runs after (since we may need the final width value.)

This solves a long-standing architectural problem where IFC didn't know
its origin Y position within the BFC root box. This is required for
figuring out how to flow around floating objects. (Floating objects are
always relative to the BFC root.)
2022-01-24 02:09:17 +01:00
Andreas Kling
bb6af641d4 LibWeb: Unify placement of replaced and non-replaced elements in BFC
Seems like we can share the code for these.
2022-01-24 02:09:17 +01:00
Andreas Kling
9a48368280 LibWeb: Simplify code that compute initial child positions in BFC 2022-01-24 02:09:17 +01:00
Andreas Kling
d58f60c953 LibWeb: Unify code for assigning vertical box model metrics in BFC
We were doing the exact same thing for both replaced and non-replaced
elements, so let's share the code. :^)
2022-01-24 02:09:17 +01:00
Andreas Kling
00bd17034d LibWeb: Make IFC aware that its parent is always a BFC
This simplifies some code and allows us to use tighter types for the
parent context everywhere.
2022-01-24 02:09:17 +01:00
Andreas Kling
83a6e698a0 LibWeb: Move rect-in-coordinate-space helper to Layout::Box 2022-01-24 02:09:17 +01:00
Andreas Kling
29589378ff LibWeb: Remove unused InlineFormattingContext::available_width_at_line() 2022-01-24 02:09:17 +01:00
Andreas Kling
6ca90b8d57 LibWeb: Take full border box into account when vertically placing floats 2022-01-24 02:09:17 +01:00
Tom
6565ec59fa DisplaySettings: Show display's manufacturer and size instead of device
Rather than displaying the path of the framebuffer, try and display
the manufacturer name and the size of the display. If no EDID data is
available, fall back to showing the device path.
2022-01-23 22:45:21 +00:00
Tom
869c20b05d Meta+LibEDID: Download and generate the PNP ID database
This downloads the UEFI's published PNP ID database and generates a
lookup table for use in LibEDID. The lookup table isn't optimized at
all, but this can be easily done at a later point if needed.
2022-01-23 22:45:21 +00:00
Tom
ab1075e296 DisplaySettings: Show DPI for selected resolution
This uses the EDID provided by the connected display to show the pixel
density of a selected resolution.
2022-01-23 22:45:21 +00:00
Tom
49c902d581 LibEDID: Add API for conveniently querying EDID from framebuffer device 2022-01-23 22:45:21 +00:00
Tom
03c45b1865 Kernel: Add ioctl to get the EDID from a framebuffer 2022-01-23 22:45:21 +00:00
Tom
8184870f93 LibEDID: Add a library to parse EDID blobs
This library can be used (for the most part) by kernel drivers as well
as user mode. For this reason FixedPoint is used rather than floating
point, but kept to a minimum.
2022-01-23 22:45:21 +00:00
Tom
c468a9cc2d AK: Add FixedPoint cast operator for up/downcasting to other sizes
This enables casting between different size FixedPoint variables or
constructing them from other sized FixedPoint values.
2022-01-23 22:45:21 +00:00
Tom
06fc72ca0c AK: Fix warnings when using FixedPoint with a precision >= 32 bits 2022-01-23 22:45:21 +00:00
Tom
f021baf255 AK: Add Formatter<FixedPoint<...>> without floating point
Rather than casting the FixedPoint to double, format the FixedPoint
directly. This avoids using floating point instruction, which in
turn enables this to be used even in the kernel.
2022-01-23 22:45:21 +00:00
Tom
77b3230c80 AK: Loosen FixedPoint template contraints and forward-declare it
Because AK/Concepts.h includes AK/Forward.h and concepts cannot be
forward declared, slightly losen the FixedPoint template arguments
so that we can forward declare it in AK/Forward.h
2022-01-23 22:45:21 +00:00
Tobias Christiansen
92e337de21 LibGUI: Fix typo in TextEditor 2022-01-23 22:12:05 +00:00
Tobias Christiansen
9a28c8dc74 LibGUI: Fix broken text rendering in TextEditor
This patch reintroduces the translation previously mistakenly removed
when adding support for different underline-styles.

Thanks for reporting the bug, kennethmyhra!
2022-01-23 22:12:05 +00:00
Timothy Flynn
9684ae460c RequestServer: Unveil /etc/timezone for date-time usage 2022-01-23 20:57:01 +00:00
Liav A
fc2c2c8a6d Kernel/Storage: Remove NVMeQueue DMA buffer create method
Instead, try to allocate the DMA buffer before trying to construct the
NVMeQueue. This allows us to fail early if we can't allocate the DMA
buffer before allocating and creating the heavier NVMeQueue object.
2022-01-23 20:56:28 +00:00