【问题标题】:generate a node-gyp compiled class over 2gb生成超过 2gb 的 node-gyp 编译类
【发布时间】:2013-06-23 18:09:16
【问题描述】:

我正在尝试配置和构建一个链接 ~ 2GB 空间的 c 文件。当我尝试使用 node-gyp 构建此文件时,我收到以下消息:

relocation truncated to fit: R_X86_64_PC32 against `.bss'

在传统的 gcc 编译中,我可以使用 -mcmodel=medium 选项,但我不确定在 node-gyp 最终使用 gcc 编译文件时如何将其传递给它。

有什么想法吗?

【问题讨论】:

    标签: node.js gcc node-gyp


    【解决方案1】:

    所以解决方案非常简单,使用 node-gyp 的 binding.gyp 文件。我只是补充说:

    'cflags': [ '-mcmodel=medium' ]
    

    在我的目标下,它编译正确。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-01
      • 2020-03-13
      • 1970-01-01
      • 2021-02-07
      • 1970-01-01
      • 1970-01-01
      • 2020-12-15
      相关资源
      最近更新 更多