From patchwork Mon Dec 3 08:58:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zankel X-Patchwork-Id: 203299 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (unknown [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id E3BC02C0085 for ; Mon, 3 Dec 2012 20:00:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A952431A40; Mon, 3 Dec 2012 09:00:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q54ScKuHF-un; Mon, 3 Dec 2012 09:00:41 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 190222021B; Mon, 3 Dec 2012 09:00:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D06128F783 for ; Mon, 3 Dec 2012 09:00:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2323E89806 for ; Mon, 3 Dec 2012 09:00:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gkeHbkTCBJMk for ; Mon, 3 Dec 2012 09:00:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id B3EB38989B for ; Mon, 3 Dec 2012 09:00:38 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id fb10so1830367pad.16 for ; Mon, 03 Dec 2012 01:00:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:from:to:date:subject:x-gm-message-state; bh=/xBsqRGDjV1/qv3QunK60b+GGM/eDPkf+v00z+rStHg=; b=n9950M9V5ns34lTscG20VhogF48Gpw1kl36tfym4FZlNHKB51BY8ybJ7qaRGbE+EAj +8vpYVpTbJj61g9nIaMpil+hQ8JegWfLBgngbQ89lGphSzmvTI4D7LeuloOvB0jw91hI GVjgVwQcV5wmZ4ELT7XVRrK/3Eh4hNuzeXzMmWS//1Q6H4V4QU5QO0horMKKDtuWiQov y0gz4SCLJHpTxQd7mrrcMnRa8iYC1K+70E14Fk54huyOcZVw05Lbyn0BFZCMNzXghlHK 4ss3ycKVGxc4L+vTZbe5pjcr7dmuQVV4R9QZ4tKCmd5v1O+ZsjuY/TrMLoLoFaeX4amV 02Xw== Received: by 10.68.230.66 with SMTP id sw2mr27402195pbc.119.1354525237940; Mon, 03 Dec 2012 01:00:37 -0800 (PST) Received: from localhost (c-67-161-9-61.hsd1.ca.comcast.net. [67.161.9.61]) by mx.google.com with ESMTPS id tm5sm7727787pbc.64.2012.12.03.01.00.34 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Dec 2012 01:00:36 -0800 (PST) Message-ID: <50bc6a34.45e8440a.493d.4091@mx.google.com> Received: by localhost (sSMTP sendmail emulation); Mon, 03 Dec 2012 01:00:33 -0800 From: Chris Zankel To: buildroot@busybox.net Date: Mon, 3 Dec 2012 00:58:46 -0800 X-Gm-Message-State: ALoCoQkl5hKAkUt6C5g2oTs8eX4ct/WxASrtLiw2T91si54Um3/j94+cD8yIxNrlysrGMMXDu3bq Subject: [Buildroot] [PATCH v2] xtensa: add config option to enable longcalls option X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The longcalls option allows calls across a greater range of addresses. This option should be used when call targets can potentially be out of range. It may degrade both code size and performance, but the linker can generally optimize away the unnecessary overhead when a call ends up within range. This option is enabled by default. Signed-off-by: Chris Zankel --- arch/Config.in.xtensa | 17 +++++++++++++++++ package/Makefile.in | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa index 60c03f5..a979108 100644 --- a/arch/Config.in.xtensa +++ b/arch/Config.in.xtensa @@ -35,3 +35,20 @@ config BR2_XTENSA_OVERLAY_DIR config BR2_ARCH default "xtensa" if BR2_xtensa + +menu "Target build options" + +config BR2_XTENSA_LONGCALLS + bool "Enable longcalls option" + default y + help + Enable or disable transformation of call instructions to allow + calls across a greater range of addresses. + This option should be used when call targets can potentially be + out of range. It may degrade both code size and performance, but + the linker can generally optimize away the unnecessary overhead + when a call ends up within range. + + Should be enabled by default. + +endmenu diff --git a/package/Makefile.in b/package/Makefile.in index 9fdc745..b52d5e0 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -56,6 +56,12 @@ TARGET_ABI+=-mabi=spe -mfloat-gprs=double -Wa,-me500mc endif endif +# Xtensa: The 'longcalls' option is required for large binary packages. +# Use a global option for all packages for now. +ifeq ($(BR2_XTENSA_LONGCALLS),y) +TARGET_CFLAGS += -mlongcalls +endif + STAGING_DIR=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sysroot TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))