* Add SPARC Solaris options from specs to new sparc/sol2.opt
@ 2011-02-04 1:42 Joseph S. Myers
2011-02-04 8:58 ` Eric Botcazou
0 siblings, 1 reply; 5+ messages in thread
From: Joseph S. Myers @ 2011-02-04 1:42 UTC (permalink / raw)
To: gcc-patches; +Cc: rth, davem, jakub, ebotcazou, ro
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 options from specs in sparc/sol2-bi.h to a new
sparc/sol2.opt.
The options in question are -sun4 and -target. As noted in
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00909.html>, where I
removed them for non-Solaris targets, I'm not sure they make sense
even for Solaris; an alternative would be to remove the specs in
question from sol2-bi.h.
In particular, one comment removed by that previous patch said
"Prevent error on `-sun4' and `-target sun4' options.", but "-target
sun4" would never have worked because this was not marked as an option
that takes an argument. So if that is the form with which
compatibility was intended, there has never been actual compatibility
for -target for Solaris. Note that old versions of GCC did define
WORD_SWITCH_TAKES_ARG in sparc.h to make -target take an argument -
and then undefined it in sysv4.h with the comment 'Undefine some
symbols which are defined in "sparc.h" but which are appropriate only
for SunOS 4.x, and not for svr4.', so that particular option could be
a left-over relic of SunOS 4 support.
Tested building cc1 and xgcc for cross to sparc-solaris2.8. OK to
commit? (Or, in the alternative, OK to commit the obvious patch to
remove %{sun4:} %{target:} from specs in sol2-bi.h?)
2011-02-03 Joseph Myers <joseph@codesourcery.com>
* config/sparc/sol2.opt: New.
* config.gcc (sparc*-*-solaris2*): Use sparc/sol2.opt.
Index: config.gcc
===================================================================
--- config.gcc (revision 169769)
+++ config.gcc (working copy)
@@ -2552,6 +2552,7 @@ sparc*-*-solaris2*)
;;
esac
tm_file="${tm_file} sparc/sol2-bi.h"
+ extra_options="${extra_options} sparc/sol2.opt"
if test x$gas = xyes; then
tm_file="${tm_file} sparc/sol2-gas.h sparc/sol2-gas-bi.h"
fi
Index: config/sparc/sol2.opt
===================================================================
--- config/sparc/sol2.opt (revision 0)
+++ config/sparc/sol2.opt (revision 0)
@@ -0,0 +1,33 @@
+; SPARC Solaris options.
+
+; Copyright (C) 2011
+; 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.
+
+sun4
+Driver
+
+target
+Driver
+
+; This comment is to ensure we retain the blank line above.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add SPARC Solaris options from specs to new sparc/sol2.opt
2011-02-04 1:42 Add SPARC Solaris options from specs to new sparc/sol2.opt Joseph S. Myers
@ 2011-02-04 8:58 ` Eric Botcazou
2011-02-04 15:05 ` Rainer Orth
0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2011-02-04 8:58 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: gcc-patches, rth, davem, jakub, ro
> Tested building cc1 and xgcc for cross to sparc-solaris2.8. OK to
> commit? (Or, in the alternative, OK to commit the obvious patch to
> remove %{sun4:} %{target:} from specs in sol2-bi.h?)
I'd personally be in favor of the latter solution. What do you think, Rainer?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add SPARC Solaris options from specs to new sparc/sol2.opt
2011-02-04 8:58 ` Eric Botcazou
@ 2011-02-04 15:05 ` Rainer Orth
2011-02-04 23:47 ` Joseph S. Myers
0 siblings, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2011-02-04 15:05 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Joseph S. Myers, gcc-patches, rth, davem, jakub
Eric Botcazou <ebotcazou@adacore.com> writes:
>> Tested building cc1 and xgcc for cross to sparc-solaris2.8. OK to
>> commit? (Or, in the alternative, OK to commit the obvious patch to
>> remove %{sun4:} %{target:} from specs in sol2-bi.h?)
>
> I'd personally be in favor of the latter solution. What do you think, Rainer?
Me too. I couldn't find any hint of -sun4 or -target (with or without
sun4) in not-too-ancient Studio compilers. This stuff seems like
ancient (as in SunOS 4) history to me, so good riddance.
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add SPARC Solaris options from specs to new sparc/sol2.opt
2011-02-04 15:05 ` Rainer Orth
@ 2011-02-04 23:47 ` Joseph S. Myers
2011-02-05 8:30 ` Eric Botcazou
0 siblings, 1 reply; 5+ messages in thread
From: Joseph S. Myers @ 2011-02-04 23:47 UTC (permalink / raw)
To: Rainer Orth; +Cc: Eric Botcazou, gcc-patches, rth, davem, jakub
On Fri, 4 Feb 2011, Rainer Orth wrote:
> Eric Botcazou <ebotcazou@adacore.com> writes:
>
> >> Tested building cc1 and xgcc for cross to sparc-solaris2.8. OK to
> >> commit? (Or, in the alternative, OK to commit the obvious patch to
> >> remove %{sun4:} %{target:} from specs in sol2-bi.h?)
> >
> > I'd personally be in favor of the latter solution. What do you think, Rainer?
>
> Me too. I couldn't find any hint of -sun4 or -target (with or without
> sun4) in not-too-ancient Studio compilers. This stuff seems like
> ancient (as in SunOS 4) history to me, so good riddance.
Is this alternative patch OK, then?
2011-02-04 Joseph Myers <joseph@codesourcery.com>
* config/sparc/sol2-bi.h (CC1_SPEC): Remove %{sun4:} %{target:}.
Index: gcc/config/sparc/sol2-bi.h
===================================================================
--- gcc/config/sparc/sol2-bi.h (revision 169841)
+++ gcc/config/sparc/sol2-bi.h (working copy)
@@ -229,14 +229,12 @@ see the files COPYING3 and COPYING.RUNTI
#undef CC1_SPEC
#if DEFAULT_ARCH32_P
#define CC1_SPEC "\
-%{sun4:} %{target:} \
%{m64:%{m32:%emay not use both -m32 and -m64}} \
%{m64:-mptr64 -mstack-bias -mno-v8plus \
%{!mcpu*:-%{!mv8plus:mcpu=v9}}} \
"
#else
#define CC1_SPEC "\
-%{sun4:} %{target:} \
%{m32:%{m64:%emay not use both -m32 and -m64}} \
%{m32:-mptr32 -mno-stack-bias \
%{!mcpu*:%{!mv8plus:-mcpu=v9}}} \
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Add SPARC Solaris options from specs to new sparc/sol2.opt
2011-02-04 23:47 ` Joseph S. Myers
@ 2011-02-05 8:30 ` Eric Botcazou
0 siblings, 0 replies; 5+ messages in thread
From: Eric Botcazou @ 2011-02-05 8:30 UTC (permalink / raw)
To: Joseph S. Myers; +Cc: Rainer Orth, gcc-patches, rth, davem, jakub
> Is this alternative patch OK, then?
>
> 2011-02-04 Joseph Myers <joseph@codesourcery.com>
>
> * config/sparc/sol2-bi.h (CC1_SPEC): Remove %{sun4:} %{target:}.
Sure, thanks.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-05 8:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-04 1:42 Add SPARC Solaris options from specs to new sparc/sol2.opt Joseph S. Myers
2011-02-04 8:58 ` Eric Botcazou
2011-02-04 15:05 ` Rainer Orth
2011-02-04 23:47 ` Joseph S. Myers
2011-02-05 8:30 ` Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).