public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gcc] rhel-f41-base: during %%check perform tests whether annobin is usable with the newly built
@ 2026-06-29 12:28 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2026-06-29 12:28 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gcc
            Branch : rhel-f41-base
            Commit : eed69448a1b464a87c168ea90080ba3c70576ea5
            Author : Jakub Jelinek <jakub@redhat.com>
            Date   : 2020-08-12T12:31:55+02:00
            Stats  : +34/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/gcc/c/eed69448a1b464a87c168ea90080ba3c70576ea5?branch=rhel-f41-base

            Log:
            during %%check perform tests whether annobin is usable with the newly built
compiler or whether it might need to be rebuilt

---
diff --git a/gcc.spec b/gcc.spec
index a648fbf..610464e 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1926,8 +1926,39 @@ LC_ALL=C make %{?_smp_mflags} -k check ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=
 %else
      RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
 %endif
+if [ -f %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so ]; then
+  # Test whether current annobin plugin won't fail miserably with the newly built gcc.
+  echo -e '#include <stdio.h>\nint main () { printf ("Hello, world!\\n"); return 0; }' > annobin-test.c
+  echo -e '#include <iostream>\nint main () { std::cout << "Hello, world!" << std::endl; return 0; }' > annobin-test.C
+  `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc` \
+  -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS \
+  -fexceptions -fstack-protector-strong -grecord-gcc-switches -o annobin-test{c,.c} \
+  -Wl,-rpath,%{gcc_target_platform}/libgcc/ \
+  -fplugin=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so \
+  2> ANNOBINOUT1 || echo Annobin test 1 FAIL > ANNOBINOUT2;
+  `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cxx` \
+  `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-includes` \
+  -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS \
+  -fexceptions -fstack-protector-strong -grecord-gcc-switches -o annobin-test{C,.C} \
+  -Wl,-rpath,%{gcc_target_platform}/libgcc/:%{gcc_target_platform}/libstdc++-v3/src/.libs/ \
+  -fplugin=%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so \
+  -B %{gcc_target_platform}/libstdc++-v3/src/.libs/ \
+  2> ANNOBINOUT3 || echo Annobin test 2 FAIL > ANNOBINOUT4;
+  [ -f ./annobin-testc ] || echo Annobin test 1 MISSING > ANNOBINOUT5;
+  [ -f ./annobin-testc ] && \
+  ( ./annobin-testc > ANNOBINRES1 2>&1 || echo Annobin test 1 RUNFAIL > ANNOBINOUT6 );
+  [ -f ./annobin-testC ] || echo Annobin test 2 MISSING > ANNOBINOUT7;
+  [ -f ./annobin-testC ] && \
+  ( ./annobin-testC > ANNOBINRES2 2>&1 || echo Annobin test 2 RUNFAIL > ANNOBINOUT8 );
+  cat ANNOBINOUT[1-8] > ANNOBINOUT
+  touch ANNOBINRES1 ANNOBINRES2
+  [ -s ANNOBINOUT ] && echo Annobin testing FAILed > ANNOBINRES
+  cat ANNOBINOUT ANNOBINRES[12] >> ANNOBINRES
+  rm -f ANNOBINOUT* ANNOBINRES[12] annobin-test{c,C}
+fi
 echo ====================TESTING=========================
 ( LC_ALL=C ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
+[ -f ANNOBINRES ] && cat ANNOBINRES
 echo ====================TESTING END=====================
 mkdir testlogs-%{_target_platform}-%{version}-%{release}
 for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
@@ -3014,6 +3045,9 @@ end
 %endif
 
 %changelog
+- during %%check perform tests whether annobin is usable with the newly built
+  compiler or whether it might need to be rebuilt
+
 * Tue Aug  4 2020 Jakub Jelinek <jakub@redhat.com> 10.2.1-2
 - update from releases/gcc-10 branch
   - PRs c++/95591, c++/95599, c++/95823, c++/95824, c++/95895, c/96377,

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-29 12:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-29 12:28 [rpms/gcc] rhel-f41-base: during %%check perform tests whether annobin is usable with the newly built Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox