public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 10.2.0/gentoo/
Date: Fri, 19 Mar 2021 08:02:37 +0000 (UTC)	[thread overview]
Message-ID: <1616140882.5600e4343f36e2a4925b09388d3ffe7400143b9f.slyfox@gentoo> (raw)

commit:     5600e4343f36e2a4925b09388d3ffe7400143b9f
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 19 08:01:22 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Mar 19 08:01:22 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=5600e434

10.2.0: port binutils fix for CET detection on i486

Reported-by: Worx
Bug: https://bugs.gentoo.org/777117
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 10.2.0/gentoo/44_all_cet-i486.patch | 109 ++++++++++++++++++++++++++++++++++++
 10.2.0/gentoo/README.history        |   1 +
 2 files changed, 110 insertions(+)

diff --git a/10.2.0/gentoo/44_all_cet-i486.patch b/10.2.0/gentoo/44_all_cet-i486.patch
new file mode 100644
index 0000000..956e439
--- /dev/null
+++ b/10.2.0/gentoo/44_all_cet-i486.patch
@@ -0,0 +1,109 @@
+https://bugs.gentoo.org/777117
+
+From 267a609477624ade477994b24809a72eeb522ff1 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu via Gcc-patches" <gcc-patches@gcc.gnu.org>
+Date: Sun, 14 Feb 2021 09:26:40 -0800
+Subject: [PATCH 2/2] GCC_CET_HOST_FLAGS: Check if host supports multi-byte
+ NOPs
+
+Check if host supports multi-byte NOPs before enabling CET on host.
+
+config/
+
+	PR binutils/27397
+	* cet.m4 (GCC_CET_HOST_FLAGS): Check if host supports multi-byte
+	NOPs.
+
+libiberty/
+
+	PR binutils/27397
+	* configure: Regenerated.
+
+---
+ config/cet.m4       | 19 ++++++++++++++++---
+ libiberty/configure | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+), 3 deletions(-)
+
+--- a/config/cet.m4
++++ b/config/cet.m4
+@@ -130,6 +130,18 @@ fi
+ if test x$may_have_cet = xyes; then
+   if test x$cross_compiling = xno; then
+     AC_TRY_RUN([
++int
++main ()
++{
++  asm ("endbr32");
++  return 0;
++}
++    ],
++    [have_multi_byte_nop=yes],
++    [have_multi_byte_nop=no])
++    have_cet=no
++    if test x$have_multi_byte_nop = xyes; then
++      AC_TRY_RUN([
+ static void
+ foo (void)
+ {
+@@ -155,9 +167,10 @@ main ()
+   bar ();
+   return 0;
+ }
+-    ],
+-    [have_cet=no],
+-    [have_cet=yes])
++      ],
++      [have_cet=no],
++      [have_cet=yes])
++    fi
+     if test x$enable_cet = xno -a x$have_cet = xyes; then
+       AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
+     fi
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -5396,6 +5396,34 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
++int
++main ()
++{
++  asm ("endbr32");
++  return 0;
++}
++
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  have_multi_byte_nop=yes
++else
++  have_multi_byte_nop=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++    have_cet=no
++    if test x$have_multi_byte_nop = xyes; then
++      if test "$cross_compiling" = yes; then :
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "cannot run test program while cross compiling
++See \`config.log' for more details" "$LINENO" 5; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
+ static void
+ foo (void)
+ {
+@@ -5432,6 +5460,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+   conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
++    fi
+     if test x$enable_cet = xno -a x$have_cet = xyes; then
+       as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
+     fi
+-- 
+2.31.0
+

diff --git a/10.2.0/gentoo/README.history b/10.2.0/gentoo/README.history
index f195ae9..f47a108 100644
--- a/10.2.0/gentoo/README.history
+++ b/10.2.0/gentoo/README.history
@@ -1,6 +1,7 @@
 7		TODO
 	+ 42_all_vmat-PR97236.patch
 	+ 43_all_vtv-slibtool.patch
+	+ 44_all_cet-i486.patch
 
 6		29 Dec 2020
 	- 34_all_fundecl-ICE-PR95820.patch


             reply	other threads:[~2021-03-19  8:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  8:02 Sergei Trofimovich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-08 19:36 [gentoo-commits] proj/gcc-patches:master commit in: 10.2.0/gentoo/ Sergei Trofimovich
2021-03-15 22:57 Sergei Trofimovich
2021-03-04 11:02 Sergei Trofimovich
2020-12-29 10:07 Sergei Trofimovich
2020-12-29  9:55 Sergei Trofimovich
2020-12-29  9:55 Sergei Trofimovich
2020-12-01 19:18 Sergei Trofimovich
2020-11-04  7:47 Sergei Trofimovich
2020-10-15 17:32 Sergei Trofimovich
2020-10-02  9:33 Sergei Trofimovich
2020-10-02  9:13 Sergei Trofimovich
2020-09-10 21:38 Sergei Trofimovich
2020-09-03 17:12 Sergei Trofimovich
2020-08-23  9:14 Sergei Trofimovich
2020-08-17 21:26 Sergei Trofimovich
2020-08-13  9:04 Sergei Trofimovich
2020-07-27  6:50 Sergei Trofimovich
2020-07-26 10:35 Sergei Trofimovich
2020-07-23  8:42 Sergei Trofimovich

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=1616140882.5600e4343f36e2a4925b09388d3ffe7400143b9f.slyfox@gentoo \
    --to=slyfox@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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