From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 743 invoked by alias); 22 May 2017 21:12:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 637 invoked by uid 89); 22 May 2017 21:12:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,GIT_PATCH_2,GIT_PATCH_3,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*cadence.com, Hx-languages-length:2562 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lf0-f66.google.com Received: from mail-lf0-f66.google.com (HELO mail-lf0-f66.google.com) (209.85.215.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 May 2017 21:12:46 +0000 Received: by mail-lf0-f66.google.com with SMTP id m18so6434023lfj.0; Mon, 22 May 2017 14:12:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SgC+h7I6UagBnILVShjm36WQYNPN6U7o9u96bWB6w9A=; b=JXV0sojZVs++Q32Z3VioWehMzibpyPvCKy9kvYGhenp0oq53VJL4DAjbgQi4+2ZsUo vHZazr37KuOZ7aiBZ3FyOcnu6IAtkaerRnlJmeXwnXhzxNK/pIM+i8Vs3jWzevfcewPN krS0FyhQeAcsxt82Ak5DYCZ7vS1iwb5IHjd8dOaMJANcJcZh5X/nWXSxvHrrV3P95FTb Xp+/FMVzCCaKI1gh1pRL/v4OJTIROS3ErzsRgMxPwLphve7kXQl+BX8oW/cGxBNFwtbt ubvelhskTfhBqBu6YaPBIoz9KTLt4PwdB9N8q7XTSpSnztvcm/oKqmSL0bn3fgzVvH+v J/Ow== X-Gm-Message-State: AODbwcBP3D9O8IsrsXwjT9yN+Z1R9gXpJfmb6KpWTupAgyrFtk1ETC/c KYoLkUtfvc8yEA== X-Received: by 10.46.20.5 with SMTP id u5mr6014912ljd.66.1495487567232; Mon, 22 May 2017 14:12:47 -0700 (PDT) Received: from octofox.metropolis ([5.19.183.212]) by smtp.gmail.com with ESMTPSA id a7sm3335749ljb.44.2017.05.22.14.12.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 May 2017 14:12:46 -0700 (PDT) From: Max Filippov To: binutils@sourceware.org, gdb-patches@sourceware.org Cc: Sterling Augustine , David Weatherford , Maxim Grigoriev , Woody LaRue , Max Filippov Subject: [RFC 0/5] xtensa: support dynamic configuration Date: Mon, 22 May 2017 21:12:00 -0000 Message-Id: <1495487553-19078-1-git-send-email-jcmvbkbc@gmail.com> X-SW-Source: 2017-05/txt/msg00502.txt.bz2 Hello, this is an RFC series that makes xtensa binutils 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): xtensa: don't expect XCHAL_* macros to be constant xtensa: make configuration dynamic xtensa: support dynconfig on windows xtensa: make xtensa_modules dynamic gdb: xtensa: make tdep and linux-nat dynamically configurable bfd/Makefile.am | 2 + bfd/Makefile.in | 3 + bfd/configure | 4 +- bfd/configure.ac | 4 +- bfd/elf32-xtensa.c | 62 ++++---- bfd/xtensa-config.c | 117 ++++++++++++++ bfd/xtensa-isa.c | 13 +- gas/config/tc-xtensa.c | 34 +++-- gas/config/tc-xtensa.h | 11 +- gas/config/xtensa-relax.c | 2 +- gdb/xtensa-linux-nat.c | 18 ++- gdb/xtensa-tdep.c | 13 +- include/xtensa-dynconfig.h | 373 +++++++++++++++++++++++++++++++++++++++++++++ ld/Makefile.am | 1 + ld/Makefile.in | 1 + ld/emultempl/xtensaelf.em | 2 +- 16 files changed, 608 insertions(+), 52 deletions(-) create mode 100644 bfd/xtensa-config.c create mode 100644 include/xtensa-dynconfig.h -- 2.1.4