All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xenproject.org
Cc: Olaf Hering <olaf@aepfle.de>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: [PATCH v1] compiler.h: define CONFIG_GCC_VERSION
Date: Fri, 18 Jun 2021 18:42:07 +0200	[thread overview]
Message-ID: <20210618164207.5111-1-olaf@aepfle.de> (raw)

Fixes commit fa5afbbc20ef3577c5338f9d0b24dad45cef59cd,
due to lack of commit 534519f0514f52007d504e0f2eeb714de7b2468d.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 xen/include/xen/compiler.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h
index 85cbd1ab00..e2b7193042 100644
--- a/xen/include/xen/compiler.h
+++ b/xen/include/xen/compiler.h
@@ -99,6 +99,13 @@
     __asm__ ("" : "=r"(__ptr) : "0"(ptr));      \
     (typeof(ptr)) (__ptr + (off)); })
 
+#ifndef CONFIG_GCC_VERSION
+# ifdef __GNUC__
+#  define CONFIG_GCC_VERSION (__GNUC__ * 10000           \
+                              + __GNUC_MINOR__ * 100     \
+                              + __GNUC_PATCHLEVEL__)
+# endif
+#endif
 #if CONFIG_GCC_VERSION >= 110000 /* See gcc bug 100680. */
 # define gcc11_wrap(x) RELOC_HIDE(x, 0)
 #else


             reply	other threads:[~2021-06-18 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 16:42 Olaf Hering [this message]
2021-06-18 16:46 ` [PATCH v1] compiler.h: define CONFIG_GCC_VERSION Andrew Cooper
2021-06-18 16:55   ` Olaf Hering
2021-06-21  7:07     ` Jan Beulich
2021-06-21  7:14 ` [PATCH for-4.13] " Jan Beulich
2021-07-09  6:54 ` [PATCH v1] " Jan Beulich

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=20210618164207.5111-1-olaf@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.