# HG changeset patch # User Edouard Tisserant # Date 1683730925 -7200 # Node ID 2b995a4963a480abe1f2cb03e00299ac30234916 # Parent e0117f4b0ff14bf5b7b52ec9d724f3bfbb0cb2dc Better LDFLAGS and CFLAGS for win32 an MACOS diff -r e0117f4b0ff1 -r 2b995a4963a4 targets/OSX/__init__.py --- 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()] diff -r e0117f4b0ff1 -r 2b995a4963a4 targets/Win32/__init__.py --- 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"]