Skip to content

[Clang] Cannot build with pointer authentication (-mbranch-protection flag) #5171

Open
@bgergely0

Description

@bgergely0

I am trying to build the project on an aarch64 Linux machine, and when passing the compiler flag -mbranch-protection=pac-ret, I cannot build, the build process terminates with: clang: error: argument unused during compilation: '-mbranch-protection=pac-ret' [-Werror,-Wunused-command-line-argument]

JerryScript revision

Many versions

Build platform

Ubuntu 22.04.5 LTS (Linux 5.15.0-125-generic aarch64)

Build steps
export CC=clang;
python3 tools/build.py --compile-flag="-mbranch-protection=pac-ret"
Build log
[ 99%] Linking C executable ../bin/jerry
clang: error: argument unused during compilation: '-mbranch-protection=pac-ret' [-Werror,-Wunused-command-line-argument]
gmake[2]: *** [jerry-main/CMakeFiles/jerry.dir/build.make:133: bin/jerry] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:259: jerry-main/CMakeFiles/jerry.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
==============================
Build failed with exit code: 2
==============================

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourtoolsRelated to the tooling scripts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions