Skip to content

是否有必要在顶层xmake.lua中添加add_cxflags("-fPIC")? #289

@wzhy

Description

@wzhy

你在什么场景下需要该功能?

在ARM64架构下的Linux系统中,编译出libtbox.a后在另外一个生成动态库的项目中使用,但未能成功:链接阶段报"relocation R_AARCH64_ADR_PREL_PG_HI21"错误。该项目改为生成可执行文件时(set_kind("shared") -->set_kind("binary") ),就没有此问题。

描述可能的解决方案

在tbox的顶层xmake.lua中add_cxflags("-fPIC")?
也许能解决上面碰到的问题,但尚未验证。

描述你认为的候选方案

无。

其他信息

无。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions