Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compile armv7l binaries for 32-bit Raspberry Pi's #167

Merged
merged 2 commits into from Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/build-and-test-make.yml
Expand Up @@ -33,6 +33,11 @@ jobs:
host: aarch64-linux-gnu
capture_interface: eth0
make: make
- os: ubuntu-20.04
arch: arm
host: arm-linux-gnueabihf
capture_interface: eth0
make: make
- os: macos-11
arch: x86_64
host: x86_64-macos
Expand All @@ -55,10 +60,10 @@ jobs:
# More dependencies for the tests
sudo apt-get install tcpdump nghttp2-server libnss3

- name: Install Ubuntu dependencies (aarch64)
if: matrix.arch == 'aarch64'
- name: Install Ubuntu cross-compile dependencies (${{ matrix.arch }})
if: matrix.os == 'ubuntu-20.04' && matrix.arch != 'x86_64'
run: |
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get install gcc-${{ matrix.host }} g++-${{ matrix.host }}

- name: Install macOS dependencies
if: matrix.os == 'macos-11'
Expand Down Expand Up @@ -177,7 +182,7 @@ jobs:
${{ matrix.make }} firefox-build
${{ matrix.make }} firefox-checkbuild
${{ matrix.make }} firefox-install

- name: Prepare the tests
if: matrix.arch == 'x86_64'
run: |
Expand Down Expand Up @@ -250,4 +255,4 @@ jobs:
with:
files: |
${{ env.release_file_lib }}
${{ env.release_file_bin }}
${{ env.release_file_bin }}
1 change: 1 addition & 0 deletions Makefile.in
Expand Up @@ -225,6 +225,7 @@ else
;; \
*) \
use_64="0"; \
nspr_configure_flags=""; \
;; \
esac

Expand Down
14 changes: 14 additions & 0 deletions chrome/patches/curl-impersonate.patch
Expand Up @@ -2485,3 +2485,17 @@ index 5ff86c7f5..be26f91ea 100644
NV1(CURLOPT_TCP_NODELAY, 1),
NV1(CURLOPT_PROXY_SSL_VERIFYPEER, 1),
NV1(CURLOPT_PROXY_SSL_VERIFYHOST, 1),
diff --git a/lib/easy_lock.h b/lib/easy_lock.h
index 819f50ce8..1f54289ce 100644
--- a/lib/easy_lock.h
+++ b/lib/easy_lock.h
@@ -36,6 +36,9 @@

#elif defined (HAVE_ATOMIC)
#include <stdatomic.h>
+#if defined(HAVE_SCHED_YIELD)
+#include <sched.h>
+#endif

#define curl_simple_lock atomic_bool
#define CURL_SIMPLE_LOCK_INIT false
17 changes: 16 additions & 1 deletion firefox/patches/curl-impersonate.patch
Expand Up @@ -1354,7 +1354,7 @@ index cb162755d..13ee571aa 100644
+
+ case $host_cpu in
+ arm)
+ addlib="$addlib -larmv8_c_lib"
+ addlib="$addlib -larmv8_c_lib -l:libgcm-aes-arm32-neon_c_lib.a"
+ ;;
+ aarch64)
+ addlib="$addlib -larmv8_c_lib -lgcm-aes-aarch64_c_lib"
Expand Down Expand Up @@ -1498,3 +1498,18 @@ index 706f0aac3..0ad94622e 100644
endif

# if unit tests are enabled, build a static library to link them with
diff --git a/lib/easy_lock.h b/lib/easy_lock.h
index 819f50ce8..1f54289ce 100644
--- a/lib/easy_lock.h
+++ b/lib/easy_lock.h
@@ -36,6 +36,9 @@

#elif defined (HAVE_ATOMIC)
#include <stdatomic.h>
+#if defined(HAVE_SCHED_YIELD)
+#include <sched.h>
+#endif

#define curl_simple_lock atomic_bool
#define CURL_SIMPLE_LOCK_INIT false