This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: How to using -O rather than -O2 when building binutils 2.11?
- To: "David O'Brien" <obrien at FreeBSD dot org>
- Subject: Re: How to using -O rather than -O2 when building binutils 2.11?
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Sun, 1 Apr 2001 14:01:39 +1000 (EST)
- cc: binutils at sourceware dot cygnus dot com
On Sat, 31 Mar 2001, David O'Brien wrote:
> On Sun, Apr 01, 2001 at 01:09:56PM +1000, Alan Modra wrote:
> > On Sat, 31 Mar 2001, David O'Brien wrote:
> >
> > > FreeBSD/Alpha's Gcc 2.95.2 compiler has a very buggy optimizer. -O2
> > > produces bad code. So I want to use only -O when building any targeted
> > > version of Binutils on this platform. How does one do that?
> >
> > CFLAGS="-g -O" CXXFLAGS="-g -O" configure ...
>
> I knew about this way, but I thought the mt-* and mh-* headers were a way
> to hardcode these values so one didn't have to depend on having
> environmental vars set.
They are supposed to. I just did a quick check, and made a
config/mh-linux with suitable tweaks in configure.in I'm quite puzzled by
the results....
$ cat /src/binutils-2.11/config/mh-linux
CFLAGS="-g -O"
CXXFLAGS="-g -O"
HEY_WHATS_GOING_ON_HERE=confused
and the top level Makefile has this:
#### host and target specific makefile fragments come in here.
# When using glibc 2 on Linux we must always use vtable thunks.
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -fvtable-thunks -D_GNU_SOURCE
CFLAGS = -g -O2
CXXFLAGS = -g -O2
HEY_WHATS_GOING_ON_HERE=confused
###
CXXFLAGS_FOR_TARGET comes from config/mt-linux. How did CFLAGS get
changed??
Alan
--
Linuxcare