-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various arm64 and bootstrap-on-FreeBSD fixes (#427)
* comment out conflicting define * add msgSendv for aarch64 from Zoe * Fix arm64 build after llvm 18.1.3 upgrade Apparently clang 18 has become more strict about using floating point registers in inline assembly when -mgeneral-regs-only is used. This causes sys/arm64/arm64/vfp.c to fail to compile, with "error: instruction requires: fp-armv8", and "error: expected readable system register". To fix it, similar to other files compiled for arm64, disable -mgeneral-regs-only for this particular file. PR: 276104 MFC after: 1 month (cherry picked from commit f4d93b6) * bump to libpng 1.6.43 * disable NEON in libpixman * neon is apparently broken (it's disabled even in upstream ports) * dunno if `-DPIXMAN_TIMERS` is important, but had to turn it off * use MACHINE_ARCH rather than MACHINE in zsh build * skip intel files on arm64 * make sure PATH is set to find bootstrapped python3 * disable some mesa drivers that make linux assumptions * install is called anyway, put the symlinks in there * fix mesa build on arm * don't build docs --------- Co-authored-by: Dimitry Andric <[email protected]>
- Loading branch information
1 parent
4a0a6fe
commit 57fe032
Showing
300 changed files
with
20,928 additions
and
16,106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Frameworks/Foundation/NSObject/platform_linux/msgSendv-aarch64.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.section .text | ||
|
||
.global _objc_msgSendv | ||
|
||
_objc_msgSendv: | ||
// Prologue | ||
stp x29, x30, [sp, #-16]! // Save frame pointer and link register | ||
mov x29, sp // Set up frame pointer | ||
|
||
// Save callee-saved registers | ||
stp x19, x20, [sp, #0] // Save x19 and x20 | ||
stp x21, x22, [sp, #16] // Save x21 and x22 | ||
stp x23, x24, [sp, #32] // Save x23 and x24 | ||
stp x25, x26, [sp, #48] // Save x25 and x26 | ||
stp x27, x28, [sp, #64] // Save x27 and x28 | ||
|
||
// Move the method pointer (selector) into x0 | ||
mov x0, x1 // Assuming the selector is passed in x1 | ||
|
||
// Move the receiver object pointer into x19 | ||
mov x19, x2 // Assuming the receiver object pointer is passed in x2 | ||
|
||
// Call objc_msg_lookup() to get the IMP (method implementation pointer) | ||
bl _objc_msg_lookup | ||
|
||
// Restore callee-saved registers | ||
ldp x19, x20, [sp, #0] // Restore x19 and x20 | ||
ldp x21, x22, [sp, #16] // Restore x21 and x22 | ||
ldp x23, x24, [sp, #32] // Restore x23 and x24 | ||
ldp x25, x26, [sp, #48] // Restore x25 and x26 | ||
ldp x27, x28, [sp, #64] // Restore x27 and x28 | ||
|
||
// Epilogue | ||
ldp x29, x30, [sp], #16 // Restore frame pointer and link register | ||
ret // Return from function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
version: 1.6.x-{build} | ||
|
||
branches: | ||
except: | ||
- /libpng[0-1][0-7]/ | ||
- /v[0-1][.][0-7][.][0-9]+/ | ||
|
||
image: | ||
- Visual Studio 2022 | ||
|
||
shallow_clone: true | ||
|
||
environment: | ||
matrix: | ||
- TOOLCHAIN: vstudio | ||
AUTOMATION: cmake | ||
ARCH: x86 | ||
- TOOLCHAIN: vstudio | ||
AUTOMATION: cmake | ||
ARCH: x64 | ||
- TOOLCHAIN: vstudio | ||
AUTOMATION: cmake | ||
ARCH: arm64 | ||
- TOOLCHAIN: llvm | ||
AUTOMATION: cmake | ||
ARCH: x64 | ||
- TOOLCHAIN: msys2 | ||
AUTOMATION: cmake | ||
ARCH: i686 | ||
- TOOLCHAIN: msys2 | ||
AUTOMATION: cmake | ||
ARCH: x86_64 | ||
- TOOLCHAIN: msys2 | ||
AUTOMATION: configure | ||
ARCH: i686 | ||
- TOOLCHAIN: msys2 | ||
AUTOMATION: configure | ||
ARCH: x86_64 | ||
- TOOLCHAIN: msys2 | ||
AUTOMATION: makefiles | ||
ARCH: i686 | ||
- TOOLCHAIN: msys2 | ||
AUTOMATION: makefiles | ||
ARCH: x86_64 | ||
|
||
install: | ||
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows' | ||
- 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install' | ||
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows' | ||
- 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install' | ||
|
||
before_build: | ||
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022' | ||
- 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake' | ||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x86" set CI_CMAKE_GENERATOR_PLATFORM=Win32' | ||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x64" set CI_CMAKE_GENERATOR_PLATFORM=x64' | ||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_GENERATOR_PLATFORM=ARM64' | ||
- 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0' | ||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja' | ||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake' | ||
- 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang.exe' | ||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" set CI_CMAKE_GENERATOR=Unix Makefiles' | ||
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set PATH=C:\msys64\mingw32\bin;%PATH%' | ||
- 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set PATH=C:\msys64\mingw64\bin;%PATH%' | ||
- 'if "%TOOLCHAIN%"=="msys2" set CI_CC=%ARCH%-w64-mingw32-gcc.exe' | ||
- 'set CI_CMAKE_BUILD_FLAGS=-j2' | ||
- 'set CI_CTEST_FLAGS=-j2' | ||
- 'set CI_MAKE_FLAGS=-j2' | ||
- 'set CI_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std' | ||
|
||
build_script: | ||
- 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' | ||
- 'if "%TOOLCHAIN%"=="llvm" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' | ||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' | ||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="configure" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_configure.sh"' | ||
- 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"' | ||
|
||
cache: | ||
- C:\tools\vcpkg\installed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# https://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.txt] | ||
indent_style = space | ||
|
||
[*.[chS]] | ||
indent_style = space | ||
max_doc_length = 80 | ||
max_line_length = 80 | ||
|
||
[*.dfa] | ||
indent_style = space | ||
max_doc_length = 80 | ||
max_line_length = 80 | ||
|
||
[*.{awk,cmake}] | ||
indent_style = space | ||
max_doc_length = 80 | ||
max_line_length = 100 | ||
|
||
[*.{in,sh}] | ||
indent_style = space | ||
max_doc_length = 100 | ||
max_line_length = 100 | ||
|
||
[{Makefile.in,ltmain.sh}] | ||
indent_style = unset | ||
insert_final_newline = unset | ||
max_doc_length = unset | ||
max_line_length = unset | ||
trim_trailing_whitespace = unset | ||
|
||
[COMMIT_EDITMSG] | ||
indent_style = space | ||
max_doc_length = unset | ||
max_line_length = 72 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Linting libpng | ||
|
||
on: | ||
push: | ||
branches: | ||
- libpng16 | ||
pull_request: | ||
branches: | ||
- libpng16 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Set up the cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/pip.txt') }} | ||
restore-keys: ${{ runner.os }}-pip- | ||
- name: Install yamllint | ||
run: pip install yamllint | ||
- name: Check out the code | ||
uses: actions/checkout@v4 | ||
- name: Run the linting script | ||
run: bash ./ci/ci_lint.sh |
Oops, something went wrong.