From 3ddff50476d7f2a09db7145f0b8c6c72accd30da Mon Sep 17 00:00:00 2001 From: hailang Date: Sun, 10 Apr 2022 15:43:29 +0800 Subject: [PATCH] mac support cross compile --- Makefile | 1 + app/Makefile.in | 1 + app/gson/Makefile.in | 1 + app/gson/demo/Makefile.in | 1 + app/gson/test/Makefile.in | 1 + app/master/daemon/Makefile.in | 1 + app/master/tools/lib_global/Makefile | 1 + app/master/tools/lib_global/test/Makefile.in | 1 + app/master/tools/master_ctl/Makefile.in | 1 + app/master/tools/master_ctld/Makefile.in | 1 + app/master/tools/master_dispatch/www/Makefile.in | 1 + app/master/tools/master_guard/Makefile.in | 1 + app/master/tools/master_monitor/Makefile.in | 1 + app/master/tools/service_guard/Makefile.in | 1 + app/redis_tools/redis_builder/Makefile.in | 1 + app/wizard/tmpl/Makefile.in | 1 + app/wizard/tmpl/Makefile_fiber.in | 1 + app/wizard_demo/fiber_chat/Makefile.in | 1 + app/wizard_demo/ht/Makefile.in | 1 + app/wizard_demo/httpd_download/Makefile.in | 1 + app/wizard_demo/httpd_fiber_upload/Makefile.in | 1 + app/wizard_demo/httpd_proxy/Makefile.in | 1 + app/wizard_demo/httpd_upload/Makefile.in | 1 + app/wizard_demo/qrserver/Makefile.in | 1 + lib_acl/Makefile | 1 + lib_acl/samples/Makefile.in | 1 + lib_acl/samples/Makefile_cpp.in | 2 ++ lib_acl/samples/aio/Makefile.in | 1 + lib_acl/samples/master/Makefile.in | 1 + lib_acl/samples/thread/Makefile.in | 1 + lib_acl/samples/thread/Makefile_cpp.in | 1 + lib_acl/samples/udp/Makefile.in | 2 ++ lib_acl/samples/vstream_popen2/Makefile | 1 + lib_acl/samples/vstream_popen3/Makefile | 1 + lib_acl/samples/xml/xml5/Makefile_cpp.in | 2 ++ lib_acl_cpp/Makefile | 1 + lib_acl_cpp/samples-c++1x/Makefile.in | 1 + lib_acl_cpp/samples/Makefile.in | 1 + lib_dict/Makefile | 3 ++- lib_dict/test/Makefile.in | 1 + lib_fiber/c.old/Makefile | 1 + lib_fiber/c/Makefile | 1 + lib_fiber/cpp/Makefile | 1 + lib_fiber/samples-c++1x/Makefile_cpp.in | 1 + lib_fiber/samples/Makefile.in | 1 + lib_fiber/samples/Makefile_cpp.in | 1 + lib_fiber/samples/chat/Makefile.in | 1 + lib_fiber/samples/close_another/Makefile.in | 1 + lib_fiber/samples/test/Makefile.in | 1 + lib_protocol/Makefile | 1 + lib_protocol/samples/Makefile.in | 1 + lib_protocol/samples/Makefile_cpp.in | 1 + lib_protocol/samples/http/Makefile.in | 1 + lib_rpc/Makefile | 1 + lib_tls/Makefile | 3 ++- unit_test/Makefile | 1 + 56 files changed, 61 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2dc1b6f2f..2a63102df 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 RPATH = macos SYSLIB += -rdynamic -L/usr/lib -liconv LDFLAGS = -dynamiclib -shared diff --git a/app/Makefile.in b/app/Makefile.in index 367606958..62eec1125 100644 --- a/app/Makefile.in +++ b/app/Makefile.in @@ -27,6 +27,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/gson/Makefile.in b/app/gson/Makefile.in index dd8601f4d..5db134bae 100644 --- a/app/gson/Makefile.in +++ b/app/gson/Makefile.in @@ -27,6 +27,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/gson/demo/Makefile.in b/app/gson/demo/Makefile.in index ce96f0197..c712e4837 100644 --- a/app/gson/demo/Makefile.in +++ b/app/gson/demo/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/gson/test/Makefile.in b/app/gson/test/Makefile.in index b412c3095..b59fe4a75 100644 --- a/app/gson/test/Makefile.in +++ b/app/gson/test/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/daemon/Makefile.in b/app/master/daemon/Makefile.in index d0f86a32a..6618ceccb 100644 --- a/app/master/daemon/Makefile.in +++ b/app/master/daemon/Makefile.in @@ -29,6 +29,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/lib_global/Makefile b/app/master/tools/lib_global/Makefile index 9dbc2a616..535aaf913 100644 --- a/app/master/tools/lib_global/Makefile +++ b/app/master/tools/lib_global/Makefile @@ -53,6 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof -fPIC -Werror \ -Wno-unused-private-field diff --git a/app/master/tools/lib_global/test/Makefile.in b/app/master/tools/lib_global/test/Makefile.in index 3e21a55c8..6d0a3ee11 100644 --- a/app/master/tools/lib_global/test/Makefile.in +++ b/app/master/tools/lib_global/test/Makefile.in @@ -29,6 +29,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/master_ctl/Makefile.in b/app/master/tools/master_ctl/Makefile.in index 1f98f3936..982dfa071 100644 --- a/app/master/tools/master_ctl/Makefile.in +++ b/app/master/tools/master_ctl/Makefile.in @@ -65,6 +65,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/master_ctld/Makefile.in b/app/master/tools/master_ctld/Makefile.in index d7f36fa17..9f7eacf37 100644 --- a/app/master/tools/master_ctld/Makefile.in +++ b/app/master/tools/master_ctld/Makefile.in @@ -34,6 +34,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/master_dispatch/www/Makefile.in b/app/master/tools/master_dispatch/www/Makefile.in index b661f0eff..0293d4aa7 100644 --- a/app/master/tools/master_dispatch/www/Makefile.in +++ b/app/master/tools/master_dispatch/www/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/master_guard/Makefile.in b/app/master/tools/master_guard/Makefile.in index 95787f3e3..9b3798e90 100644 --- a/app/master/tools/master_guard/Makefile.in +++ b/app/master/tools/master_guard/Makefile.in @@ -38,6 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/master_monitor/Makefile.in b/app/master/tools/master_monitor/Makefile.in index 585692bb0..7985781f2 100644 --- a/app/master/tools/master_monitor/Makefile.in +++ b/app/master/tools/master_monitor/Makefile.in @@ -33,6 +33,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/master/tools/service_guard/Makefile.in b/app/master/tools/service_guard/Makefile.in index bfd868476..bcdfdc809 100644 --- a/app/master/tools/service_guard/Makefile.in +++ b/app/master/tools/service_guard/Makefile.in @@ -38,6 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/redis_tools/redis_builder/Makefile.in b/app/redis_tools/redis_builder/Makefile.in index bab673eb6..9adcaf889 100644 --- a/app/redis_tools/redis_builder/Makefile.in +++ b/app/redis_tools/redis_builder/Makefile.in @@ -58,6 +58,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard/tmpl/Makefile.in b/app/wizard/tmpl/Makefile.in index 84d4080b1..8c778167c 100644 --- a/app/wizard/tmpl/Makefile.in +++ b/app/wizard/tmpl/Makefile.in @@ -49,6 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard/tmpl/Makefile_fiber.in b/app/wizard/tmpl/Makefile_fiber.in index 73455490e..6c1100d5c 100644 --- a/app/wizard/tmpl/Makefile_fiber.in +++ b/app/wizard/tmpl/Makefile_fiber.in @@ -53,6 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/fiber_chat/Makefile.in b/app/wizard_demo/fiber_chat/Makefile.in index 6d9a9438d..6765b3651 100644 --- a/app/wizard_demo/fiber_chat/Makefile.in +++ b/app/wizard_demo/fiber_chat/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/ht/Makefile.in b/app/wizard_demo/ht/Makefile.in index 84d4080b1..8c778167c 100644 --- a/app/wizard_demo/ht/Makefile.in +++ b/app/wizard_demo/ht/Makefile.in @@ -49,6 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/httpd_download/Makefile.in b/app/wizard_demo/httpd_download/Makefile.in index 27fae01da..088ba8f87 100644 --- a/app/wizard_demo/httpd_download/Makefile.in +++ b/app/wizard_demo/httpd_download/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/httpd_fiber_upload/Makefile.in b/app/wizard_demo/httpd_fiber_upload/Makefile.in index cf44e0e06..4b142fc89 100644 --- a/app/wizard_demo/httpd_fiber_upload/Makefile.in +++ b/app/wizard_demo/httpd_fiber_upload/Makefile.in @@ -38,6 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/httpd_proxy/Makefile.in b/app/wizard_demo/httpd_proxy/Makefile.in index cf44e0e06..4b142fc89 100644 --- a/app/wizard_demo/httpd_proxy/Makefile.in +++ b/app/wizard_demo/httpd_proxy/Makefile.in @@ -38,6 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/httpd_upload/Makefile.in b/app/wizard_demo/httpd_upload/Makefile.in index 9663d66fd..92ffbd4cf 100644 --- a/app/wizard_demo/httpd_upload/Makefile.in +++ b/app/wizard_demo/httpd_upload/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/app/wizard_demo/qrserver/Makefile.in b/app/wizard_demo/qrserver/Makefile.in index 963afb4a7..ab06b819f 100644 --- a/app/wizard_demo/qrserver/Makefile.in +++ b/app/wizard_demo/qrserver/Makefile.in @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_acl/Makefile b/lib_acl/Makefile index dd807e4dc..948e57d92 100644 --- a/lib_acl/Makefile +++ b/lib_acl/Makefile @@ -104,6 +104,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -Wno-invalid-source-encoding \ -Wno-invalid-offsetof \ -ffunction-sections \ diff --git a/lib_acl/samples/Makefile.in b/lib_acl/samples/Makefile.in index f594c9f44..42db332a2 100644 --- a/lib_acl/samples/Makefile.in +++ b/lib_acl/samples/Makefile.in @@ -57,6 +57,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -rdynamic diff --git a/lib_acl/samples/Makefile_cpp.in b/lib_acl/samples/Makefile_cpp.in index dca9a3e0b..a7d387c8e 100644 --- a/lib_acl/samples/Makefile_cpp.in +++ b/lib_acl/samples/Makefile_cpp.in @@ -49,6 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX @@ -96,6 +97,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl/samples/aio/Makefile.in b/lib_acl/samples/aio/Makefile.in index a86ec59cb..be6fb7b53 100644 --- a/lib_acl/samples/aio/Makefile.in +++ b/lib_acl/samples/aio/Makefile.in @@ -53,6 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl/samples/master/Makefile.in b/lib_acl/samples/master/Makefile.in index c8b1fe279..b1d91d21e 100644 --- a/lib_acl/samples/master/Makefile.in +++ b/lib_acl/samples/master/Makefile.in @@ -24,6 +24,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl/samples/thread/Makefile.in b/lib_acl/samples/thread/Makefile.in index 0723f8bbe..9ae016cf0 100644 --- a/lib_acl/samples/thread/Makefile.in +++ b/lib_acl/samples/thread/Makefile.in @@ -53,6 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl/samples/thread/Makefile_cpp.in b/lib_acl/samples/thread/Makefile_cpp.in index 20274caf9..8ef63c015 100644 --- a/lib_acl/samples/thread/Makefile_cpp.in +++ b/lib_acl/samples/thread/Makefile_cpp.in @@ -54,6 +54,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl/samples/udp/Makefile.in b/lib_acl/samples/udp/Makefile.in index 8cc3e7243..5e664fa11 100644 --- a/lib_acl/samples/udp/Makefile.in +++ b/lib_acl/samples/udp/Makefile.in @@ -49,6 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX @@ -96,6 +97,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl/samples/vstream_popen2/Makefile b/lib_acl/samples/vstream_popen2/Makefile index 378bd8af4..ec11cb4b5 100644 --- a/lib_acl/samples/vstream_popen2/Makefile +++ b/lib_acl/samples/vstream_popen2/Makefile @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -D_REENTRANT -pedantic -DMACOSX SYSLIB = -lpthread endif diff --git a/lib_acl/samples/vstream_popen3/Makefile b/lib_acl/samples/vstream_popen3/Makefile index a78a01afc..c9d8ff609 100644 --- a/lib_acl/samples/vstream_popen3/Makefile +++ b/lib_acl/samples/vstream_popen3/Makefile @@ -30,6 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -D_REENTRANT -pedantic -DMACOSX SYSLIB = -lpthread endif diff --git a/lib_acl/samples/xml/xml5/Makefile_cpp.in b/lib_acl/samples/xml/xml5/Makefile_cpp.in index 65031dcbe..db15276bb 100644 --- a/lib_acl/samples/xml/xml5/Makefile_cpp.in +++ b/lib_acl/samples/xml/xml5/Makefile_cpp.in @@ -44,6 +44,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX @@ -83,6 +84,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl_cpp/Makefile b/lib_acl_cpp/Makefile index 484a98c86..be208fc3f 100644 --- a/lib_acl_cpp/Makefile +++ b/lib_acl_cpp/Makefile @@ -94,6 +94,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -Wno-invalid-source-encoding \ -Wno-invalid-offsetof \ -Wno-unused-private-field \ diff --git a/lib_acl_cpp/samples-c++1x/Makefile.in b/lib_acl_cpp/samples-c++1x/Makefile.in index 8c67915a3..1e7380cde 100644 --- a/lib_acl_cpp/samples-c++1x/Makefile.in +++ b/lib_acl_cpp/samples-c++1x/Makefile.in @@ -49,6 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -rdynamic diff --git a/lib_acl_cpp/samples/Makefile.in b/lib_acl_cpp/samples/Makefile.in index a70c89e6d..f472bd2b2 100644 --- a/lib_acl_cpp/samples/Makefile.in +++ b/lib_acl_cpp/samples/Makefile.in @@ -56,6 +56,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -liconv -rdynamic diff --git a/lib_dict/Makefile b/lib_dict/Makefile index da1e6c61d..2a5ffec91 100644 --- a/lib_dict/Makefile +++ b/lib_dict/Makefile @@ -49,7 +49,8 @@ ifeq ($(findstring FreeBSD, $(UNIXNAME)), FreeBSD) endif # For Darwin -ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) +ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX UNIXTYPE = MACOSX endif diff --git a/lib_dict/test/Makefile.in b/lib_dict/test/Makefile.in index d50560d49..14ba0f142 100644 --- a/lib_dict/test/Makefile.in +++ b/lib_dict/test/Makefile.in @@ -25,6 +25,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -D_REENTRANT SYSLIB = -lpthread endif diff --git a/lib_fiber/c.old/Makefile b/lib_fiber/c.old/Makefile index de5ca0ea7..b4817a567 100644 --- a/lib_fiber/c.old/Makefile +++ b/lib_fiber/c.old/Makefile @@ -73,6 +73,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_fiber/c/Makefile b/lib_fiber/c/Makefile index cc2d9c13f..ede1692af 100644 --- a/lib_fiber/c/Makefile +++ b/lib_fiber/c/Makefile @@ -94,6 +94,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof \ -Wno-deprecated-declarations diff --git a/lib_fiber/cpp/Makefile b/lib_fiber/cpp/Makefile index bc5319f62..816ea860e 100644 --- a/lib_fiber/cpp/Makefile +++ b/lib_fiber/cpp/Makefile @@ -76,6 +76,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof \ -Wno-unused-private-field diff --git a/lib_fiber/samples-c++1x/Makefile_cpp.in b/lib_fiber/samples-c++1x/Makefile_cpp.in index 403766677..88f944e0a 100644 --- a/lib_fiber/samples-c++1x/Makefile_cpp.in +++ b/lib_fiber/samples-c++1x/Makefile_cpp.in @@ -54,6 +54,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_fiber/samples/Makefile.in b/lib_fiber/samples/Makefile.in index 1b2703648..9f00509b2 100644 --- a/lib_fiber/samples/Makefile.in +++ b/lib_fiber/samples/Makefile.in @@ -64,6 +64,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -rdynamic diff --git a/lib_fiber/samples/Makefile_cpp.in b/lib_fiber/samples/Makefile_cpp.in index f607a7f2a..c0eef98e9 100644 --- a/lib_fiber/samples/Makefile_cpp.in +++ b/lib_fiber/samples/Makefile_cpp.in @@ -53,6 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_fiber/samples/chat/Makefile.in b/lib_fiber/samples/chat/Makefile.in index def470445..37e32cb2f 100644 --- a/lib_fiber/samples/chat/Makefile.in +++ b/lib_fiber/samples/chat/Makefile.in @@ -31,6 +31,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_fiber/samples/close_another/Makefile.in b/lib_fiber/samples/close_another/Makefile.in index ba8dec605..8f13de0cf 100644 --- a/lib_fiber/samples/close_another/Makefile.in +++ b/lib_fiber/samples/close_another/Makefile.in @@ -40,6 +40,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_fiber/samples/test/Makefile.in b/lib_fiber/samples/test/Makefile.in index a29c0c59a..880ce3dd8 100644 --- a/lib_fiber/samples/test/Makefile.in +++ b/lib_fiber/samples/test/Makefile.in @@ -52,6 +52,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -rdynamic diff --git a/lib_protocol/Makefile b/lib_protocol/Makefile index 856117b32..750ffdd0d 100644 --- a/lib_protocol/Makefile +++ b/lib_protocol/Makefile @@ -70,6 +70,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -Wno-invalid-source-encoding \ -Wno-invalid-offsetof \ -fdata-sections \ diff --git a/lib_protocol/samples/Makefile.in b/lib_protocol/samples/Makefile.in index d65de9d67..db116006e 100644 --- a/lib_protocol/samples/Makefile.in +++ b/lib_protocol/samples/Makefile.in @@ -52,6 +52,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -rdynamic diff --git a/lib_protocol/samples/Makefile_cpp.in b/lib_protocol/samples/Makefile_cpp.in index 422baccac..4afcc0f49 100644 --- a/lib_protocol/samples/Makefile_cpp.in +++ b/lib_protocol/samples/Makefile_cpp.in @@ -48,6 +48,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof SYSLIB += -rdynamic diff --git a/lib_protocol/samples/http/Makefile.in b/lib_protocol/samples/http/Makefile.in index aa2299389..0d63cf17a 100644 --- a/lib_protocol/samples/http/Makefile.in +++ b/lib_protocol/samples/http/Makefile.in @@ -25,6 +25,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -D_REENTRANT -pedantic SYSLIB = -lpthread endif diff --git a/lib_rpc/Makefile b/lib_rpc/Makefile index 1067df0f8..823723923 100644 --- a/lib_rpc/Makefile +++ b/lib_rpc/Makefile @@ -44,6 +44,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding -Wno-invalid-offsetof UNIXTYPE = MACOSX endif diff --git a/lib_tls/Makefile b/lib_tls/Makefile index 1a74573e4..4eb3ab6d6 100644 --- a/lib_tls/Makefile +++ b/lib_tls/Makefile @@ -39,7 +39,8 @@ ifeq ($(findstring FreeBSD, $(UNIXNAME)), FreeBSD) endif # For Darwin -ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) +ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX UNIXTYPE = MACOSX endif diff --git a/unit_test/Makefile b/unit_test/Makefile index cde770349..403a1a14d 100644 --- a/unit_test/Makefile +++ b/unit_test/Makefile @@ -45,6 +45,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) + CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding -Wno-invalid-offsetof UNIXTYPE = MACOSX endif