From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 4 02:40:06 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 337B637B401 for ; Fri, 4 Apr 2003 02:40:06 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D75A43FAF for ; Fri, 4 Apr 2003 02:40:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h34Ae4Up070004 for ; Fri, 4 Apr 2003 02:40:04 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h34Ae4pc070003; Fri, 4 Apr 2003 02:40:04 -0800 (PST) Resent-Date: Fri, 4 Apr 2003 02:40:04 -0800 (PST) Resent-Message-Id: <200304041040.h34Ae4pc070003@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Don Lewis Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B1B137B401; Fri, 4 Apr 2003 02:37:09 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2848543FA3; Fri, 4 Apr 2003 02:37:08 -0800 (PST) (envelope-from dl@scratch.catspoiler.org) Received: from scratch.catspoiler.org (scratch.catspoiler.org [192.168.101.3]) by gw.catspoiler.org (8.12.6/8.12.6) with ESMTP id h34Ab78V047269; Fri, 4 Apr 2003 02:37:07 -0800 (PST) (envelope-from dl@scratch.catspoiler.org) Received: from scratch.catspoiler.org (localhost [127.0.0.1]) h34Ab0ks045133; Fri, 4 Apr 2003 02:37:00 -0800 (PST) (envelope-from dl@scratch.catspoiler.org) Received: (from dl@localhost) by scratch.catspoiler.org (8.12.9/8.12.9/Submit) id h34Ab00A045132; Fri, 4 Apr 2003 02:37:00 -0800 (PST) Message-Id: <200304041037.h34Ab00A045132@scratch.catspoiler.org> Date: Fri, 4 Apr 2003 02:37:00 -0800 (PST) From: Don Lewis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: obrien@FreeBSD.org Subject: i386/50598: gcc -pg -fPIC creates garbage assembly output [patch] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Don Lewis List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2003 10:40:06 -0000 >Number: 50598 >Category: i386 >Synopsis: gcc -pg -fPIC creates garbage assembly output [patch] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 04 02:40:04 PST 2003 >Closed-Date: >Last-Modified: >Originator: Don Lewis >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD scratch.catspoiler.org 5.0-CURRENT FreeBSD 5.0-CURRENT #57: Wed Apr 2 20:46:56 PST 2003 dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB i386 FreeBSD 5.0 with gcc 3.2.1 or 3.2.2 inserts garbage into its assembly code when the gcc -pg and -fPIC options are used together. The assembler complains about syntax errors in the assembly code. The problem is caused by a leftover %s in a format string that was not removed when it's matching parameter was removed when a.out support was removed from the compiler. The error crept in to rev 1.59 of src/contrib/gcc/config/i386/freebsd.h. Index: contrib/gcc/config/i386/freebsd.h =================================================================== RCS file: /home/ncvs/src/contrib/gcc/config/i386/freebsd.h,v retrieving revision 1.59 diff -u -r1.59 freebsd.h --- contrib/gcc/config/i386/freebsd.h 26 Nov 2002 18:25:20 -0000 1.59 +++ contrib/gcc/config/i386/freebsd.h 3 Apr 2003 09:53:21 -0000 @@ -137,7 +137,7 @@ #define FUNCTION_PROFILER(FILE, LABELNO) \ do { \ if (flag_pic) \ - fprintf ((FILE), "\tcall *.mcount%s@GOT(%%ebx)\n"); \ + fprintf ((FILE), "\tcall *.mcount@GOT(%%ebx)\n"); \ else \ fprintf ((FILE), "\tcall .mcount\n"); \ } while (0) >Description: >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: