From owner-freebsd-hackers Sun Nov 2 04:14:17 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA17538 for hackers-outgoing; Sun, 2 Nov 1997 04:14:17 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from postman.opengroup.org (postman.opengroup.org [130.105.1.152]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA17533 for ; Sun, 2 Nov 1997 04:14:14 -0800 (PST) (envelope-from k.#nojunk#keithley@opengroup.org) Received: from kaleb.keithley.belmont.ma.us (horizon1.camb.opengroup.org [130.105.39.25]) by postman.opengroup.org (8.8.6/8.8.6) with SMTP id HAA12056 for ; Sun, 2 Nov 1997 07:13:46 -0500 (EST) Message-ID: <345C27BF.446B9B3D@opengroup.org> Date: Sun, 02 Nov 1997 02:11:59 -0500 From: "Kaleb S. KEITHLEY" Organization: The Open Group X-Mailer: Mozilla 3.04Gold (X11; I; FreeBSD 2.2.2-RELEASE i386) MIME-Version: 1.0 To: hackers@freefall.FreeBSD.org Subject: building tools with -g is too hard Content-Type: multipart/mixed; boundary="------------59E2B60015FB7483794BDF32" Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk This is a multi-part message in MIME format. --------------59E2B60015FB7483794BDF32 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm trying to build a debuggable ld so I can find out why it SEGVs when linking a program with a large library (libX11) which itself has been built debuggable. That following patch lets me go, e.g., to my /usr/src/gnu/usr.bin/ld (or where ever) and type `make CDEBUGFLAGS=-g` and get a debuggable version of whatever I'm building, without resorting to editing the Makefile every time I want to do this (which is pretty rare, but that's beside the point.) This patch was made on a 2.2.2R system. --------------59E2B60015FB7483794BDF32 Content-Type: text/plain; charset=us-ascii; name="sys.mk.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sys.mk.patch" *** /usr/share/mk/sys.mk.orig Sun Nov 2 01:41:44 1997 --- /usr/share/mk/sys.mk Sun Nov 2 01:42:29 1997 *************** *** 38,44 **** .else CC ?= cc .endif ! CFLAGS ?= -O CXX ?= c++ CXXFLAGS ?= ${CXXINCLUDES} ${CFLAGS} --- 38,45 ---- .else CC ?= cc .endif ! CDEBUGFLAGS ?= -O ! CFLAGS ?= ${CDEBUGFLAGS} CXX ?= c++ CXXFLAGS ?= ${CXXINCLUDES} ${CFLAGS} --------------59E2B60015FB7483794BDF32--