Is crashpad suppoprted for Linux aarch64

104 views
Skip to first unread message

Anurag Agarwal

unread,
Aug 7, 2023, 11:56:06 AM8/7/23
to Crashpad-dev
Hi,

Is crashpad supported for Linux aarch64 and if yes, how do I build it.

Adding target_cpu as either arm64 or aarch64 did not work.

Regards,
Anurag

Mark Mentovai

unread,
Aug 8, 2023, 1:04:25 PM8/8/23
to Anurag Agarwal, Crashpad-dev
linux-arm64 is supported, but we had unintentionally omitted the build configuration to make it buildable. I just fixed that. Update to or past 77c1ad28d489 (including gclient sync) and give it another try.

The correct value for target_cpu is "arm64". I didn’t test a cross build, but I did test an arm64-on-arm64 build and found that it worked properly and passed all tests.

--
You received this message because you are subscribed to the Google Groups "Crashpad-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crashpad-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crashpad-dev/1f775c84-31ef-4131-bf9c-8146bec3e85fn%40chromium.org.

Anurag Agarwal

unread,
Aug 11, 2023, 6:42:07 AM8/11/23
to Mark Mentovai, Crashpad-dev
Hi,

Thanks for replying to this. 

I am trying to build arm64 on arm64. Running into following error:
[1/50] CXX obj/util/linux/util.pac_helper.o
FAILED: obj/util/linux/util.pac_helper.o
clang++ -MMD -MF obj/util/linux/util.pac_helper.o.d -DZLIB_CONST -D_FILE_OFFSET_BITS=64 -DNDEBUG -DCRASHPAD_FLOCK_ALWAYS_SUPPORTED=true -DCRASHPAD_ZLIB_SOURCE_SYSTEM -DCRASHPAD_LSS_SOURCE_EMBEDDED -Igen/third_party/crashpad/crashpad -I../../.. -Igen -I../../../third_party/mini_chromium/mini_chromium -I../../../compat/linux -I../../../compat/non_win  -Wall -Wendif-labels -Werror -Wextra -Wextra-semi -Wheader-hygiene -Wnewline-eof -Wno-missing-field-initializers -Wno-unused-parameter -Wsign-compare -Wstring-conversion -Wvla -fno-exceptions -fno-rtti -fno-strict-aliasing -fobjc-call-cxx-cdtors -fstack-protector-all -fvisibility-inlines-hidden -fvisibility=hidden -fPIC -pthread --target=aarch64-linux-gnu -O3 -fdata-sections -ffunction-sections -Wexit-time-destructors -Wimplicit-fallthrough -std=c++17 -c ../../../util/linux/pac_helper.cc -o obj/util/linux/util.pac_helper.o
../../../util/linux/pac_helper.cc:37:9: error: instruction requires: pa
    asm("xpaclri" : "+r"(x30));
        ^
<inline asm>:1:2: note: instantiated into assembly here
        xpaclri
        ^
1 error generated.


Mark Mentovai

unread,
Aug 11, 2023, 11:09:25 AM8/11/23
to Anurag Agarwal, Crashpad-dev
Is your compiler reasonably current? This shouldn’t happen after LLVM d4e7b000b2eb, which is in Clang 11 (2020-10-12) and later.

mark@arm-and-hammer zsh% cat t.c
long StripPACBits(long address) {
#if 0
    address = ptrauth_strip(address, ptrauth_key_function_pointer);
#elif 1
    // Strip any pointer authentication bits that are assigned to the address.
    register long x30 __asm("x30") = address;
    asm("xpaclri" : "+r"(x30));
    address = x30;
#endif
    return address;
}
mark@arm-and-hammer zsh% clang-10 --target=arm64-linux-gnu -c t.c -o t.o && echo ok  
t.c:7:9: error: instruction requires: pa

    asm("xpaclri" : "+r"(x30));
        ^
<inline asm>:1:2: note: instantiated into assembly here
        xpaclri
        ^
1 error generated.
mark@arm-and-hammer zsh% clang-11 --target=arm64-linux-gnu -c t.c -o t.o && echo ok
ok

Anurag Agarwal

unread,
Aug 12, 2023, 2:23:19 AM8/12/23
to Mark Mentovai, Crashpad-dev
Let me check. I might be on clang10.

Regards,
Anurag
Reply all
Reply to author
Forward
0 new messages