Bug 2239619

Summary: Clang adds debug information by default
Product: [Fedora] Fedora Reporter: Guinevere Larsen <blarsen>
Component: clangAssignee: Tulio Magno Quites Machado Filho <tuliom>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: airlied, alekcejk, jchecahi, kkleine, npopov, sbergman, serge.guelton, siddharth.kde, tbaeder, tstellar, tuliom
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: clang-17.0.1-1.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-28 00:20:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Guinevere Larsen 2023-09-19 12:26:58 UTC
When compiling any C code using clang, the compiler will add debug information even when the option `-g` is not given. 

Reproducible: Always

Steps to Reproduce:
1. cat t.cc
int main(){
	return 0;
}
2. clang -c t.cc
3. llvm-dwarfdump t.o
Actual Results:  
llvm-dwarfdump outputs 30 lines' worth of debug information

Expected Results:  
Only 3 lines of boilerplate output, no actual debug information

Comment 1 Tulio Magno Quites Machado Filho 2023-09-19 19:05:11 UTC
A fix and a test have been proposed at:
https://src.fedoraproject.org/rpms/clang/pull-request/215
https://src.fedoraproject.org/tests/clang/pull-request/25

Comment 2 Fedora Update System 2023-09-26 19:11:23 UTC
FEDORA-2023-5080e32ca7 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5080e32ca7

Comment 3 Fedora Update System 2023-09-26 19:58:53 UTC
FEDORA-2023-5080e32ca7 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2023-09-26 20:48:15 UTC
FEDORA-2023-a0cc241787 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a0cc241787

Comment 5 Fedora Update System 2023-09-27 01:26:29 UTC
FEDORA-2023-a0cc241787 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a0cc241787`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a0cc241787

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-09-28 00:20:59 UTC
FEDORA-2023-a0cc241787 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.