From patchwork Sun Oct 8 21:12:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Tobler X-Patchwork-Id: 823037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-463725-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="pBCuxUH/"; dkim-atps=neutral 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 3y9GKy07nRz9s0Z for ; Mon, 9 Oct 2017 08:12:36 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=un+jdkbpjshJuXdS 0g5jIXchnnKxq3ghuAUQAtRkDCK4BBkESTE8iC/auRgyvOEex7w54yDKqa/7AIbH xzEKIiHqswEvO+DWwxVHj+A7276ksxptAZMTy/bsuPr6JiKXLnA9t4m33VUl0llC PIgZFoYL4Mrjff4v8ZVnVzYcLNM= 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:to :from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=default; bh=R/q7Htm/AU4ZsfVHyg8jSb T4WkQ=; b=pBCuxUH/66AExwj72eRW/xKdnYYOFy8S3gWvoWHFG5Idgh/nz0BN2o /jD5/WOBp7xHzsOp8r/HvgzOe/3JapbNyN7FKoYybzhNDAOEgWVUJhgtClKe16Ng honXe+we5bygefJHiSPCCezRqMp9fDIkC7+MlEiHK5h3JxTQXXbNo= Received: (qmail 49813 invoked by alias); 8 Oct 2017 21:12:28 -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 49448 invoked by uid 89); 8 Oct 2017 21:12:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=differently X-HELO: smtp.fgznet.ch Received: from smtp.fgznet.ch (HELO smtp.fgznet.ch) (157.161.14.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 08 Oct 2017 21:12:26 +0000 Received: from [192.168.225.14] (dhclient-91-190-10-49.flashcable.ch [91.190.10.49]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 3DF8FC41FE for ; Sun, 8 Oct 2017 23:12:24 +0200 (CEST) To: GCC Patches From: Andreas Tobler Subject: [patch][arm][FreeBSD] gcc-6/5: add support for armv7*-*-freebsd* Message-ID: Date: Sun, 8 Oct 2017 23:12:23 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi all, and here is the patch for gcc-6/5 branch to add support for armv7*-*-freebsd* The difference towards trunk is the missing of target_cpu_cname which is solved differently. I'm aware of the gcc-5 branch status and I will not apply before gcc-5.5 is released. I'll also will not apply on the gcc-5 branch if the branch gets closed. If you have any objections, please speak up. TIA, Andreas 2017-10-08 Andreas Tobler * config.gcc: (armv7*-*-freebsd*): New target. Define TARGET_FREEBSD_ARMv7 * config/arm/freebsd.h: Use TARGET_FREEBSD_ARMv7 to define the default cpu for armv7*-*-freebsd*. Index: config/arm/freebsd.h =================================================================== --- config/arm/freebsd.h (revision 253513) +++ config/arm/freebsd.h (working copy) @@ -112,6 +112,10 @@ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD +#if defined (TARGET_FREEBSD_ARMv7) +#undef SUBTARGET_CPU_DEFAULT +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_genericv7a +#else #if defined (TARGET_FREEBSD_ARMv6) #undef SUBTARGET_CPU_DEFAULT #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm1176jzs @@ -119,6 +123,7 @@ #undef SUBTARGET_CPU_DEFAULT #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9 #endif +#endif /* FreeBSD 10 does not support unaligned access for armv6 and up. Unaligned access support was added in FreeBSD 11. */ Index: config.gcc =================================================================== --- config.gcc (revision 253513) +++ config.gcc (working copy) @@ -1072,6 +1072,10 @@ tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1" fi ;; + armv7*-*-freebsd*) + tm_defines="${tm_defines} TARGET_FREEBSD_ARMv7=1" + tm_defines="${tm_defines} TARGET_FREEBSD_ARM_HARD_FLOAT=1" + ;; esac with_tls=${with_tls:-gnu} ;;