From: Max Filippov <jcmvbkbc@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Ian Lance Taylor <ian@airs.com>,
Alexey Lapshin <alexey.lapshin@espressif.com>
Subject: Re: [PATCH v2 0/2] gcc: xtensa: allow dynamic configuration
Date: Wed, 7 Dec 2022 10:03:05 -0800 [thread overview]
Message-ID: <CAMo8Bf+puODBNG=UYvUBzqvi-NyWch38GAgiDbZwCbwBuPKpeg@mail.gmail.com> (raw)
In-Reply-To: <20221129004551.2213723-1-jcmvbkbc@gmail.com>
On Mon, Nov 28, 2022 at 4:46 PM Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> Hello,
>
> this series addresses the long standing issue with xtensa configuration
> support by adding a way to configure toolchain for a specific xtensa
> core at runtime using the xtensa-dynconfig [1] library as a plugin.
> 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
> the toolchain using the 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 xtensa-dynconfig project [1].
>
> 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.
>
> This is not the first submission of this series, it was first
> submitted in 2017 [2]. This version has improved configuration
> versioning and GPL-compatibility check that was suggested in comments
> for the v1.
>
> [1] https://github.com/jcmvbkbc/xtensa-dynconfig
> [2] https://gcc.gnu.org/pipermail/gcc-patches/2017-May/475109.html
>
> Max Filippov (2):
> gcc: xtensa: allow dynamic configuration
> libgcc: xtensa: use built-in configuration
>
> gcc/config.gcc | 1 +
> gcc/config/xtensa/t-xtensa | 8 +-
> gcc/config/xtensa/xtensa-dynconfig.c | 170 +++++++
> gcc/config/xtensa/xtensa-protos.h | 1 +
> gcc/config/xtensa/xtensa.h | 22 +-
> include/xtensa-dynconfig.h | 442 +++++++++++++++++++
> libgcc/config/xtensa/crti.S | 2 +-
> libgcc/config/xtensa/crtn.S | 2 +-
> libgcc/config/xtensa/lib1funcs.S | 2 +-
> libgcc/config/xtensa/lib2funcs.S | 2 +-
> libgcc/config/xtensa/xtensa-config-builtin.h | 198 +++++++++
> 11 files changed, 828 insertions(+), 22 deletions(-)
> create mode 100644 gcc/config/xtensa/xtensa-dynconfig.c
> create mode 100644 include/xtensa-dynconfig.h
> create mode 100644 libgcc/config/xtensa/xtensa-config-builtin.h
Series regtested for target=xtensa-linux-uclibc, no new regressions.
Committed to master.
--
Thanks.
-- Max
prev parent reply other threads:[~2022-12-07 18:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 0:45 Max Filippov
2022-11-29 0:45 ` [PATCH v2 1/2] " Max Filippov
2022-11-29 0:45 ` [PATCH v2 2/2] libgcc: xtensa: use built-in configuration Max Filippov
2022-12-07 18:03 ` Max Filippov [this message]
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='CAMo8Bf+puODBNG=UYvUBzqvi-NyWch38GAgiDbZwCbwBuPKpeg@mail.gmail.com' \
--to=jcmvbkbc@gmail.com \
--cc=alexey.lapshin@espressif.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ian@airs.com \
/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).