--- a/setup.py
+++ b/setup.py
@@ -64,7 +64,7 @@ elif sys.platform == 'darwin': # macOS
     largs.append('-mmacosx-version-min=10.9')

     if arch == 'x64':
-        cargs.append('-m64')
+        pass  # ARM64: removed x86-specific -m64 flag
 elif sys.platform == 'linux':
     cargs.extend(['-w', '-fPIC'])

@@ -68,7 +68,7 @@ elif sys.platform == 'linux':
     cargs.extend(['-w', '-fPIC'])

     if arch == 'x64':
-        cargs.append('-m64')
+        pass  # ARM64: removed x86-specific -m64 flag
     dname_libjpeg = 'libjpeg'

 # end of if-else
