From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28302 invoked by alias); 15 Nov 2004 22:25:01 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28208 invoked from network); 15 Nov 2004 22:24:48 -0000 Received: from unknown (HELO mail-out4.apple.com) (17.254.13.23) by sourceware.org with SMTP; 15 Nov 2004 22:24:48 -0000 Received: from mailgate2.apple.com (a17-128-100-204.apple.com [17.128.100.204]) by mail-out4.apple.com (8.12.11/8.12.11) with ESMTP id iAFMVBET022808 for ; Mon, 15 Nov 2004 14:31:11 -0800 (PST) Received: from relay2.apple.com (relay2.apple.com) by mailgate2.apple.com (Content Technologies SMTPRS 4.3.14) with ESMTP id ; Mon, 15 Nov 2004 14:24:47 -0800 Received: from greed.local ([17.112.107.93]) by relay2.apple.com (8.12.11/8.12.11) with ESMTP id iAFMOfvp024509; Mon, 15 Nov 2004 14:24:42 -0800 (PST) Received: by greed.local (Postfix, from userid 501) id 460A0350972; Mon, 15 Nov 2004 14:24:52 -0800 (PST) To: Zack Weinberg Cc: gcc@gcc.gnu.org Subject: Re: Darwin assert.h / shared libgcc mess References: <87oehyq1km.fsf@codesourcery.com> From: Geoffrey Keating Date: Mon, 15 Nov 2004 22:42:00 -0000 In-Reply-To: <87oehyq1km.fsf@codesourcery.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2004-11/txt/msg00498.txt.bz2 Zack Weinberg writes: > 1) Ship a *correct* assert.h, as a replace-entire-file fixincludes > edit, which recognizes the broken Darwin /usr/include/assert.h. If > I can swing it, it will also subsume the buggy > broken_assert_{stdio,stdlib} fixes. This corrected assert.h will > continue to use __eprintf. Alternatively, if people prefer, it > could use the more recent convention of __assert, per, eg. FreeBSD > /usr/include/assert.h. (The advantage of this is there aren't > copies of the "%s:%d:%s: assertion failed: %s" string constant > everywhere that uses assert.) This sounds like a good idea. Be sure that the fixincludes only triggers on the broken assert.h (looking for __eprintf is good enough on Darwin; or for the absence of __func__). > 2) Put __eprintf back into the shared libgcc, as an exported symbol, > for all !inhibit_libc targets, so that fixincludes can rely on its > being there. (If we instead use __assert, then __eprintf will > remain a static-library-only backward compatibility symbol.) Is this really necessary? I'd rather have __eprintf linked into only those apps that need it. > 3) For the sake of future flexibility, move the hardwired list of > static-and-shared functions from mklibgcc.in to the Makefile so > that it can be adjusted in t-fragments. > > 4) Add the ability to add a leading underscore to all symbol names to > mkmap-flat.awk and mkmap-symver.awk. Also add the ability to > delete symbols from the list, in a target-specific .ver file. > Update Darwin and SH target configuration to match, and delete the > out-of-sync libgcc-darwin.ver and config/sh/libgcc-std.ver. > > 5) Determine for certain whether or not Darwin ld supports symbol > versioning. Correct t-slibgcc-darwin to use the appropriate mkmap > file and to actually apply the map to the generated libgcc.dylib. The Darwin ld does not support symbol versioning. You can safely delete any versioning files for Darwin (so long as it doesn't break the makefiles). > i) Nudzh the Darwin developers to put __assert in libSystem and > provide a correct /usr/include/assert.h (y'all can just copy it > from FreeBSD! Only with attribute noreturn, please). In Tiger, /usr/include/assert.h will be provided by Libc, not the compiler, and it will use __assert.