From 8c9128f36dbe1d7b19c768761ae015788d36efe5 Mon Sep 17 00:00:00 2001 From: Liav A Date: Tue, 4 Oct 2022 03:32:37 +0300 Subject: [PATCH] Documentation: Remove i686 support --- Base/usr/share/man/man1/uname.md | 2 +- Documentation/AdvancedBuildInstructions.md | 43 +++++++++++----------- Documentation/EmacsConfiguration.md | 8 ++-- Documentation/FAQ.md | 4 +- Documentation/NetworkBoot.md | 6 +-- Documentation/QtCreatorConfiguration.md | 12 +++--- Documentation/RunningTests.md | 8 ++-- Documentation/VSCodeConfiguration.md | 1 - 8 files changed, 41 insertions(+), 43 deletions(-) diff --git a/Base/usr/share/man/man1/uname.md b/Base/usr/share/man/man1/uname.md index c1a80f89fa..3048afd294 100644 --- a/Base/usr/share/man/man1/uname.md +++ b/Base/usr/share/man/man1/uname.md @@ -25,7 +25,7 @@ system call. ```sh $ uname -sm -Serenity i686 +Serenity x86_64 ``` ## See also diff --git a/Documentation/AdvancedBuildInstructions.md b/Documentation/AdvancedBuildInstructions.md index 5a127079c1..850fcd0ef6 100644 --- a/Documentation/AdvancedBuildInstructions.md +++ b/Documentation/AdvancedBuildInstructions.md @@ -27,7 +27,7 @@ This will configure your keymap to German (`de`) instead of US English. See [`Ba The `Meta/serenity.sh` script provides an abstraction over the build targets which are made available by CMake. The following build targets cannot be accessed through the script and have to be used directly by changing the current -directory to `Build/i686` and then running `ninja `: +directory to `Build/x86_64` and then running `ninja `: - `ninja limine-image`: Builds a disk image (`limine_disk_image`) with Limine - `ninja grub-image`: Builds a disk image (`grub_disk_image`) with GRUB @@ -64,8 +64,8 @@ There are some optional features that can be enabled during compilation that are - `INCLUDE_WASM_SPEC_TESTS`: downloads and includes the WebAssembly spec testsuite tests. In order to use this option, you will need to install `prettier` and `wabt`. wabt version 1.0.23 or higher is required to pre-process the WebAssembly spec testsuite. - `INCLUDE_FLAC_SPEC_TESTS`: downloads and includes the xiph.org FLAC test suite. - `SERENITY_TOOLCHAIN`: Specifies whether to use the established GNU toolchain, or the experimental Clang-based toolchain for building SerenityOS. See the [Clang-based toolchain](#clang-based-toolchain) section below. -- `SERENITY_ARCH`: Specifies which architecture to build for. Currently supported options are `i686` and `x86_64`. `x86_64` requires a separate toolchain build from `i686`. -- `BUILD_`: builds the specified component, e.g. `BUILD_HEARTS` (note: must be all caps). Check the components.ini file in your build directory for a list of available components. Make sure to run `ninja clean` and `rm -rf Build/i686/Root` after disabling components. These options can be easily configured by using the `ConfigureComponents` utility. See the [Component Configuration](#component-configuration) section below. +- `SERENITY_ARCH`: Specifies which architecture to build for. Currently supported options are `x86_64`. +- `BUILD_`: builds the specified component, e.g. `BUILD_HEARTS` (note: must be all caps). Check the components.ini file in your build directory for a list of available components. Make sure to run `ninja clean` and `rm -rf Build/x86_64/Root` after disabling components. These options can be easily configured by using the `ConfigureComponents` utility. See the [Component Configuration](#component-configuration) section below. - `BUILD_EVERYTHING`: builds all optional components, overrides other `BUILD_` flags when enabled Many parts of the SerenityOS codebase have debug functionality, mostly consisting of additional messages printed to the debug console. This is done via the `_DEBUG` macros, which can be enabled individually at build time. They are listed in [this file](../Meta/CMake/all_the_debug_macros.cmake). @@ -88,7 +88,7 @@ For example, boolean options such as `ENABLE_` or `_DEB ```console # Reconfigure an existing binary directory with process debug enabled -$ cmake -B Build/i686 -DPROCESS_DEBUG=ON +$ cmake -B Build/x86_64 -DPROCESS_DEBUG=ON ``` For more information on how the CMake cache works, see the CMake guide for [Running CMake](https://cmake.org/runningcmake/). Additional context is available in the CMake documentation for @@ -104,9 +104,9 @@ and unifies the approach taken towards different compiler toolchains and archite The recommended way to build and run the system, `./Meta/serenity.sh run`, invokes the SuperBuild equivalently to the commands below: ```console -$ cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-i686 -DSERENITY_ARCH=i686 -DSERENITY_TOOLCHAIN=GNU -$ cmake --build Build/superbuild-i686 -$ ninja -C Build/i686 setup-and-run +$ cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-x86_64 -DSERENITY_ARCH=x86_64 -DSERENITY_TOOLCHAIN=GNU +$ cmake --build Build/superbuild-x86_64 +$ ninja -C Build/x86_64 setup-and-run ``` The CMake configuration of the `superbuild-` directory configures two [ExternalProjects](https://cmake.org/cmake/help/latest/module/ExternalProject.html). @@ -123,18 +123,18 @@ The SuperBuild build steps are roughly equivalent to the following commands: ```console # Generate CMakeToolchain.txt -mkdir -p Build/i686 -cp Toolchain/CMake/GNUToolchain.txt.in Build/i686/CMakeToolchain.txt -sed -i 's/@SERENITY_ARCH@/i686/g' Build/i686/CMakeToolchain.txt -sed -i 's/@SERENITY_SOURCE_DIR@/'"$PWD"'/g' Build/i686/CMakeToolchain.txt -sed -i 's/@SERENITY_BUILD_DIR@/'"$PWD"'\/Build\/i686/g' Build/i686/CMakeToolchain.txt +mkdir -p Build/x86_64 +cp Toolchain/CMake/GNUToolchain.txt.in Build/x86_64/CMakeToolchain.txt +sed -i 's/@SERENITY_ARCH@/x86_64/g' Build/x86_64/CMakeToolchain.txt +sed -i 's/@SERENITY_SOURCE_DIR@/'"$PWD"'/g' Build/x86_64/CMakeToolchain.txt +sed -i 's/@SERENITY_BUILD_DIR@/'"$PWD"'\/Build\/x86_64/g' Build/x86_64/CMakeToolchain.txt # Configure and install Lagom cmake -GNinja -S Meta/Lagom -B Build/lagom -DCMAKE_INSTALL_PREFIX=${PWD}/Build/lagom-install ninja -C Build/lagom install # Configure and install Serenity, pointing it to Lagom's install prefix -cmake -GNinja -B Build/i686 -DCMAKE_PREFIX_PATH=${PWD}/Build/lagom-install -DSERENITY_ARCH=i686 -DCMAKE_TOOLCHAIN_FILE=${PWD}/Build/i686/CMakeToolchain.txt -ninja -C Build/i686 install +cmake -GNinja -B Build/x86_64 -DCMAKE_PREFIX_PATH=${PWD}/Build/lagom-install -DSERENITY_ARCH=x86_64 -DCMAKE_TOOLCHAIN_FILE=${PWD}/Build/x86_64/CMakeToolchain.txt +ninja -C Build/x86_64 install ``` Directing future `ninja` or `cmake --build` invocations to the `superbuild-` directory ensures that any headers or cpp files shared between the @@ -149,12 +149,12 @@ The debug flags might be manipulated after a build per the following commands: ```console # Initial build, generate binary directories for both child builds -$ cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-i686 -DSERENITY_ARCH=i686 -DSERENITY_TOOLCHAIN=GNU -$ cmake --build Build/superbuild-i686 +$ cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-x86_64 -DSERENITY_ARCH=x86_64 -DSERENITY_TOOLCHAIN=GNU +$ cmake --build Build/superbuild-x86_64 # Turn on process debug and don't build the browser for the Serenity build -$ cmake -B Build/i686 -DPROCESS_DEBUG=ON -DBUILD_BROWSER=OFF -$ ninja -C Build/i686 install +$ cmake -B Build/x86_64 -DPROCESS_DEBUG=ON -DBUILD_BROWSER=OFF +$ ninja -C Build/x86_64 install # Build host tests in Lagom build $ cmake -S Meta/Lagom -B Build/lagom -DBUILD_LAGOM=ON @@ -165,7 +165,7 @@ $ ninja -C Build/lagom install For selecting which components of the system to build and install, a helper program, `ConfigureComponents` is available. -It requires `whiptail` as a dependency, which is available on most systems in the `newt` or `libnewt` package. To build and run it, run the following commands from the `Build/i686` directory: +It requires `whiptail` as a dependency, which is available on most systems in the `newt` or `libnewt` package. To build and run it, run the following commands from the `Build/x86_64` directory: ```console $ ninja configure-components ``` @@ -203,8 +203,7 @@ bugs. Code compiled with both of these toolchains works identically in most case can't be built with Clang yet. To build the Clang-based toolchain, run `BuildClang.sh` from the `Toolchain` directory. The script will build a Clang -toolchain that is capable of building applications for the build host and serenity, -for all supported architectures (i686, x86_64 and aarch64). +toolchain that is capable of building applications for the build host and serenity. **Warning:** While the build script is running, your computer may slow down extremely or even lock up for short intervals. This generally happens if you have more CPU cores than free RAM in gigabytes. To fix this, limit the number @@ -221,7 +220,7 @@ of Serenity can enable richer error reporting than the tools that are installed To enable building clangd as part of the clang toolchain, set ``CLANG_ENABLE_CLANGD`` to ON in ``Toolchain/CMake/LLVMConfig.cmake`` before running BuildClang.sh. If you already built the clang toolchain and would like to -enable the custom clangd build, change the CMake cache variable ``CLANG_ENABLE_CLANGD`` to ON in ``Toolchain/Build/clang/llvm`` +enable the custom clangd build, change the CMake cache variable ``CLANG_ENABLE_CLANGD`` to ON in ``Toolchain/Build/clang/llvm`` and re-install with ``cd Toolchain/Build/clang/llvm && cmake ../../../Tarballs/llvm-project-$LLVM_VERSION.src/llvm -DCLANG_ENABLE_CLANGD=ON && ninja install/strip``, where $LLVM_VERSION should be tab-completable in your shell. ## Clang-format updates diff --git a/Documentation/EmacsConfiguration.md b/Documentation/EmacsConfiguration.md index 1abcc882f8..bde565b1d7 100644 --- a/Documentation/EmacsConfiguration.md +++ b/Documentation/EmacsConfiguration.md @@ -9,19 +9,19 @@ can use the following `.clangd` file placed in the project root: ```yaml CompileFlags: - CompilationDatabase: Build/i686 + CompilationDatabase: Build/x86_64 Add: - "-D__serenity__" - "-UNO_TLS" - - "-I/path/to/serenity/Toolchain/Local/i686/i686-pc-serenity/include/c++/12.1.0" - - "-I/path/to/serenity/Toolchain/Local/i686/i686-pc-serenity/include/c++/12.1.0/i686-pc-serenity" + - "-I/path/to/serenity/Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/12.1.0" + - "-I/path/to/serenity/Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/12.1.0/x86_64-pc-serenity" ``` You will need to change `/path/to/serenity` and change `12.1.0` to whatever your GCC toolchain version at the time is. Run cmake (`Meta/serenity.sh run` or similar) at least once for this -to work, as it will generate the `Build/i686/compile_commands.json` +to work, as it will generate the `Build/x86_64/compile_commands.json` that is needed by `clangd`. ### lsp-mode diff --git a/Documentation/FAQ.md b/Documentation/FAQ.md index f06183cf28..e231e84e7d 100644 --- a/Documentation/FAQ.md +++ b/Documentation/FAQ.md @@ -16,9 +16,9 @@ There are no ISO images. This project does not cater to non-technical users. Simple, my friend! Just refer to the [build instructions](BuildInstructions.md). -## Why is the system 32-bit? +## Why is the system 64-bit only? -The system was originally 32-bit only, since that's what Andreas was most familiar with when starting out. Nowadays, there is a 64-bit port as well (Intel/AMD x86\_64) +The system was originally 32-bit only, since that's what Andreas was most familiar with when starting out. Nowadays, we only support 64-bit CPUs (Intel/AMD x86\_64). ## I did a `git pull` and now the build is broken! What do I do? diff --git a/Documentation/NetworkBoot.md b/Documentation/NetworkBoot.md index 9f16dd603b..bce3b9eae5 100644 --- a/Documentation/NetworkBoot.md +++ b/Documentation/NetworkBoot.md @@ -12,11 +12,11 @@ This guide assumes several things: - Bootloaders are located inside `/srv/tftp/boot/` - SerenityOS artifacts are located inside `/srv/tftp/serenity/`: - The prekernel is located at `/srv/tftp/serenity/prekernel` - - You can find it at `Build/i686/Kernel/Prekernel/Prekernel` + - You can find it at `Build/x86_64/Kernel/Prekernel/Prekernel` - The kernel is located at `/srv/tftp/serenity/kernel` - - You can find it at `Build/i686/Kernel/Kernel` + - You can find it at `Build/x86_64/Kernel/Kernel` - The ramdisk is located at `/srv/tftp/serenity/ramdisk` - - You can use the QEMU image at `Build/i686/_disk_image` as a ramdisk + - You can use the QEMU image at `Build/x86_64/_disk_image` as a ramdisk `grub-pc-bin`, which contains the BIOS modules for PXE booting GRUB2, isn't available from the ARM repos of Debian and Ubuntu so if you are using an ARM machine for your TFTP server you will need to extract and copy across the contents of the `/usr/lib/grub/i386-pc/` directory from the x86 package or build the files manually. diff --git a/Documentation/QtCreatorConfiguration.md b/Documentation/QtCreatorConfiguration.md index a627eb9c0b..fd6b75568e 100644 --- a/Documentation/QtCreatorConfiguration.md +++ b/Documentation/QtCreatorConfiguration.md @@ -24,11 +24,11 @@ Userland/Services/ Userland/Libraries/ Userland/Libraries/LibC/ Userland/Libraries/LibSystem/ -Toolchain/Local/i686/i686-pc-serenity/include/c++/12.1.0 -Build/i686/ -Build/i686/Userland/ -Build/i686/Userland/Services/ -Build/i686/Userland/Libraries/ +Toolchain/Local/x86_64/x86_64-pc-serenity/include/c++/12.1.0 +Build/x86_64/ +Build/x86_64/Userland/ +Build/x86_64/Userland/Services/ +Build/x86_64/Userland/Libraries/ AK/ ``` @@ -86,4 +86,4 @@ option "License template:". Click "Browse…", select your file (i.e., ## Compiler Kits You can slightly improve how well Qt interprets the code by adding and setting up an appropriate "compiler kit". -For that you will need to reference the compilers at `Toolchain/Local/i686/bin/i686-pc-serenity-gcc` and `Toolchain/Local/i686/bin/i686-pc-serenity-g++`. +For that you will need to reference the compilers at `Toolchain/Local/x86_64/bin/x86_64-pc-serenity-gcc` and `Toolchain/Local/x86_64/bin/x86_64-pc-serenity-g++`. diff --git a/Documentation/RunningTests.md b/Documentation/RunningTests.md index 18d3e258bc..2ff64d7296 100644 --- a/Documentation/RunningTests.md +++ b/Documentation/RunningTests.md @@ -12,7 +12,7 @@ command used to initialize the build directory. For a full build, pass `-DBUILD_LAGOM=ON` to the CMake command. ```sh -cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-i686 -DBUILD_LAGOM=ON +cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-x86_64 -DBUILD_LAGOM=ON ``` For a Lagom-only build, pass the Lagom directory to CMake. The `BUILD_LAGOM` CMake option is still required. @@ -76,9 +76,9 @@ will run `shutdown -n` after running all the tests. For completeness, a basic on-target test run will need the SerenityOS image built and run via QEMU. ```sh -cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-i686 -cmake --build Build/superbuild-i686 -cd Build/i686 +cmake -GNinja -S Meta/CMake/Superbuild -B Build/superbuild-x86_64 +cmake --build Build/superbuild-x86_64 +cd Build/x86_64 ninja install && ninja image && ninja run ``` diff --git a/Documentation/VSCodeConfiguration.md b/Documentation/VSCodeConfiguration.md index 33d4924dc5..6480290212 100644 --- a/Documentation/VSCodeConfiguration.md +++ b/Documentation/VSCodeConfiguration.md @@ -316,7 +316,6 @@ Note: The Assertion und KUBSan Problem matchers will only run after you have clo "type": "pickString", "default": "x86_64", "options": [ - "i686", "x86_64", "aarch64" ]