* Add GNU -bsd option from specs to new gnu.opt
@ 2011-01-28 1:21 Joseph S. Myers
2011-02-03 16:13 ` Ping " Joseph S. Myers
2011-02-07 0:13 ` Thomas Schwinge
0 siblings, 2 replies; 8+ messages in thread
From: Joseph S. Myers @ 2011-01-28 1:21 UTC (permalink / raw)
To: gcc-patches; +Cc: tschwinge
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 the -bsd option accepted by specs in gnu.h to a new
gnu.opt file. (Other options are not added to this file because
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02024.html> adds them to
gnu-user.opt, but this patch does not depend on that one; the two
patches could go in in either order.)
Tested building cc1 and xgcc for cross to i686-gnu. OK to commit?
2011-01-27 Joseph Myers <joseph@codesourcery.com>
* config/gnu.opt: New.
* config.gcc (*-*-gnu*): Use gnu.opt.
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 169317)
+++ gcc/config.gcc (working copy)
@@ -561,6 +561,9 @@ case ${target} in
case $target in
*linux*)
extra_options="$extra_options linux.opt";;
+ *-*-gnu*)
+ tm_defines="$tm_defines SINGLE_LIBC"
+ extra_options="$extra_options gnu.opt";;
*)
tm_defines="$tm_defines SINGLE_LIBC";;
esac
Index: gcc/config/gnu.opt
===================================================================
--- gcc/config/gnu.opt (revision 0)
+++ gcc/config/gnu.opt (revision 0)
@@ -0,0 +1,30 @@
+; GNU options, other than general GNU-userspace ones.
+
+; 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.
+
+bsd
+Driver
+
+; This comment is to ensure we retain the blank line above.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Ping Re: Add GNU -bsd option from specs to new gnu.opt
2011-01-28 1:21 Add GNU -bsd option from specs to new gnu.opt Joseph S. Myers
@ 2011-02-03 16:13 ` Joseph S. Myers
2011-02-07 0:13 ` Thomas Schwinge
1 sibling, 0 replies; 8+ messages in thread
From: Joseph S. Myers @ 2011-02-03 16:13 UTC (permalink / raw)
To: gcc-patches; +Cc: tschwinge
Ping. This patch
<http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02072.html> is pending
review.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Add GNU -bsd option from specs to new gnu.opt
2011-01-28 1:21 Add GNU -bsd option from specs to new gnu.opt Joseph S. Myers
2011-02-03 16:13 ` Ping " Joseph S. Myers
@ 2011-02-07 0:13 ` Thomas Schwinge
2011-02-07 5:56 ` Roland McGrath
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Schwinge @ 2011-02-07 0:13 UTC (permalink / raw)
To: Joseph S. Myers
Cc: gcc-patches, Roland McGrath, Thomas Bushnell, Samuel Thibault
[-- Attachment #1: Type: text/plain, Size: 2666 bytes --]
Hallo!
Roland, Thomas, Samuel: Do you have any comments on this (read below)?
(Originally: <http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02072.html>,
<http://gcc.gnu.org/ml/gcc-patches/2011-02/msg00206.html>)
On Fri, Jan 28, 2011 at 12:06:48AM +0000, Joseph S. Myers 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 the -bsd option accepted by specs in gnu.h to a new
> gnu.opt file.
> (Other options are not added to this file because
> <http://gcc.gnu.org/ml/gcc-patches/2011-01/msg02024.html> adds them to
> gnu-user.opt
Ack.
> Index: gcc/config.gcc
> ===================================================================
> --- gcc/config.gcc (revision 169317)
> +++ gcc/config.gcc (working copy)
> @@ -561,6 +561,9 @@ case ${target} in
> case $target in
> *linux*)
> extra_options="$extra_options linux.opt";;
> + *-*-gnu*)
> + tm_defines="$tm_defines SINGLE_LIBC"
> + extra_options="$extra_options gnu.opt";;
> *)
> tm_defines="$tm_defines SINGLE_LIBC";;
> esac
This would also match k*bsd-gnu*, etc. -- which don't have a -bsd option
as far as I can tell -- I only find it in three places:
config/gnu.h:#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
config/gnu.h:#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{pg|p|profile:-lc_p;:-lc}"
config/i386/gnu.h:#define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
So, I wondered what this -bsd option was actually about. (I already
wondered months (uhm, years...) ago, but didn't look it up back then.)
This spec code was added with the original GNU/Hurd spec files commit by
Roland in 1994. Roland, can you tell where you meant to / did use this
option (apart from a local command-line argument shortcut)?
The only place I can remotely find it referenced in core Hurd-related
source code is in glibc, and here it (that is, libbsd-compat) has been an
empty dummy library as of 1998-04-21. [glibc]/NOTES has a description of
this in the ``Macro: _BSD_SOURCE'' section (but doesn't talk about a -bsd
option either).
There might be some third-party software that uses the -bsd option
(exclusively) for GNU/Hurd, but I don't think this is anywhere near
realistical, and if that softwares' builds failed loudly passing this
option to GCC (and be fixed afterwards), I'd consider that fine -- I
therefore propose removing this -bsd option right away instead of
spending any more time on it.
Grüße,
Thomas
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Add GNU -bsd option from specs to new gnu.opt
2011-02-07 0:13 ` Thomas Schwinge
@ 2011-02-07 5:56 ` Roland McGrath
2011-02-07 9:28 ` Thomas Schwinge
0 siblings, 1 reply; 8+ messages in thread
From: Roland McGrath @ 2011-02-07 5:56 UTC (permalink / raw)
To: Thomas Schwinge
Cc: Joseph S. Myers, gcc-patches, Thomas Bushnell, Samuel Thibault
I don't think we need to support a -bsd command-line option.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Add GNU -bsd option from specs to new gnu.opt
2011-02-07 5:56 ` Roland McGrath
@ 2011-02-07 9:28 ` Thomas Schwinge
2011-02-07 18:14 ` Joseph S. Myers
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Schwinge @ 2011-02-07 9:28 UTC (permalink / raw)
To: Roland McGrath
Cc: Joseph S. Myers, gcc-patches, Thomas Bushnell, Samuel Thibault
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
Hallo!
On Sun, 6 Feb 2011 21:55:53 -0800 (PST), Roland McGrath <roland@frob.com> wrote:
> I don't think we need to support a -bsd command-line option.
Here is a patch. OK to commit?
I will continue to see whether the GNU/Hurd spec files can be simplified
/ streamlined.
gcc/
2011-02-07 Thomas Schwinge <thomas@schwinge.name>
* config/gnu.h (CPP_SPEC, LIB_SPEC): Remove handling of -bsd option.
* i386/config/gnu.h (CPP_SPEC): Likewise.
---
gcc/config/gnu.h | 6 +++---
gcc/config/i386/gnu.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h
index 1299376..db9d63c 100644
--- a/gcc/config/gnu.h
+++ b/gcc/config/gnu.h
@@ -22,11 +22,11 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
/* Provide GCC options for standard feature-test macros. */
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
-/* Default C library spec. Use -lbsd-compat for gcc -bsd. */
+/* Default C library spec. */
#undef LIB_SPEC
-#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{pg|p|profile:-lc_p;:-lc}"
+#define LIB_SPEC "%{pthread:-lpthread} %{pg|p|profile:-lc_p;:-lc}"
/* Standard include directory. In GNU, "/usr" is a four-letter word. */
#undef STANDARD_INCLUDE_DIR
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
index 077933b..2ce6aea 100644
--- a/gcc/config/i386/gnu.h
+++ b/gcc/config/i386/gnu.h
@@ -27,7 +27,7 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
#define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
#undef CPP_SPEC
-#define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
+#define CPP_SPEC "%{pthread:-D_REENTRANT} %{posix:-D_POSIX_SOURCE}"
#undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu)"
--
tg: (a26f5cb..) remove_-bsd_option (depends on: master)
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Add GNU -bsd option from specs to new gnu.opt
2011-02-07 9:28 ` Thomas Schwinge
@ 2011-02-07 18:14 ` Joseph S. Myers
2011-02-08 19:25 ` Thomas Schwinge
0 siblings, 1 reply; 8+ messages in thread
From: Joseph S. Myers @ 2011-02-07 18:14 UTC (permalink / raw)
To: Thomas Schwinge
Cc: Roland McGrath, gcc-patches, Thomas Bushnell, Samuel Thibault
On Mon, 7 Feb 2011, Thomas Schwinge wrote:
> Hallo!
>
> On Sun, 6 Feb 2011 21:55:53 -0800 (PST), Roland McGrath <roland@frob.com> wrote:
> > I don't think we need to support a -bsd command-line option.
>
> Here is a patch. OK to commit?
As the Hurd maintainer for GCC, you don't need approval to commit this
patch....
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Add GNU -bsd option from specs to new gnu.opt
2011-02-07 18:14 ` Joseph S. Myers
@ 2011-02-08 19:25 ` Thomas Schwinge
2011-02-08 19:49 ` Joseph S. Myers
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Schwinge @ 2011-02-08 19:25 UTC (permalink / raw)
To: Joseph S. Myers
Cc: Roland McGrath, gcc-patches, Thomas Bushnell, Samuel Thibault
[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]
Hallo!
On Mon, 7 Feb 2011 18:14:42 +0000 (UTC), "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> On Mon, 7 Feb 2011, Thomas Schwinge wrote:
> > On Sun, 6 Feb 2011 21:55:53 -0800 (PST), Roland McGrath <roland@frob.com> wrote:
> > > I don't think we need to support a -bsd command-line option.
> >
> > Here is a patch. OK to commit?
>
> As the Hurd maintainer for GCC, you don't need approval to commit this
> patch....
I see -- then let's say I posted it for review, but nobody had any
comments, so I now committed it. :-)
On Mon, 07 Feb 2011 10:28:10 +0100, I wrote:
> I will continue to see whether the GNU/Hurd spec files can be simplified
> / streamlined.
Joseph, is that actually a sensible use of my time, given that you're
generally working on untangling these spec definitions? (I'm of course
not asking you to specifically work on GNU/Hurd bits, so if I'm
misinterpreting your current work, please tell so, and I will continue.)
Grüße,
Thomas
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Add GNU -bsd option from specs to new gnu.opt
2011-02-08 19:25 ` Thomas Schwinge
@ 2011-02-08 19:49 ` Joseph S. Myers
0 siblings, 0 replies; 8+ messages in thread
From: Joseph S. Myers @ 2011-02-08 19:49 UTC (permalink / raw)
To: Thomas Schwinge
Cc: Roland McGrath, gcc-patches, Thomas Bushnell, Samuel Thibault
On Tue, 8 Feb 2011, Thomas Schwinge wrote:
> On Mon, 07 Feb 2011 10:28:10 +0100, I wrote:
> > I will continue to see whether the GNU/Hurd spec files can be simplified
> > / streamlined.
>
> Joseph, is that actually a sensible use of my time, given that you're
> generally working on untangling these spec definitions? (I'm of course
> not asking you to specifically work on GNU/Hurd bits, so if I'm
> misinterpreting your current work, please tell so, and I will continue.)
I think further disentangling (so that linux.h headers are not used for
non-Linux targets) will wait until 4.7 (once the obsoleted targets have
been reviewed, only on x86 will there be non-Linux targets using linux.h
and so only on x86 will the architecture-specific linux*.h need cleaning
up).
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-08 19:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28 1:21 Add GNU -bsd option from specs to new gnu.opt Joseph S. Myers
2011-02-03 16:13 ` Ping " Joseph S. Myers
2011-02-07 0:13 ` Thomas Schwinge
2011-02-07 5:56 ` Roland McGrath
2011-02-07 9:28 ` Thomas Schwinge
2011-02-07 18:14 ` Joseph S. Myers
2011-02-08 19:25 ` Thomas Schwinge
2011-02-08 19:49 ` Joseph S. Myers
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).