From patchwork Thu Oct 25 13:49:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ralf Corsepius X-Patchwork-Id: 194165 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]) by ozlabs.org (Postfix) with SMTP id 46F442C009B for ; Fri, 26 Oct 2012 00:53:01 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351777982; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:Subject:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=4/7IqHBZVtjtXEyT2EwAV1+G4KM=; b=v1+O4lzQbvzmAXq J40NAnIuTQBlhARcMWs8Snhnn8xW26GzhuvbAvU+WtjDl+WVieNi1nQWeb/+cIxe ENuDOAJHKSxVTVtAtFJcPnqvx5mQWKy+8xL0giBq2ZAbIrI5hzHi6mRzGiO9c0gv jrk+mywNq+pUiENVeWK/YWJCkAG4= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PfgqZlMAE5NsEyJDmvMOlwR5+PqYry0RagvtISpg9PotLs7JWu4NrW+Vv87JJ0 PkHcoSCKpYX8FoFd6to3Xe4v1DbJjNRvRdKpGSHNzd4YxLGKHM9oI6ogtzPbit3t IHE89l73EFbvjr3zKyf+BQSbPEGByUBD+O/E3Ma4kcK38=; Received: (qmail 23703 invoked by alias); 25 Oct 2012 13:52:55 -0000 Received: (qmail 23685 invoked by uid 22791); 25 Oct 2012 13:52:53 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mout0.freenet.de (HELO mout0.freenet.de) (195.4.92.90) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Oct 2012 13:52:42 +0000 Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout0.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (port 25) (Exim 4.76 #1) id 1TRNrV-0005iU-D5 for gcc-patches@gcc.gnu.org; Thu, 25 Oct 2012 15:52:41 +0200 Received: from localhost ([::1]:47211 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim 4.76 #1) id 1TRNrV-0007FH-8u for gcc-patches@gcc.gnu.org; Thu, 25 Oct 2012 15:52:41 +0200 Received: from [195.4.92.13] (port=33001 helo=3.mx.freenet.de) by mjail1.freenet.de with esmtpa (ID ralf.corsepius@freenet.de) (Exim 4.76 #1) id 1TRNop-0006JA-Iz for gcc-patches@gcc.gnu.org; Thu, 25 Oct 2012 15:49:55 +0200 Received: from hsi-kbw-078-043-063-180.hsi4.kabel-badenwuerttemberg.de ([78.43.63.180]:60302 helo=[192.168.1.104]) by 3.mx.freenet.de with esmtpsa (ID ralf.corsepius@freenet.de) (TLSv1:CAMELLIA256-SHA:256) (port 587) (Exim 4.76 #1) id 1TRNop-0004tA-4s for gcc-patches@gcc.gnu.org; Thu, 25 Oct 2012 15:49:55 +0200 Message-ID: <50894381.8060400@rtems.org> Date: Thu, 25 Oct 2012 15:49:53 +0200 From: Ralf Corsepius User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121016 Thunderbird/16.0.1 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [patch,gcc] Add microblaze*-rtems* 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 Hi, And another RTEMS-patch, I'd like to apply to GCC trunk and GCC-4_7-branch: Adding microblaze*-rtems* target. This patch has been in use as part of the RTEMS gcc-4.7 patches for ca. 1/2 a year. Ralf 2012-04-19 Ralf Corsépius * config.gcc (microblaze*-*-rtems*): New target. * config/microblaze/rtems.h: New. * config/microblaze/t-rtems: New. diff --git a/gcc/config.gcc b/gcc/config.gcc index 13da8a3..317cb95 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1728,6 +1728,14 @@ microblaze*-linux*) c_target_objs="${c_target_objs} microblaze-c.o" cxx_target_objs="${cxx_target_objs} microblaze-c.o" ;; +microblaze*-*-rtems*) + tm_file="${tm_file} dbxelf.h" + tm_file="${tm_file} microblaze/rtems.h rtems.h newlib-stdint.h" + c_target_objs="${c_target_objs} microblaze-c.o" + cxx_target_objs="${cxx_target_objs} microblaze-c.o" + tmake_file="${tmake_file} microblaze/t-microblaze" + tmake_file="${tmake_file} t-rtems microblaze/t-rtems" + ;; microblaze*-*-*) tm_file="${tm_file} dbxelf.h" c_target_objs="${c_target_objs} microblaze-c.o" diff --git a/gcc/config/microblaze/rtems.h b/gcc/config/microblaze/rtems.h new file mode 100644 index 0000000..fecf7a2 --- /dev/null +++ b/gcc/config/microblaze/rtems.h @@ -0,0 +1,25 @@ +/* Definitions for rtems targeting a microblaze using ELF. + Copyright (C) 2012 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +/* Specify predefined symbols in preprocessor. */ + +#define TARGET_OS_CPP_BUILTINS() do { \ + builtin_define( "__rtems__" ); \ + builtin_assert( "system=rtems" ); \ +} while (0) diff --git a/gcc/config/microblaze/t-rtems b/gcc/config/microblaze/t-rtems new file mode 100644 index 0000000..d0c3826 --- /dev/null +++ b/gcc/config/microblaze/t-rtems @@ -0,0 +1 @@ +# Custom multilibs for RTEMS