lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090718065903.GA7579@merkur.ravnborg.org>
Date:	Sat, 18 Jul 2009 08:59:03 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	Frans Pop <elendil@...net.nl>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	akpm@...ux-foundation.org, torvalds@...ux-foundation.org,
	linux-kbuild@...r.kernel.org, barryn@...ox.com
Subject: Re: [PATCH,v2] Only add '-fwrapv' to gcc CFLAGS for gcc 4.2 and
	later

On Sat, Jul 18, 2009 at 12:43:51AM +0200, Frans Pop wrote:
> On Saturday 18 July 2009, Sam Ravnborg wrote:
> > >  # disable invalid "can't wrap" optimizations for signed / pointers
> > > -KBUILD_CFLAGS	+= $(call cc-option,-fwrapv)
> > > +KBUILD_CFLAGS  += $(shell if [ $(call cc-version) -ge 0402 ]; then \
> > > +		    echo $(call cc-option,-fwrapv); fi ;)
> >
> > This would be simpler if you use:
> 
> That's now academic as Linus decided on a different fix.
OK

> 
> > # cc-ifversion
> > # Usage:  EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
> > cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3))
> >
> > We have only one user at the moment so I understand why you missed it.
> 
> :-)
> 
> I based my patch on arch/x86/Makefile:
> 35:        KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
> 36:                echo $(call cc-option,-fno-unit-at-a-time); fi ;)
> 
> Guess that could be improved to use cc-ifversion then.
Yes, please...

> 
> And a quick git grep gives a few other potential candidates:
> arch/ia64/Makefile:44:ifeq ($(call cc-version),0304)
> arch/parisc/Makefile:129:       @if test "$(call cc-version)" -lt "0303"; then \
> arch/powerpc/Makefile:80:GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
> arch/powerpc/Makefile:219:      @if test "$(call cc-version)" = "0304" ; then \
> arch/um/Makefile-i386:38:KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
Same goes for these.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ