瀏覽代碼

* pass suitable sysroot to aarch64-darwin compiler, if none is supplied by SYSROOTPATH
(cherry picked from commit fe06cddbbf179ec6f700e74a9150ea1107c4de34)

# Conflicts:
# utils/fpcm/fpcmake.inc

florian 4 年之前
父節點
當前提交
cc53864fc8
共有 2 個文件被更改,包括 272 次插入235 次删除
  1. 255 235
      utils/fpcm/fpcmake.inc
  2. 17 0
      utils/fpcm/fpcmake.ini

文件差異過大導致無法顯示
+ 255 - 235
utils/fpcm/fpcmake.inc


+ 17 - 0
utils/fpcm/fpcmake.ini

@@ -1416,6 +1416,23 @@ override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
 endif
 endif
 
+ifdef SYSROOTPATH
+override FPCOPT+=-XR$(SYSROOTPATH)
+else
+# if we are compiling natively on aarch64-darwin and if -/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk exists,
+# add it to the compiler command line
+ifeq ($(OS_TARGET),$(OS_SOURCE))
+ifneq ($(findstring $(OS_TARGET),darwin),)
+# so far the only tested one
+ifneq ($(findstring $(CPU_TARGET),aarch64),)
+ifneq ($(wildcard /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk),)
+override FPCOPT+=-XR/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
+endif
+endif
+endif
+endif
+endif
+
 ifdef CREATESHARED
 override FPCOPT+=-Cg
 endif

部分文件因文件數量過多而無法顯示