From b691872c650ab3bf69713c20ffdd6481ef90d37f Mon Sep 17 00:00:00 2001 From: Nathan Shain Date: Wed, 23 Feb 2022 18:10:19 +0200 Subject: [PATCH 1/3] Fix build for m1 --- build.go | 6 ++++-- build_static.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build.go b/build.go index 5fccc021..926ab050 100644 --- a/build.go +++ b/build.go @@ -18,7 +18,9 @@ package openssl // #cgo linux windows pkg-config: libssl libcrypto // #cgo linux CFLAGS: -Wno-deprecated-declarations -// #cgo darwin CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations -// #cgo darwin LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto +// #cgo darwin 386 CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations +// #cgo darwin 386 LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto +// #cgo darwin arm64 CFLAGS: -I/opt/homebrew/opt/openssl@1.1/include -Wno-deprecated-declarations +// #cgo darwin arm64 LDFLAGS: -L/opt/homebrew/opt/openssl@1.1/lib -lssl -lcrypto // #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN import "C" diff --git a/build_static.go b/build_static.go index c84427bc..9e6d8a40 100644 --- a/build_static.go +++ b/build_static.go @@ -18,7 +18,9 @@ package openssl // #cgo linux windows pkg-config: --static libssl libcrypto // #cgo linux CFLAGS: -Wno-deprecated-declarations -// #cgo darwin CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations -// #cgo darwin LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto +// #cgo darwin 386 CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations +// #cgo darwin 386 LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto +// #cgo darwin arm64 CFLAGS: -I/opt/homebrew/opt/openssl@1.1/include -Wno-deprecated-declarations +// #cgo darwin arm64 LDFLAGS: -L/opt/homebrew/opt/openssl@1.1/lib -lssl -lcrypto // #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN import "C" From b87a2b8142e91e799d063c7d27b8ad2c4eb856b5 Mon Sep 17 00:00:00 2001 From: Nathan Shain <96868471+nathan454@users.noreply.github.com> Date: Wed, 30 Nov 2022 18:33:37 +0200 Subject: [PATCH 2/3] Update build.go --- build.go | 1 - 1 file changed, 1 deletion(-) diff --git a/build.go b/build.go index f076af17..f85aec98 100644 --- a/build.go +++ b/build.go @@ -16,7 +16,6 @@ package openssl - // #cgo linux windows freebsd openbsd solaris pkg-config: libssl libcrypto // #cgo linux freebsd openbsd solaris CFLAGS: -Wno-deprecated-declarations // #cgo darwin 386 CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations From a11554e6adfccd3d8965906dc54f3a23f6c05b14 Mon Sep 17 00:00:00 2001 From: Nathan Shain <96868471+nathan454@users.noreply.github.com> Date: Wed, 30 Nov 2022 18:33:46 +0200 Subject: [PATCH 3/3] Update build_static.go --- build_static.go | 1 - 1 file changed, 1 deletion(-) diff --git a/build_static.go b/build_static.go index 9f713aa6..f2c87cc5 100644 --- a/build_static.go +++ b/build_static.go @@ -16,7 +16,6 @@ package openssl - // #cgo linux windows freebsd openbsd solaris pkg-config: --static libssl libcrypto // #cgo linux freebsd openbsd solaris CFLAGS: -Wno-deprecated-declarations // #cgo darwin 386 CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include -Wno-deprecated-declarations