diff --git a/cross-aarch64-gcc7.spec b/cross-aarch64-gcc7.spec index 4af4d75..9881f3f 100644 --- a/cross-aarch64-gcc7.spec +++ b/cross-aarch64-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-arm-gcc7.spec b/cross-arm-gcc7.spec index 6799b75..2f77a89 100644 --- a/cross-arm-gcc7.spec +++ b/cross-arm-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-avr-gcc7-bootstrap.spec b/cross-avr-gcc7-bootstrap.spec index 6af3ed9..564928c 100644 --- a/cross-avr-gcc7-bootstrap.spec +++ b/cross-avr-gcc7-bootstrap.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-avr-gcc7.spec b/cross-avr-gcc7.spec index 54b1634..f7dc7fd 100644 --- a/cross-avr-gcc7.spec +++ b/cross-avr-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-epiphany-gcc7-bootstrap.spec b/cross-epiphany-gcc7-bootstrap.spec index dc278c9..41a9a82 100644 --- a/cross-epiphany-gcc7-bootstrap.spec +++ b/cross-epiphany-gcc7-bootstrap.spec @@ -610,9 +610,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -755,9 +757,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-epiphany-gcc7.spec b/cross-epiphany-gcc7.spec index 08f0922..4556227 100644 --- a/cross-epiphany-gcc7.spec +++ b/cross-epiphany-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-hppa-gcc7.spec b/cross-hppa-gcc7.spec index e9d4dbe..e763634 100644 --- a/cross-hppa-gcc7.spec +++ b/cross-hppa-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-i386-gcc7.spec b/cross-i386-gcc7.spec index db2e4ad..b488f3d 100644 --- a/cross-i386-gcc7.spec +++ b/cross-i386-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-m68k-gcc7.spec b/cross-m68k-gcc7.spec index 6fbacab..691970a 100644 --- a/cross-m68k-gcc7.spec +++ b/cross-m68k-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-mips-gcc7.spec b/cross-mips-gcc7.spec index 279a9e2..497e62b 100644 --- a/cross-mips-gcc7.spec +++ b/cross-mips-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-nvptx-gcc7.spec b/cross-nvptx-gcc7.spec index ff41ce0..48a12c8 100644 --- a/cross-nvptx-gcc7.spec +++ b/cross-nvptx-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-ppc64-gcc7.spec b/cross-ppc64-gcc7.spec index be8fda9..beb6b7a 100644 --- a/cross-ppc64-gcc7.spec +++ b/cross-ppc64-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-ppc64le-gcc7.spec b/cross-ppc64le-gcc7.spec index 2d0aa5e..d9ddec8 100644 --- a/cross-ppc64le-gcc7.spec +++ b/cross-ppc64le-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-rx-gcc7-bootstrap.spec b/cross-rx-gcc7-bootstrap.spec index de72530..5b19465 100644 --- a/cross-rx-gcc7-bootstrap.spec +++ b/cross-rx-gcc7-bootstrap.spec @@ -610,9 +610,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -755,9 +757,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-rx-gcc7.spec b/cross-rx-gcc7.spec index 8c904df..ecea5cb 100644 --- a/cross-rx-gcc7.spec +++ b/cross-rx-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-s390x-gcc7.spec b/cross-s390x-gcc7.spec index e5f08f5..f5ecc61 100644 --- a/cross-s390x-gcc7.spec +++ b/cross-s390x-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-sparc-gcc7.spec b/cross-sparc-gcc7.spec index 38dcd27..f99abb5 100644 --- a/cross-sparc-gcc7.spec +++ b/cross-sparc-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-sparc64-gcc7.spec b/cross-sparc64-gcc7.spec index 76691a9..183d59f 100644 --- a/cross-sparc64-gcc7.spec +++ b/cross-sparc64-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross-x86_64-gcc7.spec b/cross-x86_64-gcc7.spec index 7373772..d755474 100644 --- a/cross-x86_64-gcc7.spec +++ b/cross-x86_64-gcc7.spec @@ -609,9 +609,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -754,9 +756,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir} diff --git a/cross.spec.in b/cross.spec.in index b856e29..2a2a843 100644 --- a/cross.spec.in +++ b/cross.spec.in @@ -188,9 +188,11 @@ make DESTDIR=$RPM_BUILD_ROOT install-target %if %{build_cp} # So we installed libstdc++ headers into %prefix where they conflict # with other host compilers. Rip out the non-target specific parts -# again. -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs rm -r -find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs rm +# again. Note not all cross targets support libstdc++, so create the +# directory to make things easier. +mkdir -p $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -mindepth 1 -maxdepth 1 -type d -a -not -name %{gcc_target_arch} | xargs -r rm -r +find $RPM_BUILD_ROOT/%_prefix/include/c++/%{gcc_dir_version} -maxdepth 1 -type f | xargs -r rm # And also remove installed pretty printers which conflict in similar ways rm -rf $RPM_BUILD_ROOT/%{_datadir}/gcc%{binsuffix} %endif @@ -333,9 +335,13 @@ fi %{_prefix}/bin/%{gcc_target_arch}-g++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++ %ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++ +%if 0%{!?gcc_libc_bootstrap:1} +%if %{cross_arch} == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1} %{_prefix}/include/c++ %endif %endif +%endif +%endif %dir %{targetlibsubdir} %dir %{_libdir}/gcc/%{gcc_target_arch} %{targetlibsubdir}