From patchwork Fri Dec 17 23:29:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 76011 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 47B8CB6F07 for ; Sat, 18 Dec 2010 10:29:54 +1100 (EST) Received: (qmail 2799 invoked by alias); 17 Dec 2010 23:29:53 -0000 Received: (qmail 2785 invoked by uid 22791); 17 Dec 2010 23:29:52 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_XG, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Dec 2010 23:29:46 +0000 Received: (qmail 10321 invoked from network); 17 Dec 2010 23:29:44 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Dec 2010 23:29:44 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PTjk7-0003WS-I1; Fri, 17 Dec 2010 23:29:43 +0000 Date: Fri, 17 Dec 2010 23:29:43 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: thorpej@netbsd.org, krister.walfridsson@gmail.com Subject: Add NetBSD options from specs to .opt files Message-ID: MIME-Version: 1.0 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 In preparation for the driver only accepting options listed in .opt files, and not other options that simply happen to match some spec, this patch adds NetBSD options matched by specs in netbsd*.h to two new .opt files netbsd.opt and netbsd-elf.opt. Tested building cc1 and xgcc for crosses to: alpha-netbsdelf arm-netbsdelf arm-netbsd i686-netbsdelf i686-netbsd x86_64-netbsdelf m68k-netbsdelf powerpc-netbsdelf sh-netbsdelf sparc-netbsdelf sparc64-netbsdelf vax-netbsdelf vax-netbsd. (Those for m68k-netbsdelf and powerpc-netbsdelf fail with pre-existing problems.) OK to commit? 2010-12-17 Joseph Myers * config/netbsd.opt, config/netbsd-elf.opt: New files. * config.gcc (alpha*-*-netbsd*, arm*-*-netbsdelf*, arm*-*-netbsd*, i[34567]86-*-netbsdelf*, i[34567]86-*-netbsd*, x86_64-*-netbsd*, m68k*-*-netbsdelf*, mips*-*-netbsd*, powerpc-*-netbsd*, sh*-*-netbsd*, sparc-*-netbsdelf*, sparc64-*-netbsd*, vax-*-netbsdelf*, vax-*-netbsd*): Use these .opt files. Index: config.gcc =================================================================== --- config.gcc (revision 167992) +++ config.gcc (working copy) @@ -709,6 +709,7 @@ alpha*-*-freebsd*) ;; alpha*-*-netbsd*) tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" target_cpu_default="MASK_GAS" tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee" ;; @@ -774,10 +775,12 @@ arm*-*-freebsd*) ;; arm*-*-netbsdelf*) tm_file="dbxelf.h elfos.h netbsd.h netbsd-elf.h arm/elf.h arm/aout.h arm/arm.h arm/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" tmake_file="${tmake_file} arm/t-arm arm/t-netbsd" ;; arm*-*-netbsd*) tm_file="arm/aout.h arm/arm.h netbsd.h netbsd-aout.h arm/netbsd.h" + extra_options="${extra_options} netbsd.opt" tmake_file="t-netbsd arm/t-arm arm/t-netbsd" extra_parts="" use_collect2=yes @@ -1191,15 +1194,18 @@ x86_64-*-freebsd*) ;; i[34567]86-*-netbsdelf*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; i[34567]86-*-netbsd*) tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/gstabs.h netbsd.h netbsd-aout.h i386/netbsd.h" + extra_options="${extra_options} netbsd.opt" tmake_file="${tmake_file} t-netbsd" extra_parts="" use_collect2=yes ;; x86_64-*-netbsd*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/x86-64.h i386/netbsd64.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" tmake_file="${tmake_file} i386/t-crtstuff" ;; i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) @@ -1695,6 +1701,7 @@ m68k*-*-netbsdelf*) default_m68k_cpu=68020 default_cf_cpu=5475 tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h m68k/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" tm_defines="${tm_defines} MOTOROLA=1" ;; m68k*-*-openbsd*) @@ -1809,6 +1816,7 @@ mips-sgi-irix6.5*) mips*-*-netbsd*) # NetBSD/mips, either endian. target_cpu_default="MASK_ABICALLS" tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; mips64*-*-linux* | mipsisa64*-*-linux*) tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h" @@ -2027,6 +2035,7 @@ powerpc*-*-freebsd*) ;; powerpc-*-netbsd*) tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h freebsd-spec.h rs6000/sysv4.h rs6000/netbsd.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" tmake_file="${tmake_file} rs6000/t-netbsd" extra_options="${extra_options} rs6000/sysv4.opt" ;; @@ -2292,7 +2301,11 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian case ${target} in sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux" tm_file="${tm_file} linux.h glibc-stdint.h sh/linux.h" ;; - sh*-*-netbsd*) tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" ;; + sh*-*-netbsd*) + tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" + + ;; sh*-superh-elf) if test x$with_libgloss != xno; then with_libgloss=yes tm_file="${tm_file} sh/newlib.h" @@ -2493,6 +2506,7 @@ sparc-*-linux*) ;; sparc-*-netbsdelf*) tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" extra_options="${extra_options} sparc/long-double-switch.opt" ;; sparc*-*-solaris2*) @@ -2580,6 +2594,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd* sparc64-*-netbsd*) tm_file="sparc/biarch64.h ${tm_file}" tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h netbsd.h netbsd-elf.h sparc/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-netbsd64" ;; @@ -2653,9 +2668,11 @@ vax-*-linux*) ;; vax-*-netbsdelf*) tm_file="${tm_file} elfos.h netbsd.h netbsd-elf.h vax/elf.h vax/netbsd-elf.h" + extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; vax-*-netbsd*) tm_file="${tm_file} netbsd.h netbsd-aout.h vax/netbsd.h" + extra_options="${extra_options} netbsd.opt" tmake_file=t-netbsd extra_parts="" use_collect2=yes Index: config/netbsd.opt =================================================================== --- config/netbsd.opt (revision 0) +++ config/netbsd.opt (revision 0) @@ -0,0 +1,36 @@ +; NetBSD options. + +; Copyright (C) 2010 +; 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 +; . + +; See the GCC internals manual (options.texi) for a description of +; this file's format. + +; Please try to keep this file in ASCII collating order. + +assert= +Driver JoinedOrMissing + +posix +Driver + +pthread +Driver + +; This comment is to ensure we retain the blank line above. Index: config/netbsd-elf.opt =================================================================== --- config/netbsd-elf.opt (revision 0) +++ config/netbsd-elf.opt (revision 0) @@ -0,0 +1,33 @@ +; NetBSD ELF-only options. + +; Copyright (C) 2010 +; 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 +; . + +; See the GCC internals manual (options.texi) for a description of +; this file's format. + +; Please try to keep this file in ASCII collating order. + +rdynamic +Driver + +rpath= +Driver JoinedOrMissing + +; This comment is to ensure we retain the blank line above.