beremiz

Better LDFLAGS and CFLAGS for win32 an MACOS

2023-05-10, Edouard Tisserant
2b995a4963a4
Parents e0117f4b0ff1
Children a5a6ee271e65
Better LDFLAGS and CFLAGS for win32 an MACOS
--- a/targets/OSX/__init__.py Wed May 10 17:00:04 2023 +0200
+++ b/targets/OSX/__init__.py Wed May 10 17:02:05 2023 +0200
@@ -24,6 +24,7 @@
from ..toolchain_gcc import toolchain_gcc
+import platform
class OSX_target(toolchain_gcc):
@@ -34,7 +35,7 @@
return toolchain_gcc.getBuilderCFLAGS(self) + \
["-fPIC", "-Wno-deprecated-declarations",
"-Wno-implicit-function-declaration", "-Wno-int-conversion",
- "-Wno-parentheses-equality", "-Wno-varargs"]
+ "-Wno-parentheses-equality", "-Wno-varargs", "-arch", platform.machine()]
def getBuilderLDFLAGS(self):
- return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared"]
+ return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-arch", platform.machine()]
--- a/targets/Win32/__init__.py Wed May 10 17:00:04 2023 +0200
+++ b/targets/Win32/__init__.py Wed May 10 17:02:05 2023 +0200
@@ -31,5 +31,9 @@
dlopen_prefix = ""
extension = ".dll"
+ def getBuilderCFLAGS(self):
+ return toolchain_gcc.getBuilderCFLAGS(self) + \
+ ["-Wno-implicit-function-declaration", "-Wno-int-conversion"]
+
def getBuilderLDFLAGS(self):
return toolchain_gcc.getBuilderLDFLAGS(self) + ["-shared", "-lwinmm"]