public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: linux-xtensa@linux-xtensa.org,
	Sterling Augustine <augustine.sterling@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>
Subject: [RFC 0/5] xtensa: support dynamic configuration
Date: Mon, 22 May 2017 21:09:00 -0000	[thread overview]
Message-ID: <1495487362-18969-1-git-send-email-jcmvbkbc@gmail.com> (raw)

Hi Sterling,

this is an RFC series that makes xtensa gcc dynamically configurable,
i.e. on a platform with shared library support single toolchain binary
becomes capable of building code for arbitrary xtensa configuration.
At the same time it fully preserves the traditional way of configuring
using xtensa configuration overlay.

Currently xtensa toolchain needs to be patched and rebuilt for every
new xtensa processor configuration. This has a number of downsides:
- toolchain builders need to change the toolchain source code, and
  because xtensa configuration overlay is not a patch, this change is
  special, embedding it into the toolchain build process gets
  backpressure.
- toolchain built for one configuration is usually not usable for any
  other configuration. It's not possible for a distribution to provide
  reusable prebuilt xtensa toolchain.

This series allows building the toolchain (including target libraries)
without its source code modification. Built toolchain takes configuration
parameters from the shared object specified in the environment variable.
That shared object may be built by the following project:

  https://github.com/jcmvbkbc/xtensa-dynconfig

The same shared object is used for gcc, all binutils and for gdb.
Xtensa core specific information needed to build that shared object is
taken from the configuration overlay.

Both gcc and binutils-gdb get new shared header file
include/xtensa-dynconfig.h that provides definition of configuration
data structure, initialization macros, redefines XCHAL_* macros to
access this structure and declares function for loading configuration
dynamically.

Max Filippov (5):
  gcc: xtensa: allow XCHAL_* macros to be non-constant
  gcc: xtensa: make configuration dynamic
  gcc: xtensa: support dynconfig on windows
  gcc: xtensa: add __XCHAL_* builtins
  libgcc: xtensa: use built-in configuration

 gcc/Makefile.in                   |   2 +-
 gcc/config.gcc                    |   1 +
 gcc/config/xtensa/t-xtensa        |   5 +
 gcc/config/xtensa/xtensa-config.c | 139 ++++++++++++++
 gcc/config/xtensa/xtensa-protos.h |   1 +
 gcc/config/xtensa/xtensa.c        |  18 +-
 gcc/config/xtensa/xtensa.h        |  31 ++--
 include/xtensa-config-builtin.h   | 191 +++++++++++++++++++
 include/xtensa-dynconfig.h        | 373 ++++++++++++++++++++++++++++++++++++++
 libgcc/config/xtensa/crti.S       |   2 +-
 libgcc/config/xtensa/crtn.S       |   2 +-
 libgcc/config/xtensa/lib1funcs.S  |   2 +-
 libgcc/config/xtensa/lib2funcs.S  |   2 +-
 13 files changed, 736 insertions(+), 33 deletions(-)
 create mode 100644 gcc/config/xtensa/xtensa-config.c
 create mode 100644 include/xtensa-config-builtin.h
 create mode 100644 include/xtensa-dynconfig.h

-- 
2.1.4

             reply	other threads:[~2017-05-22 21:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-22 21:09 Max Filippov [this message]
2017-05-22 21:09 ` [RFC 3/5] gcc: xtensa: support dynconfig on windows Max Filippov
2017-05-22 21:09 ` [RFC 4/5] gcc: xtensa: add __XCHAL_* builtins Max Filippov
2017-05-22 21:09 ` [RFC 2/5] gcc: xtensa: make configuration dynamic Max Filippov
2017-05-25 18:25   ` augustine.sterling
2017-05-25 20:57     ` Max Filippov
2017-05-26 15:04       ` Ian Lance Taylor via gcc-patches
2017-05-26 18:48         ` Max Filippov
2017-05-22 21:09 ` [RFC 5/5] libgcc: xtensa: use built-in configuration Max Filippov
2017-05-22 21:31 ` [RFC 1/5] gcc: xtensa: allow XCHAL_* macros to be non-constant Max Filippov
2017-05-22 21:49   ` augustine.sterling
2017-05-23  2:19     ` Max Filippov
2017-05-25 18:24   ` augustine.sterling
2017-06-14 17:23     ` Max Filippov

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=1495487362-18969-1-git-send-email-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=augustine.sterling@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linux-xtensa@linux-xtensa.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).