public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@schwinge.name>
To: gcc-patches@gcc.gnu.org
To: gcc-patches@gcc.gnu.org
Cc: maxim@codesourcery.com, joseph@codesourcery.com, thomas@codesourcery.com
Subject: [PATCH] glibc / uclibc / bionic switch vs. non-Linux, GNU-based systems
Date: Wed, 08 Dec 2010 15:54:00 -0000	[thread overview]
Message-ID: <1291821876-23891-1-git-send-email-thomas@schwinge.name> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]

Hallo!

This patch makes GNU/Hurd buildable again.  Previously, I had made this
Linux libc switch depend on Linux kernel only, but when Maxim added
support for bionic on 2010-05-27 in r159917, then it broke again, and I'm
now finally giving in...  Let the libc options be there at run-time; we
simply won't use them.

gcc/

	PR target/28102
	* config.gcc <GNU based systems> (extra_options): Include linux.opt
	unconditionally.

OK to commit?


This issue is very likely to also affect (in the same way of being
un-buildable at the moment) other GNU-based configurations (kFreeBSD,
OpenSolaris), as suspected by Joseph and me.


The underlying problem is still as stated in
<http://gcc.gnu.org/ml/gcc/2007-11/msg00289.html>.  Contrary to what I
stated in there, I have not yet continued to work on untangling this.


I had come up with this patch already some weeks ago, but didn't post it
at that time, as I'm currently not able to GCC's testsuite tom
completion.  The testsuite will reproducibly hang around the moment that
an expect process is doing its 65535's fork invocation.  This is a bug,
and I'm (slowly, due to ENOTIME...) working on fixing this.  (There is a
port leak in glibc in the Hurd's fork implementation, and after 65535
leaked ports in one process, the microkernel will deny any further.)
Now, Joseph has prompted me to submit the patch anyways, for he ran into
the same problem.  The patch allows the build to succeed (last tested
with the Git mirror's 1fb531df5602228c903ff640ab6ecac3b8107a1a
(2010-11-27) sources), and I'm confident that it's correct, even without
a complete testsuite run.


Grüße,
 Thomas

---
 gcc/config.gcc |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 646e676..fb76d17 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -558,12 +558,9 @@ case ${target} in
   esac
   # glibc / uclibc / bionic switch.
   # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
-  case $target in
-    *linux*)
-      extra_options="$extra_options linux.opt";;
-    *)
-      tm_defines="$tm_defines OPTION_GLIBC=1";;
-  esac
+  # But then, providing the options doesn't hurt either, and simplifies the
+  # underlying logic.
+  extra_options="$extra_options linux.opt"
   case $target in
     *-*-*android*)
       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
-- 
tg: (2f78a7c..) hurd/config/libc (depends on: master)

             reply	other threads:[~2010-12-08 15:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 15:54 Thomas Schwinge [this message]
2010-12-08 16:45 ` Joseph S. Myers
2010-12-08 16:58   ` Thomas Schwinge
2010-12-08 17:28     ` Joseph S. Myers
2010-12-10 12:34   ` Thomas Schwinge
2010-12-14 18:09   ` Ping " Joseph S. Myers
2010-12-20 14:46     ` Ping^2 " Joseph S. Myers
2010-12-20 17:04   ` Maxim Kuvyrkov
2010-12-20 21:06     ` Mark Mitchell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291821876-23891-1-git-send-email-thomas@schwinge.name \
    --to=thomas@schwinge.name \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=maxim@codesourcery.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).