Bug 1435825

Summary: [LLNL DT Bug] LLVM ABI incompatibility with GCC
Product: DevTools Reporter: Ben Woodard <woodard>
Component: clangAssignee: Tom Stellard <tstellar>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: llvm-toolset-7CC: airlied, jistone, mnewsome, tgummels
Target Milestone: rcKeywords: Tracking, Triaged
Target Release: 2019.4Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-19 04:51:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1576505    

Description Ben Woodard 2017-03-24 22:28:30 UTC
Description of problem:
LLNL has had so many problems with ABI compatibility between compilers that they have resorted to recompiling everything with every single compiler that they support. This leads to a huge amount of additional work for developers, packagers and the support team. 

This is a broad tracking bug to address those issues.

Comment 2 Ben Woodard 2017-03-24 22:30:31 UTC
For example we have:
https://bugs.llvm.org//show_bug.cgi?id=23034 which is probably a manifestation of https://bugs.llvm.org//show_bug.cgi?id=19668

When we were trying to look at that we found: https://sourceware.org/bugzilla/show_bug.cgi?id=21296 which is arguably 3 problems. We’ve already gotten the crash fixed. 

The deeper question is why didn’t libabigail pick it up the fact that clang doesn’t follow the correct the calling convention. Evidently calling convetion is one of those things which is assumed in DWARF and ELF and when a compiler doesn’t follow the calling convention, it is very hard to detect. We have a feature request for it:
https://sourceware.org/bugzilla/show_bug.cgi?id=19949 but it is something that is hard to do. One of the ideas is to use the location of parameters as enumerated in the DWARF to infer the calling convention by side effect. However, even GCC doesn’t quite get that right. 
https://sourceware.org/bugzilla/show_bug.cgi?id=13420 Shockingly the quality of the DWARF is better with -O >=2. That is something that you should make note of. In the mean time, we’re working on improving it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51358