public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] glibc / uclibc / bionic switch vs. non-Linux, GNU-based systems
@ 2010-12-08 15:54 Thomas Schwinge
  2010-12-08 16:45 ` Joseph S. Myers
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Schwinge @ 2010-12-08 15:54 UTC (permalink / raw)
  To: gcc-patches, gcc-patches; +Cc: maxim, joseph, thomas

[-- 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)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-12-20 18:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-08 15:54 [PATCH] glibc / uclibc / bionic switch vs. non-Linux, GNU-based systems Thomas Schwinge
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

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).