glibc / uclibc / bionic switch vs. non-Linux, GNU-based systems
diff mbox

Message ID
State Superseded, archived
Headers show

Commit Message

Thomas Schwinge Dec. 8, 2010, 3:24 p.m. UTC

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.


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

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


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

diff mbox

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
   # 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
       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"