diff --git a/gdb.spec b/gdb.spec index 3ffe066944c3f3a5e3e053ef6ab163605195be5d..73f2e3295ea11862e9bbf44b4a9baaaf6a3220d8 100644 --- a/gdb.spec +++ b/gdb.spec @@ -1,6 +1,6 @@ Name: gdb Version: 11.1 -Release: 6 +Release: 7 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL-1.3 Source: ftp://sourceware.org/pub/gdb/releases/gdb-%{version}.tar.xz @@ -212,6 +212,11 @@ export CFLAGS="$RPM_OPT_FLAGS -DDNF_DEBUGINFO_INSTALL -fPIC" export LDFLAGS="%{?__global_ldflags}" export CXXFLAGS="$CFLAGS" +%if "%toolchain" == "clang" + export CFLAGS="$CFLAGS -Wno-error=mismatched-tags -Wno-error=switch -Wno-unused -Wno-unknown-warning-option" + export CXXFLAGS="$CXXFLAGS -Wno-error=mismatched-tags -Wno-error=switch -Wno-unused -Wno-unknown-warning-option" +%endif + ../configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ @@ -291,12 +296,12 @@ do done %if 0%{?_enable_debug_packages:1} -mkdir -p $RPM_BUILD_ROOT/usr/lib/debug%{_bindir} -cp -p ./gdb/gdb-gdb.py $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}/ -for pyo in "" "-O";do - %{__python3} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))' +mkdir -p $RPM_BUILD_ROOT%{_libdir}/debug%{_bindir} +cp -p ./gdb/gdb-gdb.py $RPM_BUILD_ROOT%{_libdir}/debug%{_bindir}/ +for pyo in "" "-O"; do + %{__python3} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT%{_libdir}/debug%{_bindir}"'", 1, "'"%{_libdir}/debug%{_bindir}"'"))' done -%endif # 0%{?_enable_debug_packages:1} +%endif for i in $(echo bin lib $(basename %{_libdir}) sbin|tr ' ' '\n'|sort -u);do mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load/%{_prefix}/$i @@ -350,6 +355,11 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py %{_bindir}/gstack %{_bindir}/pstack %{_includedir}/gdb +%if 0%{?_enable_debug_packages:1} +%{_libdir}/debug/usr/bin/__pycache__/gdb-gdb.cpython-310.opt-1.pyc +%{_libdir}/debug/usr/bin/__pycache__/gdb-gdb.cpython-310.pyc +%{_libdir}/debug/usr/bin/gdb-gdb.py +%endif %files headless %{_prefix}/libexec/gdb @@ -379,6 +389,9 @@ rm -f $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb/command/backtrace.py %{_infodir}/gdb.info* %changelog +* Fri Nov 17 2023 renyi <977713017@qq.com> - 11.1-7 +- support for building with clang + * Mon Sep 4 2023 Liu Chao - 11.1-6 - correct patch's commit message