Patchwork Add NetBSD options from specs to .opt files

login
register
mail settings
Submitter Joseph S. Myers
Date Dec. 17, 2010, 11:29 p.m.
Message ID <Pine.LNX.4.64.1012172328140.5744@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/76011/
State New
Headers show

Comments

Joseph S. Myers - Dec. 17, 2010, 11:29 p.m.
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  <joseph@codesourcery.com>

	* 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.
Krister Walfridsson - Dec. 18, 2010, 12:45 a.m.
On Sat, Dec 18, 2010 at 12:29 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> 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  <joseph@codesourcery.com>
>
>        * 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.

OK.

   /Krister

Patch

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
+; <http://www.gnu.org/licenses/>.
+
+; 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
+; <http://www.gnu.org/licenses/>.
+
+; 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.