From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18631 invoked by alias); 6 Dec 2008 15:31:15 -0000 Received: (qmail 18620 invoked by uid 22791); 6 Dec 2008 15:31:14 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 06 Dec 2008 15:30:17 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id mB6FToms009811; Sat, 6 Dec 2008 16:29:51 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id mB6FToM6027310; Sat, 6 Dec 2008 16:29:50 +0100 (CET) Date: Sat, 06 Dec 2008 15:31:00 -0000 Message-Id: <200812061529.mB6FToM6027310@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20081205184123.GF5382@adacore.com> (message from Joel Brobecker on Fri, 5 Dec 2008 19:41:23 +0100) Subject: Re: [RFA/commit] pre-initialize python-value.c:values_in_python (bug in MacOS linker) References: <20081205184123.GF5382@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00110.txt.bz2 > Date: Fri, 5 Dec 2008 19:41:23 +0100 > From: Joel Brobecker > > Hello, > > We noticed that GDB does not build on x86-macos and x86_64-macos when > configured --without-python (we found this out because one of our > machine no longer has python installed on it). The problem is that > the linker complains that it cannot file values_in_python, referenced > from value.c. This is a bug, since we verified that the symbol was > defined inside python-value.o which was also part of the archive. > We think that this might be related to the fact that the symbol is > defined as "C" (common). We changed the code to add an initial value > of NULL (which in C is strictly equivalent to the current code), > which changed our variable to the Data section and, ta da, allowed > GDB to link. > > 2008-12-05 Joel Brobecker > > * python/python-value.c (values_in_python): Add specific initialization > to NULL to work-around a MacOS linker bug. > > Tested on x86-linux, both using --with-python and --without-python. > No regression. > > I think this is pretty safe and safe contained, and doesn't reduce > the quality of the code, so I'm planning on committing this on Monday > when back from weekend holiday (I'm in Europe). Any objection? Should > I add a comment? Ugh, Yuck. Any idea if this is fixed in more recent versions of Mac OS X?