From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3986 invoked by alias); 17 Jun 2005 12:10:56 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 3711 invoked by uid 22791); 17 Jun 2005 12:10:48 -0000 Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.192) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 17 Jun 2005 12:10:48 +0000 Received: by rproxy.gmail.com with SMTP id f1so296444rne for ; Fri, 17 Jun 2005 05:10:46 -0700 (PDT) Received: by 10.38.161.29 with SMTP id j29mr831550rne; Fri, 17 Jun 2005 05:10:46 -0700 (PDT) Received: by 10.38.10.19 with HTTP; Fri, 17 Jun 2005 05:10:46 -0700 (PDT) Message-ID: Date: Fri, 17 Jun 2005 12:10:00 -0000 From: Liu Haibin Reply-To: Liu Haibin To: gcc-help@gcc.gnu.org Subject: How to compile gcc with no optimization and "-gdwarf-2 -g3" Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-SW-Source: 2005-06/txt/msg00126.txt.bz2 Hi, I want to build the whole gcc with "-gdwarf-2 -g3" and without any optimization, so that I can debug gcc and see all the macros. I'm not familiar with configure and make, so I tried to change all the CFLAGS and others flags to "-gdwarf-2 -g3" in all the related files (configure, configure.in, Makefile, Makefile.in, and Makefile.tpl). I even changed the src/gcc/configure, src/gcc/Makefile.in and other files. Basically, as long as I see something like "-g -O2", I change it to "-gdwarf-2 -g3". And I configure it with # ./configure --with-dwarf2 # make But when it's compiling, I still see the -O2 optimization. And I tried # ./configure --with-dwarf2 # make CFLAGS=3D'-gdwarf-2 -g3' LIBCFLAGS=3D'-gdwarf-2 -g3' BOOT_CFLAGS=3D'-gdwarf-2 -g3' It's still the same. I can see the -O2 optimization. When I debug cc1, I cannot see the macros. (I applied the patch to gdb so that it is able to see macros) How should I do to compile gcc with no optimization and "-gdwarf-2 -g3"? Thanks. Regards, Timothy