Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 2002 17:26:08 -0700
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Alex Zepeda <zipzippy@sonic.net>, Bruce Evans <bde@zeta.org.au>, current@freebsd.org
Subject:   Re: Broken world in rtld-elf...
Message-ID:  <20020613172608.C62694@FreeBSD.ORG>
In-Reply-To: <3D093302.42B0E0F6@mindspring.com>; from tlambert2@mindspring.com on Thu, Jun 13, 2002 at 05:04:19PM -0700
References:  <20020612231541.GA1543@blarf.homeip.net> <20020613121920.T1422-100000@gamplex.bde.org> <20020613191637.GA57841@blarf.homeip.net> <3D093302.42B0E0F6@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Terry Lambert <tlambert2@mindspring.com> escriurères
> Alex Zepeda wrote:
> > On Thu, Jun 13, 2002 at 12:26:05PM +1000, Bruce Evans wrote:
> > > rtld still uses asms with the old, broken/fragile "0" constraint.  This
> > > constraint is especially broken/fragile if things are pessimized by
> > > compiling without optimizations.
> > 
> > D'oh!
> > 
> > Is there any chance of sticking a warning in the makefile if -O0 (or
> > whatever else would cause it to not compile) is present?
> 
> 
> GCCVERS=`gcc -v 2>&1 | grep version | cut -d " " -f 3`
> .if ${GCCVERS} = "3.1"
> .BEGIN:
> 	echo "Optimization with GCC 3.1 is often broken!" >&2
> .endif
> 
> 
> Oh... you wanted to grep "-O" out of the CFLAGS and CXXFLAGS?
> How to do that should be obvious from the above...

Errr, it was with 0 level optimisation that is the problem, not a real
level.  Read carefully what bde said, and look at hte warnings and how
GCC deals with the code in question.

Also, your example is very wrong, read make(1)'s section on dealing with
variables.
-- 
Juli Mallett <jmallett@FreeBSD.org>                  FreeBSD: The Power To Serve
Perception is prejudice / Don't classify me / Accept me as me / Not what you see

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020613172608.C62694>