public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gcc] rhel-f41-base: during %%check perform tests whether annobin is usable with the newly built
Date: Mon, 29 Jun 2026 12:28:51 GMT	[thread overview]
Message-ID: <178273613134.1.18213133489064394849.rpms-gcc-eed69448a1b4@fedoraproject.org> (raw)

            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,

                 reply	other threads:[~2026-06-29 12:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178273613134.1.18213133489064394849.rpms-gcc-eed69448a1b4@fedoraproject.org \
    --to=jakub@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox