#235 Provide a clang++.cfg
Merged 20 days ago by tuliom. Opened 20 days ago by tuliom.
rpms/ tuliom/clang clang++.cfg  into  rawhide

file modified
+7 -10
@@ -489,10 +489,16 @@ 

  

  %endif

  

+ %if 0%{?fedora} == 38

+ # Install config file

+ mkdir -p %{buildroot}%{_sysconfdir}/%{name}/

+ mv %{SOURCE6} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg

+ %endif

+ 

  # Install config file for clang

  %if %{maj_ver} >=18

  mkdir -p %{buildroot}%{_sysconfdir}/%{name}/

- echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{name}/clang.cfg

+ echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg

  %endif

  

  # Fix permissions of scan-view scripts
@@ -518,12 +524,6 @@ 

  # populated by other packages

  mkdir -p %{buildroot}%{install_prefix}/lib/clang/%{maj_ver}/{bin,include,lib,share}/

  

- %if 0%{?fedora} == 38

- # Install config file

- mkdir -p %{buildroot}%{_sysconfdir}/%{name}/

- mv %{SOURCE6} %{buildroot}%{_sysconfdir}/%{name}/%{_target_platform}.cfg

- %endif

- 

  %check

  %if %{with check}

  # Build test dependencies separately, to prevent invocations of host clang from being affected
@@ -543,7 +543,6 @@ 

  %{install_bindir}/clang++-%{maj_ver}

  %{install_bindir}/clang-cl

  %{install_bindir}/clang-cpp

- %{_sysconfdir}/%{name}/clang.cfg

  %if %{without compat_build}

  %{_mandir}/man1/clang.1.gz

  %{_mandir}/man1/clang++.1.gz
@@ -559,9 +558,7 @@ 

  %files libs

  %{install_prefix}/lib/clang/%{maj_ver}/include/*

  %{install_libdir}/*.so.*

- %if 0%{?fedora} == 38

  %{_sysconfdir}/%{name}/%{_target_platform}.cfg

- %endif

  

  %files devel

  %{install_libdir}/*.so

Let clang++ has the same behavior as clang by providing a symlink
clang++.cfg pointing to clang.cfg.

This should fix https://github.com/fedora-llvm-team/llvm-snapshots/issues/390

Because of that, I'd like to apply this change to upstream-snapshot too.

I think this is fine. We may want to investigate switching to <triple>.cfg so we only need one file. That would also remove a conflict between the x86_64 and i686 package.

I think this is fine. We may want to investigate switching to <triple>.cfg so we only need one file. That would also remove a conflict between the x86_64 and i686 package.

@tstellar Did I misunderstand you? I thought you had said the opposite. I can change it here.

rebased onto 3ff60a0

20 days ago

I modified the patch to use <triple>.cfg instead.

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/1a5925d1702142c58e9c090bb6f27af5

Pull-Request has been merged by tuliom

20 days ago
Metadata