From patchwork Mon Nov 26 21:57:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zankel X-Patchwork-Id: 202225 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id E7A4A2C0091 for ; Wed, 28 Nov 2012 00:45:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8CEC11011DD; Tue, 27 Nov 2012 13:45:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wxEe8OSnZg1M; Tue, 27 Nov 2012 13:44:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3F2A4100D71; Tue, 27 Nov 2012 13:44:52 +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 2087B8F74A for ; Tue, 27 Nov 2012 00:44:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 198C280AE7 for ; Tue, 27 Nov 2012 00:44:17 +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 64FUIAq0S9Od for ; Tue, 27 Nov 2012 00:44:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pb0-f43.google.com (mail-pb0-f43.google.com [209.85.160.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 14BFE80A1C for ; Tue, 27 Nov 2012 00:44:16 +0000 (UTC) Received: by mail-pb0-f43.google.com with SMTP id wz17so10332446pbc.16 for ; Mon, 26 Nov 2012 16:44:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:from:date:subject:x-gm-message-state; bh=uIk88BNvVvx+TvMqNmBx46CvzZkgtH7qXtT6P2CFPxk=; b=Et8kyjdWYGwFUBPh/PQerKoWSoG0W7vWpZnUA0flOVft27XYVdHMdO2FieDYvynVW4 W+TJrolXmJDY3xDxKmUIaekxeYJK5a3qpq4D/kmIEgKZdq0eEUxOZoMnxPWlMubBju98 QD4ks++DC9ZTLNTxWLYyYZO4ZuMCSlULIxwejcvShepT/F8h1t/tcMzW9XDdHnEEO7YN IWlwljzOo2tJLyi2R3KULPtSa9RJaTKNaBJcuYMsq90ujrn5j7VoU1K4c0ioWOAAHZWd zX5YRAcaBQ9pc+WM138hMBh8uHRK3dkfu2jzKTWDcD0dTnjXBuu4fhoP+V2F6U6O+u8O AvlQ== Received: by 10.66.84.132 with SMTP id z4mr37584751pay.63.1353976645039; Mon, 26 Nov 2012 16:37:25 -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 nm9sm9573104pbc.46.2012.11.26.16.37.22 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 16:37:24 -0800 (PST) Message-ID: <50b40b44.c9d4440a.12ab.ffffdc54@mx.google.com> Received: by localhost (sSMTP sendmail emulation); Mon, 26 Nov 2012 16:37:21 -0800 From: Chris Zankel Date: Mon, 26 Nov 2012 13:57:38 -0800 X-Gm-Message-State: ALoCoQm42dp93uihg3GRd/jPAVlBSJlrhmxic9qTEg3cqkFMclH5+eayWs+uPup6nnrIDx+MzPnt X-Mailman-Approved-At: Tue, 27 Nov 2012 13:45:01 +0000 Subject: [Buildroot] [PATCH 1/2] 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..2ab553e 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..6a35126 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_CPPFLAGS += -mlongcalls +endif + STAGING_DIR=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/sysroot TARGET_OPTIMIZATION:=$(call qstrip,$(BR2_TARGET_OPTIMIZATION))