From patchwork Fri Oct 9 16:56:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Norris X-Patchwork-Id: 528323 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8A1AB140321 for ; Sat, 10 Oct 2015 03:56:39 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=LafbylKb; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=vR3cT/GCKJ+0PBa+SjGENoZBKg+/elweozu2WMOd65T OqwYI2hiNmP/7J48ddlRTR/OmNFkPmzOmkor4Yt3yx7aGhcpdOYre0QXAWkT1S0r En84FvVx2uAT4YI7zSaMnd2/GefrGBkl75qWjpycNhn0u9ZYKqqXY0UbYGWwpuMY = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=O8QRrVjTZSpaF/gUmcW3DmRDfuU=; b=LafbylKbtRFvGvOUI kWWdqNN3PIXLIrC+vIc0Oe1+rLqriJwjJ5ZrI/5/tb/MhvqeM3j5lLRAqMiweBZq JDfi6JYlOMaboZFtHCXa3a/XjR6L9vBKBLzGCgs8PRaTgIpevs7c8xZh5LAksGLG Q/w3+1PwZp6e4OxCv9cQeGpkII= Received: (qmail 33604 invoked by alias); 9 Oct 2015 16:56:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 33491 invoked by uid 89); 9 Oct 2015 16:56:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS, T_FROM_12LTRDOM autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Oct 2015 16:56:19 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1Zkaxs-0002lg-1A from James_Norris@mentor.com for gcc-patches@gcc.gnu.org; Fri, 09 Oct 2015 09:56:16 -0700 Received: from [172.30.80.10] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Fri, 9 Oct 2015 09:56:15 -0700 Message-ID: <5617F1AE.8030907@codesourcery.com> Date: Fri, 9 Oct 2015 11:56:14 -0500 From: James Norris User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: GCC Patches CC: Thomas Schwinge Subject: [gomp4] Backport from trunk Hi, The attached patch was backported from trunk. commit 13d478244d380d1564eefc204201b7f681218ce3 Author: jnorris Date: Fri Oct 9 12:35:58 2015 +0000 * config/rs6000/rs6000.c (rs6000_offload_options): New. (TARGET_OFFLOAD_OPTIONS): New. Jim diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 023f622..2dce709 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1688,6 +1688,9 @@ static const struct attribute_spec rs6000_attribute_table[] = #define TARGET_LIBGCC_SHIFT_COUNT_MODE rs6000_abi_word_mode #undef TARGET_UNWIND_WORD_MODE #define TARGET_UNWIND_WORD_MODE rs6000_abi_word_mode + +#undef TARGET_OFFLOAD_OPTIONS +#define TARGET_OFFLOAD_OPTIONS rs6000_offload_options /* Processor table. */ @@ -9532,6 +9535,16 @@ rs6000_abi_word_mode (void) return TARGET_32BIT ? SImode : DImode; } +/* Implement the TARGET_OFFLOAD_OPTIONS hook. */ +static char * +rs6000_offload_options (void) +{ + if (TARGET_64BIT) + return xstrdup ("-foffload-abi=lp64"); + else + return xstrdup ("-foffload-abi=ilp32"); +} + /* On rs6000, function arguments are promoted, as are function return values. */