From d9f0c8b5dacf91bbf64f55b90d18687a8fe03d7a Mon Sep 17 00:00:00 2001 From: zhengshuxin Date: Mon, 11 Apr 2022 19:09:39 +0800 Subject: [PATCH] remove some compiling options for MacOS --- Makefile | 2 +- app/Makefile.in | 2 +- app/gson/Makefile.in | 2 +- app/gson/demo/Makefile.in | 2 +- app/gson/test/Makefile.in | 2 +- app/master/daemon/Makefile.in | 2 +- app/master/tools/lib_global/Makefile | 2 +- app/master/tools/lib_global/test/Makefile.in | 2 +- app/master/tools/master_ctl/Makefile.in | 2 +- app/master/tools/master_ctld/Makefile.in | 2 +- .../tools/master_dispatch/www/Makefile.in | 2 +- app/master/tools/master_guard/Makefile.in | 2 +- app/master/tools/master_monitor/Makefile.in | 2 +- app/master/tools/service_guard/Makefile.in | 2 +- app/redis_tools/redis_builder/Makefile.in | 2 +- app/wizard/tmpl/Makefile.in | 2 +- app/wizard/tmpl/Makefile_fiber.in | 2 +- app/wizard_demo/fiber_chat/Makefile.in | 2 +- app/wizard_demo/ht/Makefile.in | 2 +- app/wizard_demo/httpd_download/Makefile.in | 2 +- app/wizard_demo/httpd_fiber_upload/Makefile.in | 2 +- app/wizard_demo/httpd_proxy/Makefile.in | 2 +- app/wizard_demo/httpd_upload/Makefile.in | 2 +- app/wizard_demo/qrserver/Makefile.in | 2 +- lib_acl/Makefile | 2 +- lib_acl/samples/Makefile.in | 2 +- lib_acl/samples/Makefile_cpp.in | 4 ++-- lib_acl/samples/aio/Makefile.in | 2 +- lib_acl/samples/master/Makefile.in | 2 +- lib_acl/samples/thread/Makefile.in | 2 +- lib_acl/samples/thread/Makefile_cpp.in | 2 +- lib_acl/samples/udp/Makefile.in | 4 ++-- lib_acl/samples/vstream_popen2/Makefile | 2 +- lib_acl/samples/vstream_popen3/Makefile | 2 +- lib_acl/samples/xml/xml5/Makefile_cpp.in | 4 ++-- lib_acl_cpp/Makefile | 2 +- lib_acl_cpp/samples-c++1x/Makefile.in | 2 +- lib_acl_cpp/samples/Makefile.in | 2 +- lib_dict/Makefile | 2 +- lib_dict/test/Makefile.in | 2 +- lib_fiber/c.old/Makefile | 2 +- lib_fiber/c/Makefile | 2 +- lib_fiber/c/src/fiber_io.c | 4 +++- lib_fiber/cpp/Makefile | 2 +- lib_fiber/samples-c++1x/Makefile_cpp.in | 2 +- lib_fiber/samples-c++1x/fiber_connect/main.cpp | 11 +++++++---- lib_fiber/samples-c++1x/fiber_connect/t.sh | 18 ++++++++++++++++++ lib_fiber/samples/Makefile.in | 2 +- lib_fiber/samples/Makefile_cpp.in | 2 +- lib_fiber/samples/chat/Makefile.in | 2 +- lib_fiber/samples/close_another/Makefile.in | 2 +- lib_fiber/samples/test/Makefile.in | 2 +- lib_protocol/Makefile | 2 +- lib_protocol/samples/Makefile.in | 2 +- lib_protocol/samples/Makefile_cpp.in | 2 +- lib_protocol/samples/http/Makefile.in | 2 +- lib_rpc/Makefile | 2 +- lib_tls/Makefile | 2 +- unit_test/Makefile | 2 +- 59 files changed, 87 insertions(+), 64 deletions(-) create mode 100755 lib_fiber/samples-c++1x/fiber_connect/t.sh diff --git a/Makefile b/Makefile index 2a63102df..7be422e70 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 62eec1125..8c86a9b8d 100644 --- a/app/Makefile.in +++ b/app/Makefile.in @@ -27,7 +27,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 5db134bae..31aa47a77 100644 --- a/app/gson/Makefile.in +++ b/app/gson/Makefile.in @@ -27,7 +27,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 c712e4837..92de73ad1 100644 --- a/app/gson/demo/Makefile.in +++ b/app/gson/demo/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 b59fe4a75..9ac27cd49 100644 --- a/app/gson/test/Makefile.in +++ b/app/gson/test/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 6618ceccb..258279718 100644 --- a/app/master/daemon/Makefile.in +++ b/app/master/daemon/Makefile.in @@ -29,7 +29,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 535aaf913..ddaeef122 100644 --- a/app/master/tools/lib_global/Makefile +++ b/app/master/tools/lib_global/Makefile @@ -53,7 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 6d0a3ee11..02d7ce807 100644 --- a/app/master/tools/lib_global/test/Makefile.in +++ b/app/master/tools/lib_global/test/Makefile.in @@ -29,7 +29,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 982dfa071..9b6212f99 100644 --- a/app/master/tools/master_ctl/Makefile.in +++ b/app/master/tools/master_ctl/Makefile.in @@ -65,7 +65,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 9f7eacf37..3d31ff84b 100644 --- a/app/master/tools/master_ctld/Makefile.in +++ b/app/master/tools/master_ctld/Makefile.in @@ -34,7 +34,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 0293d4aa7..ab3c4a356 100644 --- a/app/master/tools/master_dispatch/www/Makefile.in +++ b/app/master/tools/master_dispatch/www/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 9b3798e90..4d1402546 100644 --- a/app/master/tools/master_guard/Makefile.in +++ b/app/master/tools/master_guard/Makefile.in @@ -38,7 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 7985781f2..e4433a0e3 100644 --- a/app/master/tools/master_monitor/Makefile.in +++ b/app/master/tools/master_monitor/Makefile.in @@ -33,7 +33,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 bcdfdc809..d67ef42f1 100644 --- a/app/master/tools/service_guard/Makefile.in +++ b/app/master/tools/service_guard/Makefile.in @@ -38,7 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(OSNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 9adcaf889..9d34c01c8 100644 --- a/app/redis_tools/redis_builder/Makefile.in +++ b/app/redis_tools/redis_builder/Makefile.in @@ -58,7 +58,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 8c778167c..ceebad07a 100644 --- a/app/wizard/tmpl/Makefile.in +++ b/app/wizard/tmpl/Makefile.in @@ -49,7 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 6c1100d5c..2ad6312d8 100644 --- a/app/wizard/tmpl/Makefile_fiber.in +++ b/app/wizard/tmpl/Makefile_fiber.in @@ -53,7 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 6765b3651..7d2bd62a3 100644 --- a/app/wizard_demo/fiber_chat/Makefile.in +++ b/app/wizard_demo/fiber_chat/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 8c778167c..ceebad07a 100644 --- a/app/wizard_demo/ht/Makefile.in +++ b/app/wizard_demo/ht/Makefile.in @@ -49,7 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 088ba8f87..7f608fdbe 100644 --- a/app/wizard_demo/httpd_download/Makefile.in +++ b/app/wizard_demo/httpd_download/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 4b142fc89..ad0653fa7 100644 --- a/app/wizard_demo/httpd_fiber_upload/Makefile.in +++ b/app/wizard_demo/httpd_fiber_upload/Makefile.in @@ -38,7 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 4b142fc89..ad0653fa7 100644 --- a/app/wizard_demo/httpd_proxy/Makefile.in +++ b/app/wizard_demo/httpd_proxy/Makefile.in @@ -38,7 +38,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 92ffbd4cf..03e7ef649 100644 --- a/app/wizard_demo/httpd_upload/Makefile.in +++ b/app/wizard_demo/httpd_upload/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 ab06b819f..63f1fc9da 100644 --- a/app/wizard_demo/qrserver/Makefile.in +++ b/app/wizard_demo/qrserver/Makefile.in @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 948e57d92..1e35d91b5 100644 --- a/lib_acl/Makefile +++ b/lib_acl/Makefile @@ -104,7 +104,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 42db332a2..fa20c42d5 100644 --- a/lib_acl/samples/Makefile.in +++ b/lib_acl/samples/Makefile.in @@ -57,7 +57,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 a7d387c8e..70c28499b 100644 --- a/lib_acl/samples/Makefile_cpp.in +++ b/lib_acl/samples/Makefile_cpp.in @@ -49,7 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX @@ -97,7 +97,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 be6fb7b53..08d41b7ab 100644 --- a/lib_acl/samples/aio/Makefile.in +++ b/lib_acl/samples/aio/Makefile.in @@ -53,7 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 b1d91d21e..602b6308c 100644 --- a/lib_acl/samples/master/Makefile.in +++ b/lib_acl/samples/master/Makefile.in @@ -24,7 +24,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 9ae016cf0..fc2ce5920 100644 --- a/lib_acl/samples/thread/Makefile.in +++ b/lib_acl/samples/thread/Makefile.in @@ -53,7 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 8ef63c015..29bef2a0f 100644 --- a/lib_acl/samples/thread/Makefile_cpp.in +++ b/lib_acl/samples/thread/Makefile_cpp.in @@ -54,7 +54,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 5e664fa11..407a7f8d8 100644 --- a/lib_acl/samples/udp/Makefile.in +++ b/lib_acl/samples/udp/Makefile.in @@ -49,7 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX @@ -97,7 +97,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 ec11cb4b5..9c7d111b0 100644 --- a/lib_acl/samples/vstream_popen2/Makefile +++ b/lib_acl/samples/vstream_popen2/Makefile @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 c9d8ff609..d24ac78c2 100644 --- a/lib_acl/samples/vstream_popen3/Makefile +++ b/lib_acl/samples/vstream_popen3/Makefile @@ -30,7 +30,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 db15276bb..48a9629ef 100644 --- a/lib_acl/samples/xml/xml5/Makefile_cpp.in +++ b/lib_acl/samples/xml/xml5/Makefile_cpp.in @@ -44,7 +44,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX @@ -84,7 +84,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX endif diff --git a/lib_acl_cpp/Makefile b/lib_acl_cpp/Makefile index be208fc3f..da668f854 100644 --- a/lib_acl_cpp/Makefile +++ b/lib_acl_cpp/Makefile @@ -94,7 +94,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 1e7380cde..36a6379f8 100644 --- a/lib_acl_cpp/samples-c++1x/Makefile.in +++ b/lib_acl_cpp/samples-c++1x/Makefile.in @@ -49,7 +49,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 f472bd2b2..7a52ad289 100644 --- a/lib_acl_cpp/samples/Makefile.in +++ b/lib_acl_cpp/samples/Makefile.in @@ -56,7 +56,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 2a5ffec91..a45440c9a 100644 --- a/lib_dict/Makefile +++ b/lib_dict/Makefile @@ -50,7 +50,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 14ba0f142..071e440b3 100644 --- a/lib_dict/test/Makefile.in +++ b/lib_dict/test/Makefile.in @@ -25,7 +25,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 b4817a567..aa3c0e7a5 100644 --- a/lib_fiber/c.old/Makefile +++ b/lib_fiber/c.old/Makefile @@ -73,7 +73,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 aa2337af9..63831da1f 100644 --- a/lib_fiber/c/Makefile +++ b/lib_fiber/c/Makefile @@ -95,7 +95,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof \ -Wno-deprecated-declarations diff --git a/lib_fiber/c/src/fiber_io.c b/lib_fiber/c/src/fiber_io.c index 687505549..ee33a4574 100644 --- a/lib_fiber/c/src/fiber_io.c +++ b/lib_fiber/c/src/fiber_io.c @@ -208,10 +208,12 @@ static void fiber_io_loop(ACL_FIBER *self fiber_unused, void *ctx) * other fiber maybe in the ready queue and wants to * add some IO event. */ - acl_fiber_yield(); + while (acl_fiber_yield() > 0) {} if (ev->fdcount > 0 || ev->waiter > 0) { continue; + } else if (ring_size(&ev->events) > 0) { + continue; } msg_info("%s(%d), tid=%lu: fdcount=0, waiter=%u, events=%d", __FUNCTION__, __LINE__, __pthread_self(), diff --git a/lib_fiber/cpp/Makefile b/lib_fiber/cpp/Makefile index 816ea860e..af72e66b4 100644 --- a/lib_fiber/cpp/Makefile +++ b/lib_fiber/cpp/Makefile @@ -76,7 +76,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 88f944e0a..79ae2eeaf 100644 --- a/lib_fiber/samples-c++1x/Makefile_cpp.in +++ b/lib_fiber/samples-c++1x/Makefile_cpp.in @@ -54,7 +54,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding \ -Wno-invalid-offsetof UNIXTYPE = MACOSX diff --git a/lib_fiber/samples-c++1x/fiber_connect/main.cpp b/lib_fiber/samples-c++1x/fiber_connect/main.cpp index 0cbf7ace0..29d3b282c 100644 --- a/lib_fiber/samples-c++1x/fiber_connect/main.cpp +++ b/lib_fiber/samples-c++1x/fiber_connect/main.cpp @@ -32,10 +32,12 @@ protected: acl::socket_stream conn; printf("%s: begin to connect %s\r\n", __FUNCTION__, addr_.c_str()); + + printf("\r\n"); if (conn.open(addr_, 0, 0)) { - printf("%s: connect %s ok\r\n", __FUNCTION__, addr_.c_str()); + printf(">>> %s: connect %s ok\r\n", __FUNCTION__, addr_.c_str()); } else { - printf("%s: connect %s error %s\r\n", __FUNCTION__, + printf(">>> %s: connect %s error %s\r\n", __FUNCTION__, addr_.c_str(), acl::last_serror()); } @@ -56,10 +58,11 @@ static void fiber_redis(const char* addr, bool use_sem) { acl::socket_stream conn; + printf("\r\n"); if (conn.open(addr, 0, 0)) { - printf("%s: connect %s ok\r\n", __FUNCTION__, addr); + printf(">>> %s: connect %s ok\r\n", __FUNCTION__, addr); } else { - printf("%s: connect %s error %s\r\n", + printf(">>> %s: connect %s error %s\r\n", __FUNCTION__, addr, acl::last_serror()); } diff --git a/lib_fiber/samples-c++1x/fiber_connect/t.sh b/lib_fiber/samples-c++1x/fiber_connect/t.sh new file mode 100755 index 000000000..992905ea1 --- /dev/null +++ b/lib_fiber/samples-c++1x/fiber_connect/t.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +./fiber_connect -s 127.0.0.1:6379 + +echo "" +echo "Enter any key to continue..." +read n +./fiber_connect -s 127.0.0.1:6379 -S + +echo "" +echo "Enter any key to continue..." +read n +./fiber_connect -s 127.0.0.1:637 + +echo "" +echo "Enter any key to continue..." +read n +./fiber_connect -s 127.0.0.1:637 -S diff --git a/lib_fiber/samples/Makefile.in b/lib_fiber/samples/Makefile.in index 9f00509b2..c87030e89 100644 --- a/lib_fiber/samples/Makefile.in +++ b/lib_fiber/samples/Makefile.in @@ -64,7 +64,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 c0eef98e9..db49ec1ed 100644 --- a/lib_fiber/samples/Makefile_cpp.in +++ b/lib_fiber/samples/Makefile_cpp.in @@ -53,7 +53,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 37e32cb2f..e59f326a5 100644 --- a/lib_fiber/samples/chat/Makefile.in +++ b/lib_fiber/samples/chat/Makefile.in @@ -31,7 +31,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 8f13de0cf..4f997685e 100644 --- a/lib_fiber/samples/close_another/Makefile.in +++ b/lib_fiber/samples/close_another/Makefile.in @@ -40,7 +40,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 880ce3dd8..653a4eecd 100644 --- a/lib_fiber/samples/test/Makefile.in +++ b/lib_fiber/samples/test/Makefile.in @@ -52,7 +52,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 750ffdd0d..a68587a44 100644 --- a/lib_protocol/Makefile +++ b/lib_protocol/Makefile @@ -70,7 +70,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 db116006e..021bce674 100644 --- a/lib_protocol/samples/Makefile.in +++ b/lib_protocol/samples/Makefile.in @@ -52,7 +52,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 4afcc0f49..3c9898cda 100644 --- a/lib_protocol/samples/Makefile_cpp.in +++ b/lib_protocol/samples/Makefile_cpp.in @@ -48,7 +48,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 0d63cf17a..8a558add3 100644 --- a/lib_protocol/samples/http/Makefile.in +++ b/lib_protocol/samples/http/Makefile.in @@ -25,7 +25,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 823723923..fce2a45f6 100644 --- a/lib_rpc/Makefile +++ b/lib_rpc/Makefile @@ -44,7 +44,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# 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 4eb3ab6d6..1e82fb9e7 100644 --- a/lib_tls/Makefile +++ b/lib_tls/Makefile @@ -40,7 +40,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX UNIXTYPE = MACOSX endif diff --git a/unit_test/Makefile b/unit_test/Makefile index 403a1a14d..05754f2c1 100644 --- a/unit_test/Makefile +++ b/unit_test/Makefile @@ -45,7 +45,7 @@ endif # For Darwin ifeq ($(findstring Darwin, $(UNIXNAME)), Darwin) - CC += -arch x86_64 -arch arm64 +# CC += -arch x86_64 -arch arm64 CFLAGS += -DMACOSX -Wno-invalid-source-encoding -Wno-invalid-offsetof UNIXTYPE = MACOSX endif