-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] build failure on arm ELF targets: %progbits must be used instead of @progbits #4385
Comments
I occasionally build Kakoune on a raspberry pi, and never had this issue, so I dont think it reproduces with gcc. I guess we will need to introduce some preprocessor magic in here to fix that unfortunate inconsistency. |
I tried to build with clang in termux on my ARM based phone and did not get any issue, it looks like FreeBSD also uses GNU assembler so I am not sure why you get that issue and if this has been changed in more recent gas release. I would be nice to understand exactly in which circumstances this happens. |
@mawww Is your phone arm64 based? This issue only occurs on 32 bit ARM, not on the 64 bit variant.
LLVM by default uses its own internal assembler. It is possible to force use of an external GNU assembler, but I don't think that would make a difference (I can try if you like). |
I dont have a 32-bit ARM device available unfortunately, so I cannot reproduce/test. I will accept a PR for this but cant do it myself blindly. My preference would be to #define the PROGBITS token accordingly, then use preprocessor string concatenation to insert it (so hopefully just doing As said earlier, happy to merge a PR if you can validate such a change. |
Ok, I'll look into writing a patch for you. |
This patch fixes the issue for me. I will submit it to the FreeBSD ports collection. Feel free to upstream it.
|
mawww/kakoune#4385 PR: 259434 (cherry picked from commit 13c431b)
Version of Kakoune
v2020.09.01
Reproducer
Compile Kakoune on an arm/ELF target with clang (may reproduce with gcc, too). I tried to build the version shipped with the FreeBSD ports.
Outcome
Build failure:
Expectations
Successful build.
Additional information
The main file has a piece of assembly to integrate debugging scripts. The first line expands to something like
which is fine except on ARM where
@
is a comment character and%
must be used instead. Other targets may require characters other than@
, too (see GNU as manual).To fix this, perhaps add a configure test to check if
@
or%
is the right character to use here and insert the right one. Or just hard code the use of%
on ARM for now.The text was updated successfully, but these errors were encountered: