From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28424 invoked by alias); 27 Jul 2014 13:18:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28410 invoked by uid 89); 27 Jul 2014 13:18:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-ig0-f181.google.com Received: from mail-ig0-f181.google.com (HELO mail-ig0-f181.google.com) (209.85.213.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 27 Jul 2014 13:18:42 +0000 Received: by mail-ig0-f181.google.com with SMTP id h3so2578780igd.14 for ; Sun, 27 Jul 2014 06:18:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=7WbXrfWpD+r0EZ/RW5XHFiL4iszc3D0GfD8CasM/WEk=; b=h4mJGbaAazpvrr4HEPTnbATnhXp+PT5/94G0lrjhojyqFBB0A3WtmPJefirE2q8ypW AI84NVFfjdYF9ZzSPAbpS1Are4slPVlhmNnF4TFjc+3lh9bBdCcsWVH90zfge1wOuF8u gPXmbeS2HssWTFyBE6JitmoU5W6PAuqOan/xCl59JBYJ0lkzvabZZYWjCUOYrLEUI5nm S0ATCJlgn5gupWljgu88I3cn773X7shgkBfgvH+taKNSCJSLySMfpHVaUuwLQ1V0O56v WVUzz0VwMm+k3dRxLgSZw8vYN/l1O9pp+6jbt1DJgmMv/zspfBJFMQ1OrSR2Fw7cqB36 gPdg== X-Gm-Message-State: ALoCoQloxjMw1foxFUh1WoZGhk5jNqZQmrMG/nOPN7JJHcP0dJzYF0GF6Hq/qz5ZZegN/2RJSeyy X-Received: by 10.43.118.7 with SMTP id fo7mr34937597icc.3.1406467120489; Sun, 27 Jul 2014 06:18:40 -0700 (PDT) Received: from localhost (dsl-173-206-14-114.tor.primus.ca. [173.206.14.114]) by mx.google.com with ESMTPSA id y14sm3795491igg.0.2014.07.27.06.18.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Jul 2014 06:18:39 -0700 (PDT) From: Anthony Green To: gcc-patches@gcc.gnu.org Subject: [Patch, moxie] Add moxiebox target Date: Sun, 27 Jul 2014 14:03:00 -0000 Message-ID: <87zjfvx7m9.fsf@moxielogic.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg01835.txt.bz2 The following binutils patches introduce a new moxie-based target called moxiebox. Moxiebox is a VM developed by the bitcoin community to act as a secure, sandboxed execution environment for bitcoin automation. See http://github.com/jgarzik/moxiebox for more information. I'm checking these changes in. There's a config.sub change as well that I'll submit through the regular process. Thanks, AG For gcc... 2014-07-27 Anthony Green * config.gcc: Add moxie-*-moxiebox* configuration. * config/moxie/moxiebox.h: New file. For libgcc... 2014-07-27 Anthony Green * config.host: Add moxiebox configuration suppport. Index: gcc/config/moxie/moxiebox.h =================================================================== --- gcc/config/moxie/moxiebox.h (revision 0) +++ gcc/config/moxie/moxiebox.h (working copy) @@ -0,0 +1,47 @@ +/* Definitions for the moxiebox. + Copyright (C) 2014 Free Software Foundation, Inc. + Contributed by Anthony Green (green@moxielogic.com) + +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 +. */ + +/* Target OS preprocessor built-ins. */ +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("moxie"); \ + builtin_define ("__moxiebox__"); \ + builtin_assert ("system=moxiebox"); \ + } \ + while (0) + +#undef LIB_SPEC +#define LIB_SPEC \ +"%{!T*:-Tmoxiebox.ld} \ + %{!nostdlib: --start-group -lsandboxrt -lc -lgcc --end-group }" + +#undef LINK_SPEC +#define LINK_SPEC "%{h*} %{v:-V} -EL -Bstatic" + +#undef ASM_SPEC +#define ASM_SPEC "-EL" + +#undef MULTILIB_DEFAULTS + +#undef SIZE_TYPE +#undef PTRDIFF_TYPE +#undef WCHAR_TYPE +#undef WCHAR_TYPE_SIZE Index: gcc/config.gcc =================================================================== --- gcc/config.gcc (revision 212980) +++ gcc/config.gcc (working copy) @@ -1168,6 +1168,12 @@ tmake_file="${tmake_file} moxie/t-moxie" tm_file="moxie/moxie.h dbxelf.h elfos.h moxie/rtems.h rtems.h newlib-stdint.h" ;; +moxie-*-moxiebox*) + gas=yes + gnu_ld=yes + tm_file="${tm_file} dbxelf.h elfos.h moxie/moxiebox.h newlib-stdint.h" + tmake_file="${tmake_file} moxie/t-moxiebox" + ;; h8300-*-rtems*) tmake_file="${tmake_file} h8300/t-h8300 h8300/t-rtems" tm_file="h8300/h8300.h dbxelf.h elfos.h h8300/elf.h h8300/rtems.h rtems.h newlib-stdint.h" Index: libgcc/config.host =================================================================== --- libgcc/config.host (revision 212980) +++ libgcc/config.host (working copy) @@ -881,9 +881,9 @@ mn10300-*-*) tmake_file=t-fdpbit ;; -moxie-*-elf | moxie-*-uclinux*) +moxie-*-elf | moxie-*-moxiebox* | moxie-*-uclinux*) tmake_file="moxie/t-moxie t-softfp-sfdf t-softfp-excl t-softfp" - extra_parts="$extra_parts crti.o crtn.o" + extra_parts="$extra_parts crti.o crtn.o crtbegin.o crtend.o" ;; moxie-*-rtems*) tmake_file="$tmake_file moxie/t-moxie t-softfp-sfdf t-softfp-excl t-softfp"