Description of problem: The clang 12.0.0-0.7.rc3.fc35 armv7hl has segmentation fault. On a simple spec file to build with %{build_cflags} flags, ``` cat > test.c <<EOF int main(void) { return 0; } EOF %global toolchain clang clang test.c -o test %{build_cflags} ``` I see the segmentation fault on armv7hl. ``` + clang test.c -o test -O2 -flto -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard clang-12: error: unable to execute command: Segmentation fault (core dumped) clang-12: error: linker command failed due to signal (use -v to see invocation) ``` Version-Release number of selected component (if applicable): clang-12.0.0-0.7.rc3.fc35 How reproducible: I prepared the reproducer here. https://github.com/junaruga/report-clang-12-with-flags-arm32-error Steps to Reproduce: 1. git clone https://github.com/junaruga/report-clang-12-with-flags-arm32-error.git 2. cd report-clang-12-with-flags-arm32-error 3. fedpkg --release rawhide srpm 4. koji build --scratch --nowait rawhide test-1-1.fc35.src.rpm 5. See the result armv7hl https://koji.fedoraproject.org/koji/taskinfo?taskID=64660466 . Actual results: clang-12: error: unable to execute command: Segmentation fault (core dumped) Expected results: The build finishes without error. Additional info: I think adding a simple test to test `%global toolchain clang` + `%{build_cflags}` to %check section in clang.spec could be good to avoid this in the future if `clang.spec` does not have it.
Created attachment 1766803 [details] root.log
Created attachment 1766804 [details] build.log
*** This bug has been marked as a duplicate of bug 1918924 ***
Thanks! I was able to avoid this issue by following this way. https://bugzilla.redhat.com/show_bug.cgi?id=1918924#c3 I checked the ticket 1918924 when I checked clang's current issues at that time. But I misunderstand I already set `%global _lto_cflags %{nil}` for my spec file. So, I thought it might be different issue from the ticket.