浏览代码

SCons: Add "execinfo" option to force linking libexecinfo

Fixes #20035.
Rémi Verschelde 7 年之前
父节点
当前提交
8e4de57e56
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      platform/x11/detect.py

+ 4 - 0
platform/x11/detect.py

@@ -62,6 +62,7 @@ def get_opts():
         EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
         EnumVariable('debug_symbols', 'Add debugging symbols to release builds', 'yes', ('yes', 'no', 'full')),
         BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
         BoolVariable('separate_debug_symbols', 'Create a separate file containing debugging symbols', False),
         BoolVariable('touch', 'Enable touch events', True),
         BoolVariable('touch', 'Enable touch events', True),
+        BoolVariable('execinfo', 'Use libexecinfo on systems where glibc is not available', False),
     ]
     ]
 
 
 
 
@@ -284,6 +285,9 @@ def configure(env):
         env.Append(LIBS=['dl'])
         env.Append(LIBS=['dl'])
 
 
     if (platform.system().find("BSD") >= 0):
     if (platform.system().find("BSD") >= 0):
+        env["execinfo"] = True
+
+    if env["execinfo"]:
         env.Append(LIBS=['execinfo'])
         env.Append(LIBS=['execinfo'])
 
 
     ## Cross-compilation
     ## Cross-compilation