From owner-freebsd-current Thu Jun 13 17:26:12 2002 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id 6333337B439; Thu, 13 Jun 2002 17:26:08 -0700 (PDT) Date: Thu, 13 Jun 2002 17:26:08 -0700 From: Juli Mallett To: Terry Lambert Cc: Alex Zepeda , Bruce Evans , current@freebsd.org Subject: Re: Broken world in rtld-elf... Message-ID: <20020613172608.C62694@FreeBSD.ORG> References: <20020612231541.GA1543@blarf.homeip.net> <20020613121920.T1422-100000@gamplex.bde.org> <20020613191637.GA57841@blarf.homeip.net> <3D093302.42B0E0F6@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <3D093302.42B0E0F6@mindspring.com>; from tlambert2@mindspring.com on Thu, Jun 13, 2002 at 05:04:19PM -0700 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , X-Affiliated-Projects: FreeBSD, xMach, ircd-hybrid-7 X-Towel: Yes Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Terry Lambert 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 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