From owner-freebsd-bugs Thu Apr 2 18:00:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA25636 for freebsd-bugs-outgoing; Thu, 2 Apr 1998 18:00:04 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA25597; Thu, 2 Apr 1998 18:00:02 -0800 (PST) (envelope-from gnats) Received: from localhost.Stanford.EDU (sjx-ca81-15.ix.netcom.com [207.94.112.47]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA25507 for ; Thu, 2 Apr 1998 17:59:26 -0800 (PST) (envelope-from yergeau@localhost.Stanford.EDU) Received: (from yergeau@localhost) by localhost.Stanford.EDU (8.8.7/8.8.2) id RAA06174; Thu, 2 Apr 1998 17:59:19 -0800 (PST) Message-Id: <199804030159.RAA06174@localhost.Stanford.EDU> Date: Thu, 2 Apr 1998 17:59:19 -0800 (PST) From: yergeau@gloworm.stanford.edu Reply-To: yergeau@gloworm.stanford.edu To: FreeBSD-gnats-submit@FreeBSD.ORG Cc: yergeau@gloworm.stanford.edu X-Send-Pr-Version: 3.2 Subject: bin/6198: /bin/ld's demangling of C++ names breaks -frepo feature of egcs Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6198 >Category: bin >Synopsis: demangling C++ names breaks the Cygnus -frepo hack >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Apr 2 18:00:01 PST 1998 >Last-Modified: >Originator: Dan Yergeau >Organization: >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: FreeBSD 2.2.5-RELEASE gcc-2.7.2.x with the gcc-2.7.2-repo-bsd.patch or egcs-1.0.2 with tlink.c replaced by the one from the above patch >Description: If /usr/bin/ld demangles C++ names, the automatic template instantiation feature added by the Cygnus -frepo/tlink hack (also in egcs) breaks. The -frepo/tlink hack relies on raw encoded names being reported as missing symbols so that collect2 knows what needs to be recompiled in order to instantiate templates. >How-To-Repeat: >Fix: Although it is nice to have the names demangled automatically, ld is probably not the best place to do it (or, at least not as a compiled-in default). I'll suggest either 1) altering the current hardcoded demangling to be selectable by a ld option or an environment variable (off by default, but would be turned on by the /usr/bin/{gcc,c++,g++} drivers). 2) disabling the current hardcoded demangling and just alter the compiler driver to pipe ld output through c++filt (or redirect to a file and filter that file). The only potential gotcha is in handling stdout vs. stderr. No other ld that I know of tries to demangle C++ names. Compilers that appear to do so (e.g. Sun's SC4.x CC) seem to use the second approach. I'm a little suprised that neither FSF nor Cygnus have implemented demangling ld errors. Dan >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message