dev-libs/openssl cannot be built by clang in thumb mode |
|||||||||||
Issue descriptionllvm doesn't recognize expression in modified immediate in thumb mode: (-triple=armv7a-cros-linux-gnueabihf) .text .syntax unified .thumb .arch armv7-a .L1: sub r3,r3,#.L1-.L2 .L2:
,
Aug 5 2016
,
Aug 5 2016
Kenny uploaded a CL for this here that I still need to get to testing but should do the trick: https://boringssl-review.googlesource.com/c/8893/ I'll try to get that in today.
,
Aug 5 2016
Hrm, or perhaps that's something else? Anyway, I'll land that and we'll see if that resolves things.
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1d2ea802441fd657aed6c2ebdf2e056a2adf27c2 commit 1d2ea802441fd657aed6c2ebdf2e056a2adf27c2 Author: Ting-Yuan Huang <laszio@chromium.org> Date: Thu Jul 21 23:49:49 2016 dev-libs/openssl: always use gcc to build openssl clang's having trouble building openssl with -mthumb. BUG=chromium:630057 TEST=cbuildbot falco-release daisy-release x86-alex-release Change-Id: I7131bee2add182f8c331b5668e33b13362a4f02f Reviewed-on: https://chromium-review.googlesource.com/362516 Commit-Ready: Ting-Yuan Huang <laszio@chromium.org> Tested-by: Ting-Yuan Huang <laszio@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/1d2ea802441fd657aed6c2ebdf2e056a2adf27c2/chromeos/config/env/dev-libs/openssl
,
Aug 19 2016
,
Sep 29 2016
,
Oct 27 2016
,
Apr 21 2017
In openssl upstream, there are workarounds for __APPLE__. For example: #ifdef __APPLE__ adr $tbl,AES_Te+1024 @ Te4 #else sub $tbl,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4 #endif However, it is ugly...
,
Apr 21 2017
,
Apr 21 2017
I believe we've imported most of those. Going by Android, there were still a few files that clang couldn't assemble. Though I haven't tried this for a while.
,
Apr 22 2017
Hi David, This CL cherry-picked the upstream work-arounds and changed __APPLE__ to __clang__. Besides cbuildbot, are there other tests I can try? https://chromium-review.googlesource.com/c/484791/
,
Apr 22 2017
That's a CL for CrOS's system build of OpenSSL. Is that what you meant this bug was about? The component of the bug and the title says this is about BoringSSL, which is used with Chrome, not CrOS. It looks like comment #2 miscategorized this bug and then I got confused with comment #4. You'll need to talk to CrOS folks to answer your question; I and the folks on this component maintain BoringSSL and Chrome's use of it, not CrOS's system OpenSSL.
,
Apr 22 2017
I've been also confused and wondering what's the difference between openssl and boringssl. It's good that these misunderstandings are clarified now. There is no difference wether this is worked-around by gcc or in openssl from toolchain team's perspective. I'm going to check with ARM to see if they can support this syntax; Otherwise we either upstream the workaround to openssl, or leave it with gcc (or gnu as).
,
Apr 23 2017
Yeah, my bad, I got confused and made it worse. :-)
,
Apr 26 2017
It seems that the assembler needs some time to support the syntax. I'll go for the above CL for now. By the way, it's interesting that BoringSSL, which has the assembler syntax that clang doesn't support, doesn't encounter this problem. Perhaps we are not building it in Chrome OS, or not building it in thumb2?
,
Apr 26 2017
BoringSSL turns off the clang assembler in both Chromium and Android. But we also sync OpenSSL assembly from upstream master rather than 1.0.2, so we probably include clang assembler compatibility fixes that dev-libs/openssl does not. (Though, looking at Android, they only need to build two files without the clang assembler. It's possible we're not far off from fixing it? It's unclear. However, the BoringSSL team is absurdly oversubscribed right now and definitely does not have time to look into this right now.)
,
Apr 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/536cff65997375ce174f10d4f03c7000b416b4ac commit 536cff65997375ce174f10d4f03c7000b416b4ac Author: Ting-Yuan Huang <laszio@chromium.org> Date: Sat Apr 29 05:25:41 2017 openssl: use gas as the assembler LLVM's integrated assembler doesn't work with certain thumb2 syntax. See http://bugs.llvm.org/show_bug.cgi?id=28647 for details BUG=chromium:630057 TEST=cbuildbot --hwtest daisy-release kevin-release Change-Id: Ie0f9d94e7a17455e7efa513c662d68b37b4dc89c Reviewed-on: https://chromium-review.googlesource.com/487874 Commit-Ready: Ting-Yuan Huang <laszio@chromium.org> Tested-by: Ting-Yuan Huang <laszio@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> [rename] https://crrev.com/536cff65997375ce174f10d4f03c7000b416b4ac/dev-libs/openssl/openssl-1.0.2j-r1.ebuild [add] https://crrev.com/536cff65997375ce174f10d4f03c7000b416b4ac/dev-libs/openssl/files/openssl-1.0.2-gas.patch [modify] https://crrev.com/536cff65997375ce174f10d4f03c7000b416b4ac/chromeos/config/env/dev-libs/openssl [delete] https://crrev.com/e8fd95a67a7d0dae318693a2d604a0e9601539ea/dev-libs/openssl/files/openssl-1.0.2-clang.patch
,
Jun 5 2017
clang supports this asm syntax in r304702. The workarounds can be removed after we update clang :-) See upstream bug for more details: https://bugs.llvm.org/show_bug.cgi?id=28647
,
Jun 22 2017
Issue 735342 has been merged into this issue.
,
Feb 5 2018
,
Aug 3
This bug has an owner, thus, it's been triaged. Changing status to "assigned". |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by laszio@chromium.org
, Jul 21 2016