Ver Fonte

Meta: Remove i686 target

Liav A há 2 anos atrás
pai
commit
55f17fff36

+ 4 - 8
.github/workflows/cmake.yml

@@ -22,13 +22,9 @@ jobs:
       matrix:
         debug-options: ['ALL_DEBUG', 'NORMAL_DEBUG']
         os: [ubuntu-22.04]
-        arch: ['i686', 'x86_64']
+        arch: ['x86_64']
         # If ccache is broken and you would like to bust the ccache cache on Github Actions, increment this:
         ccache-mark: [0]
-        exclude:
-          # We currently manually disable the ALL_DEBUG build on x86_64 for sake of saving CI time, as it is not our main target right now
-          - debug-options: 'ALL_DEBUG'
-            arch: 'x86_64'
 
     steps:
       # Pull requests can trail behind `master` and can cause breakage if merging before running the CI checks on an updated branch.
@@ -121,8 +117,8 @@ jobs:
       - name: Show ccache stats before build and configure
         run: |
           # We only have 5 GiB of cache available *in total*. Beyond that, GitHub deletes caches.
-          # Currently, we use about 130 MB for the two toolchains (i686 & x86_64), and three ccache caches:
-          # One with ALL_DEBUG (i686) and two with NORMAL_DEBUG (i686 & x86_64).
+          # Currently, we use about 130 MB for the toolchains (x86_64), and 2 ccache caches:
+          # One with ALL_DEBUG (x86_64), and one with NORMAL_DEBUG (x86_64).
           # Therefore, using 1.6 GB or more per cache causes disaster.
           # Building from scratch fills the ccache cache from 0 to about 0.7 GB, and after compression it comes out to
           # about 0.25 GB, so 3 GB (1GB after compression) should be plenty, all while comfortably fitting in the cache.
@@ -231,7 +227,7 @@ jobs:
         run: '[ ! -e debug.log ] || cat debug.log'
 
       - name: Check manpages for completeness
-        if: ${{ matrix.debug-options == 'NORMAL_DEBUG' && matrix.arch == 'i686'}}
+        if: ${{ matrix.debug-options == 'NORMAL_DEBUG' && matrix.arch == 'x86_64'}}
         working-directory: ${{ github.workspace }}/Build/${{ matrix.arch }}
         env:
           # The script already sets the correct SERENITY_RUN and SERENITY_KERNEL_CMDLINE envvars.

+ 1 - 1
.github/workflows/pvs-studio-static-analysis.yml

@@ -9,7 +9,7 @@ jobs:
     name: Static Analysis
     runs-on: ubuntu-22.04
     env:
-      PVS_STUDIO_ANALYSIS_ARCH: i686
+      PVS_STUDIO_ANALYSIS_ARCH: x86_64
     if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master'
     steps:
       - uses: actions/checkout@v3

+ 1 - 1
.github/workflows/sonar-cloud-static-analysis.yml

@@ -13,7 +13,7 @@ jobs:
       # Latest scanner version is tracked on: https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/
       SONAR_SCANNER_VERSION: 4.7.0.2747
       SONAR_SERVER_URL: "https://sonarcloud.io"
-      SONAR_ANALYSIS_ARCH: i686
+      SONAR_ANALYSIS_ARCH: x86_64
     steps:
       - uses: actions/checkout@v3
         with:

+ 1 - 1
Meta/Azure/Caches.yml

@@ -1,6 +1,6 @@
 parameters:
   os: 'Linux'
-  arch: 'i686'
+  arch: 'x86_64'
   toolchain: 'gcc'
   coverage: 'OFF'
   download_cache_path: ''

+ 1 - 1
Meta/Azure/Serenity.yml

@@ -1,5 +1,5 @@
 parameters:
-  arch: 'i686'
+  arch: 'x86_64'
   coverage: 'OFF'
 
 jobs:

+ 1 - 2
Meta/ShellCompletions/zsh/_serenity

@@ -28,8 +28,7 @@ _serenity() {
 
     local targets
     targets=(
-        'i686:Target i686 (default)'
-        'x86_64:Target x86_64'
+        'x86_64:Target x86_64 (default)'
         'aarch64:Target aarch64'
         'lagom:Target host machine'
     )

+ 0 - 5
Meta/build-image-qemu.sh

@@ -32,11 +32,6 @@ fi
 # Prepend the toolchain qemu directory so we pick up QEMU from there
 PATH="$SCRIPT_DIR/../Toolchain/Local/qemu/bin:$PATH"
 
-# Also prepend the i686 toolchain directory because that's where most
-# people will have their QEMU binaries if they built them before the
-# directory was changed to Toolchain/Local/qemu.
-PATH="$SCRIPT_DIR/../Toolchain/Local/i686/bin:$PATH"
-
 # We depend on GNU coreutils du for the --apparent-size extension.
 # GNU coreutils is a build dependency.
 if command -v gdu > /dev/null 2>&1 && gdu --version | grep -q "GNU coreutils"; then

+ 0 - 4
Meta/debug-kernel.sh

@@ -31,10 +31,6 @@ if [ "$SERENITY_ARCH" = "x86_64" ]; then
     gdb_arch=i386:x86-64
     prekernel_image=Prekernel64
     kernel_base=0x2000200000
-elif [ "$SERENITY_ARCH" = "i686" ]; then
-    gdb_arch=i386:intel
-    prekernel_image=Prekernel32
-    kernel_base=0xc0200000
 elif [ "$SERENITY_ARCH" = "aarch64" ]; then
     gdb_arch=aarch64:armv8-r
     prekernel_image=Prekernel

+ 3 - 3
Meta/run.sh

@@ -49,10 +49,10 @@ fi
 # Prepend the toolchain qemu directory so we pick up QEMU from there
 PATH="$SCRIPT_DIR/../Toolchain/Local/qemu/bin:$PATH"
 
-# Also prepend the i686 toolchain directory because that's where most
+# Also prepend the x86_64 toolchain directory because that's where most
 # people will have their QEMU binaries if they built them before the
 # directory was changed to Toolchain/Local/qemu.
-PATH="$SCRIPT_DIR/../Toolchain/Local/i686/bin:$PATH"
+PATH="$SCRIPT_DIR/../Toolchain/Local/x86_64/bin:$PATH"
 
 SERENITY_RUN="${SERENITY_RUN:-$1}"
 
@@ -75,7 +75,7 @@ if [ -z "$SERENITY_QEMU_BIN" ]; then
     elif [ "$SERENITY_ARCH" = "x86_64" ]; then
         SERENITY_QEMU_BIN="${QEMU_BINARY_PREFIX}qemu-system-x86_64${QEMU_BINARY_SUFFIX}"
     else
-        SERENITY_QEMU_BIN="${QEMU_BINARY_PREFIX}qemu-system-i386${QEMU_BINARY_SUFFIX}"
+        die "Please specify a valid CPU architecture."
     fi
 fi
 

+ 8 - 12
Meta/serenity.sh

@@ -7,7 +7,7 @@ print_help() {
     NAME=$(basename "$ARG0")
     cat <<EOF
 Usage: $NAME COMMAND [TARGET] [TOOLCHAIN] [ARGS...]
-  Supported TARGETs: aarch64, i686, x86_64, lagom. Defaults to SERENITY_ARCH, or x86_64 if not set.
+  Supported TARGETs: aarch64, x86_64, lagom. Defaults to SERENITY_ARCH, or x86_64 if not set.
   Supported TOOLCHAINs: GNU, Clang. Defaults to SERENITY_TOOLCHAIN, or GNU if not set.
   Supported COMMANDs:
     build:      Compiles the target binaries, [ARGS...] are passed through to ninja
@@ -46,22 +46,22 @@ Usage: $NAME COMMAND [TARGET] [TOOLCHAIN] [ARGS...]
 
 
   Examples:
-    $NAME run i686 GNU smp=on
+    $NAME run x86_64 GNU smp=on
         Runs the image in QEMU passing "smp=on" to the kernel command line
-    $NAME run i686 GNU 'init=/bin/UserspaceEmulator init_args=/bin/SystemServer'
+    $NAME run x86_64 GNU 'init=/bin/UserspaceEmulator init_args=/bin/SystemServer'
         Runs the image in QEMU, and run the entire system through UserspaceEmulator (not fully supported yet)
     $NAME run
-        Runs the image for the default TARGET i686 in QEMU
+        Runs the image for the default TARGET x86_64 in QEMU
     $NAME run lagom js -A
         Runs the Lagom-built js(1) REPL
     $NAME test lagom
         Runs the unit tests on the build host
-    $NAME kaddr2line i686 0x12345678
+    $NAME kaddr2line x86_64 0x12345678
         Resolves the address 0x12345678 in the Kernel binary
-    $NAME addr2line i686 WindowServer 0x12345678
+    $NAME addr2line x86_64 WindowServer 0x12345678
         Resolves the address 0x12345678 in the WindowServer binary
-    $NAME gdb i686 smp=on -ex 'hb *init'
-        Runs the image for the TARGET i686 in qemu and attaches a gdb session
+    $NAME gdb x86_64 smp=on -ex 'hb *init'
+        Runs the image for the TARGET x86_64 in qemu and attaches a gdb session
         setting a breakpoint at the init() function in the Kernel.
 EOF
 }
@@ -120,10 +120,6 @@ is_valid_target() {
         CMAKE_ARGS+=("-DSERENITY_ARCH=aarch64")
         return 0
     fi
-    if [ "$TARGET" = "i686" ]; then
-        CMAKE_ARGS+=("-DSERENITY_ARCH=i686")
-        return 0
-    fi
     if [ "$TARGET" = "x86_64" ]; then
         CMAKE_ARGS+=("-DSERENITY_ARCH=x86_64")
         return 0

+ 2 - 2
README.md

@@ -1,6 +1,6 @@
 # SerenityOS
 
-Graphical Unix-like operating system for x86 computers.
+Graphical Unix-like operating system for x86-64 computers.
 
 [![GitHub Actions Status](https://github.com/SerenityOS/serenity/workflows/Build,%20lint,%20and%20test/badge.svg)](https://github.com/SerenityOS/serenity/actions?query=workflow%3A"Build%2C%20lint%2C%20and%20test")
 [![Azure DevOps Status](https://dev.azure.com/SerenityOS/SerenityOS/_apis/build/status/CI?branchName=master)](https://dev.azure.com/SerenityOS/SerenityOS/_build/latest?definitionId=1&branchName=master)
@@ -28,7 +28,7 @@ You can watch videos of the system being developed on YouTube:
 
 ## Features
 
-* Modern x86 32-bit and 64-bit kernel with pre-emptive multi-threading
+* Modern x86 64-bit kernel with pre-emptive multi-threading
 * [Browser](Userland/Applications/Browser/) with JavaScript, WebAssembly, and more (check the spec compliance for [JS](https://libjs.dev/test262/), [CSS](https://css.tobyase.de/), and [WASM](https://libjs.dev/wasm/))
 * Security features (hardware protections, limited userland capabilities, W^X memory, `pledge` & `unveil`, (K)ASLR, OOM-resistance, web-content isolation, state-of-the-art TLS algorithms, ...)
 * [System services](Userland/Services/) (WindowServer, LoginServer, AudioServer, WebServer, RequestServer, CrashServer, ...) and modern IPC

+ 1 - 2
Toolchain/BuildClang.sh

@@ -9,7 +9,7 @@ echo "$DIR"
 
 PREFIX="$DIR/Local/clang/"
 BUILD="$DIR/../Build/"
-USERLAND_ARCHS="i686 x86_64"
+USERLAND_ARCHS="x86_64"
 ARCHS="$USERLAND_ARCHS aarch64"
 
 MD5SUM="md5sum"
@@ -286,7 +286,6 @@ pushd "$DIR/Build/clang"
     pushd llvm
         buildstep "llvm/configure" cmake "$DIR/Tarballs/$LLVM_NAME/llvm" \
             -G Ninja \
-            -DSERENITY_i686-pc-serenity_SYSROOT="$BUILD/i686clang/Root" \
             -DSERENITY_x86_64-pc-serenity_SYSROOT="$BUILD/x86_64clang/Root" \
             -DSERENITY_aarch64-pc-serenity_SYSROOT="$BUILD/aarch64clang/Root" \
             -DCMAKE_INSTALL_PREFIX="$PREFIX" \

+ 1 - 1
Toolchain/CMake/LLVMConfig.cmake

@@ -25,7 +25,7 @@ set(LLVM_INSTALL_BINUTILS_SYMLINKS OFF CACHE BOOL "")
 set(CLANG_ENABLE_CLANGD OFF CACHE BOOL "")
 
 set(compiler_flags "-nostdlib -nostdlib++")
-foreach(target i686-pc-serenity;x86_64-pc-serenity;aarch64-pc-serenity)
+foreach(target x86_64-pc-serenity;aarch64-pc-serenity)
     list(APPEND targets "${target}")
 
     set(RUNTIMES_${target}_CMAKE_BUILD_TYPE Release CACHE STRING "")

+ 1 - 1
Toolchain/Patches/gcc/0001-Add-a-gcc-driver-for-SerenityOS.patch

@@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..17551aaa1a07e6c0b7365f9889937512
 +#endif
 +
 +/* Default arguments you want when running your
-+   i686-serenity-gcc/x86_64-serenity-gcc toolchain */
++   x86_64-serenity-gcc toolchain */
 +#undef LIB_SPEC
 +#define LIB_SPEC "-lc" /* link against C standard library */
 +

+ 0 - 13
Toolchain/Patches/llvm/0003-Driver-Add-support-for-SerenityOS.patch

@@ -13,7 +13,6 @@ protection and position-independent code by default.
  clang/lib/Driver/CMakeLists.txt          |   1 +
  clang/lib/Driver/Driver.cpp              |   4 +
  clang/lib/Driver/ToolChain.cpp           |   2 +
- clang/lib/Driver/ToolChains/Arch/X86.cpp |   1 +
  clang/lib/Driver/ToolChains/Serenity.cpp | 336 +++++++++++++++++++++++
  clang/lib/Driver/ToolChains/Serenity.h   |  99 +++++++
  8 files changed, 467 insertions(+)
@@ -127,18 +126,6 @@ index 7a4319ea680f97dde074b21afa2ee6f75c350091..8db07d9dd0754bffeddf00afe365fe7d
    default:
      return getOS();
    }
-diff --git a/clang/lib/Driver/ToolChains/Arch/X86.cpp b/clang/lib/Driver/ToolChains/Arch/X86.cpp
-index cd7c014faa5e0d503adc9f2c30b83b3efbb7e315..004185d28816b8e8bb903612aa053cb883524fc5 100644
---- a/clang/lib/Driver/ToolChains/Arch/X86.cpp
-+++ b/clang/lib/Driver/ToolChains/Arch/X86.cpp
-@@ -113,6 +113,7 @@ std::string x86::getX86TargetCPU(const Driver &D, const ArgList &Args,
-   case llvm::Triple::OpenBSD:
-     return "i586";
-   case llvm::Triple::FreeBSD:
-+  case llvm::Triple::Serenity:
-     return "i686";
-   default:
-     // Fallback to p4.
 diff --git a/clang/lib/Driver/ToolChains/Serenity.cpp b/clang/lib/Driver/ToolChains/Serenity.cpp
 new file mode 100644
 index 0000000000000000000000000000000000000000..4fdf45a19eb2704d00a03e7b2f34f87f63a0a074

+ 0 - 4
azure-pipelines.yml

@@ -33,10 +33,6 @@ stages:
     dependsOn: Toolchain
 
     jobs:
-      - template: Meta/Azure/Serenity.yml
-        parameters:
-          arch: 'i686'
-
       - template: Meta/Azure/Serenity.yml
         parameters:
           arch: 'x86_64'