From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31350 invoked by alias); 8 Dec 2010 15:25:14 -0000 Received: (qmail 31334 invoked by uid 22791); 8 Dec 2010 15:25:13 -0000 X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtprelay04.ispgateway.de (HELO smtprelay04.ispgateway.de) (80.67.31.38) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Dec 2010 15:25:08 +0000 Received: from [87.180.75.14] (helo=stokes.schwinge.homeip.net) by smtprelay04.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1PQLtB-0002DF-La for gcc-patches@gcc.gnu.org; Wed, 08 Dec 2010 16:25:05 +0100 Received: (qmail 7878 invoked from network); 8 Dec 2010 15:24:59 -0000 Received: from unknown (192.168.111.252) by stokes.schwinge.homeip.net with QMQP; 8 Dec 2010 15:24:59 -0000 Received: (nullmailer pid 23922 invoked by uid 1000); Wed, 08 Dec 2010 15:24:58 -0000 From: Thomas Schwinge 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 Message-Id: <1291821876-23891-1-git-send-email-thomas@schwinge.name> To: gcc-patches@gcc.gnu.org X-Df-Sender: thomas@schwinge.name Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg00670.txt.bz2 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 (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 . 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)