From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19572 invoked by alias); 2 Jan 2010 10:09:46 -0000 Received: (qmail 19550 invoked by uid 48); 2 Jan 2010 10:09:34 -0000 Date: Sat, 02 Jan 2010 10:09:00 -0000 Subject: [Bug c/42579] New: [PATCH] support for obtaining file basename X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rmh dot gcc at aybabtu dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg00092.txt.bz2 Please consider this patch. It adds support for obtaining file basename via __FILE_BASENAME__. This would be used by GNU GRUB. I'll provide some explanation on why this is very necessary for us: - Bootloader code is very critical; a bug can render system unbootable. Additionally, it needs to support a wide range of hardware and firmware. Because of this, we put extensive debugging support into GRUB. Debug statements currently rely on __FILE__. - We want to support $srcdir != $objdir build setups, and continue supporting them. - Some parts of bootstrap code tend to be very size constrained. Every byte counts, and each debug statement is taking unnecessary space because accessing a file in $srcdir requires either an absolute path or at least a number of '../' components (in Debian, that would be two of them). Because of this, I would find it very useful if GCC provided __FILE_BASENAME__, or at least an equivalent facility. -- Summary: [PATCH] support for obtaining file basename Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rmh dot gcc at aybabtu dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42579