public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-04-05  8:22 Fabian Groffen (grobian)
  0 siblings, 0 replies; 64+ messages in thread
From: Fabian Groffen (grobian) @ 2009-04-05  8:22 UTC (permalink / raw
  To: gentoo-commits

grobian     09/04/05 08:22:29

  Modified:             flag-o-matic.eclass
  Log:
  remove the Darwin hook, it seemingly has been obsoleted

Revision  Changes    Path
1.134                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.134&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.134&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.133&r2=1.134

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -r1.133 -r1.134
--- flag-o-matic.eclass	4 Apr 2009 17:57:54 -0000	1.133
+++ flag-o-matic.eclass	5 Apr 2009 08:22:29 -0000	1.134
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.133 2009/04/04 17:57:54 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.134 2009/04/05 08:22:29 grobian Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -53,12 +53,6 @@
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
 		-msecure-plt -m*-toc -D* -U*"
 	
-	# killing these two on OSX/Intel will disable SSE, resulting in failing
-	# compilations, as the headers expect SSE to be enabled (Apple knows what
-	# hardware they run on afterall, don't they?)
-	[[ ${CHOST} == i?86-apple-darwin* ]] \
-		&& ALLOWED_FLAGS="${ALLOWED_FLAGS} -march=prescott -march=nocona"
-
 	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's
 	export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks"






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2015-05-24  7:05 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2015-05-24  7:05 UTC (permalink / raw
  To: gentoo-commits

vapier      15/05/24 07:05:30

  Modified:             flag-o-matic.eclass
  Log:
  add newer -fbounds-check form to the allowed flag list #530068 by Sebastian Pipping

Revision  Changes    Path
1.206                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.206&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.206&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.205&r2=1.206

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -r1.205 -r1.206
--- flag-o-matic.eclass	6 May 2015 07:04:53 -0000	1.205
+++ flag-o-matic.eclass	24 May 2015 07:05:30 -0000	1.206
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.205 2015/05/06 07:04:53 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.206 2015/05/24 07:05:30 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -26,7 +26,7 @@
 	ALLOWED_FLAGS="-pipe"
 	ALLOWED_FLAGS+=" -O -O1 -O2 -Os -Og -mcpu -march -mtune"
 	ALLOWED_FLAGS+=" -fstack-protector* -fsanitize=*"
-	ALLOWED_FLAGS+=" -fbounds-checking -fno-strict-overflow"
+	ALLOWED_FLAGS+=" -fbounds-check -fbounds-checking -fno-strict-overflow"
 	ALLOWED_FLAGS+=" -fno-PIE -fno-pie -nopie -fno-unit-at-a-time"
 	ALLOWED_FLAGS+=" -g -g[0-9] -ggdb -ggdb[0-9] -gdwarf-* gstabs -gstabs+"
 	ALLOWED_FLAGS+=" -fno-ident -fpermissive -frecord-gcc-switches"
@@ -35,7 +35,7 @@
 
 	# allow a bunch of flags that negate features / control ABI
 	ALLOWED_FLAGS+=" -fno-stack-protector* -fabi-version=* \
-		-fno-strict-aliasing -fno-bounds-checking -fstrict-overflow \
+		-fno-strict-aliasing -fno-bounds-check -fno-bounds-checking -fstrict-overflow \
 		-fno-omit-frame-pointer -fno-builtin*"
 	ALLOWED_FLAGS+=" -mregparm -mno-app-regs -mapp-regs -mno-mmx -mno-sse \
 		-mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 \





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2015-05-06  7:04 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2015-05-06  7:04 UTC (permalink / raw
  To: gentoo-commits

vapier      15/05/06 07:04:53

  Modified:             flag-o-matic.eclass
  Log:
  make flag testing work for clang too crbug.com/474652

Revision  Changes    Path
1.205                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.205&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.205&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.204&r2=1.205

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -r1.204 -r1.205
--- flag-o-matic.eclass	31 Dec 2014 08:26:48 -0000	1.204
+++ flag-o-matic.eclass	6 May 2015 07:04:53 -0000	1.205
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.204 2014/12/31 08:26:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.205 2015/05/06 07:04:53 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -415,13 +415,18 @@
 
 	[[ -z ${comp} || -z ${flag} ]] && return 1
 
-	# use -c so we can test the assembler as well
-	local PROG=$(tc-get${comp})
-	if ${PROG} -c -o /dev/null -x${lang} - < /dev/null > /dev/null 2>&1 ; then
-		${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null \
-			> /dev/null 2>&1
+	local cmdline=(
+		$(tc-get${comp})
+		# Clang will warn about unknown gcc flags but exit 0.
+		# Need -Werror to force it to exit non-zero.
+		-Werror
+		# Use -c so we can test the assembler as well.
+		-c -o /dev/null
+	)
+	if "${cmdline[@]}" -x${lang} - </dev/null >/dev/null 2>&1 ; then
+		"${cmdline[@]}" "${flag}" -x${lang} - </dev/null >/dev/null 2>&1
 	else
-		${PROG} "${flag}" -c -o /dev/null /dev/null > /dev/null 2>&1
+		"${cmdline[@]}" "${flag}" -c -o /dev/null /dev/null >/dev/null 2>&1
 	fi
 }
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2014-12-31  8:26 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2014-12-31  8:26 UTC (permalink / raw
  To: gentoo-commits

vapier      14/12/31 08:26:48

  Modified:             flag-o-matic.eclass
  Log:
  add -fsanitize=* to the allowed flag list #530070 by Sebastian Pipping

Revision  Changes    Path
1.204                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.204&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.204&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.203&r2=1.204

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.203
retrieving revision 1.204
diff -u -r1.203 -r1.204
--- flag-o-matic.eclass	1 Nov 2014 03:45:53 -0000	1.203
+++ flag-o-matic.eclass	31 Dec 2014 08:26:48 -0000	1.204
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.203 2014/11/01 03:45:53 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.204 2014/12/31 08:26:48 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -25,7 +25,7 @@
 setup-allowed-flags() {
 	ALLOWED_FLAGS="-pipe"
 	ALLOWED_FLAGS+=" -O -O1 -O2 -Os -Og -mcpu -march -mtune"
-	ALLOWED_FLAGS+=" -fstack-protector*"
+	ALLOWED_FLAGS+=" -fstack-protector* -fsanitize=*"
 	ALLOWED_FLAGS+=" -fbounds-checking -fno-strict-overflow"
 	ALLOWED_FLAGS+=" -fno-PIE -fno-pie -nopie -fno-unit-at-a-time"
 	ALLOWED_FLAGS+=" -g -g[0-9] -ggdb -ggdb[0-9] -gdwarf-* gstabs -gstabs+"





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2014-11-01  3:45 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2014-11-01  3:45 UTC (permalink / raw
  To: gentoo-commits

vapier      14/11/01 03:45:53

  Modified:             flag-o-matic.eclass
  Log:
  add -nopie to the allow flag list #527214

Revision  Changes    Path
1.203                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.203&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.203&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.202&r2=1.203

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -r1.202 -r1.203
--- flag-o-matic.eclass	11 Aug 2014 00:36:05 -0000	1.202
+++ flag-o-matic.eclass	1 Nov 2014 03:45:53 -0000	1.203
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.202 2014/08/11 00:36:05 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.203 2014/11/01 03:45:53 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -27,7 +27,7 @@
 	ALLOWED_FLAGS+=" -O -O1 -O2 -Os -Og -mcpu -march -mtune"
 	ALLOWED_FLAGS+=" -fstack-protector*"
 	ALLOWED_FLAGS+=" -fbounds-checking -fno-strict-overflow"
-	ALLOWED_FLAGS+=" -fno-PIE -fno-pie -fno-unit-at-a-time"
+	ALLOWED_FLAGS+=" -fno-PIE -fno-pie -nopie -fno-unit-at-a-time"
 	ALLOWED_FLAGS+=" -g -g[0-9] -ggdb -ggdb[0-9] -gdwarf-* gstabs -gstabs+"
 	ALLOWED_FLAGS+=" -fno-ident -fpermissive -frecord-gcc-switches"
 	ALLOWED_FLAGS+=" -fdiagnostics*"





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2014-08-11  0:36 Joshua Kinard (kumba)
  0 siblings, 0 replies; 64+ messages in thread
From: Joshua Kinard (kumba) @ 2014-08-11  0:36 UTC (permalink / raw
  To: gentoo-commits

kumba       14/08/11 00:36:05

  Modified:             flag-o-matic.eclass
  Log:
  Added -mfix-r10000/-mno-fix-r10000 to ALLOWED_FLAGS for MIPS.

Revision  Changes    Path
1.202                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.202&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.202&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.201&r2=1.202

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -r1.201 -r1.202
--- flag-o-matic.eclass	11 Jul 2014 08:21:58 -0000	1.201
+++ flag-o-matic.eclass	11 Aug 2014 00:36:05 -0000	1.202
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.201 2014/07/11 08:21:58 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.202 2014/08/11 00:36:05 kumba Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -47,7 +47,7 @@
 		-mno-faster-structs -mfaster-structs -m32 -m64 -mx32 -mabi \
 		-mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 -mcmodel \
 		-mstack-bias -mno-stack-bias -msecure-plt -m*-toc -mfloat-abi \
-		-D* -U*"
+		-mfix-r10000 -mno-fix-r10000 -D* -U*"
 
 	# 4.5
 	ALLOWED_FLAGS+=" -mno-fma4 -mno-movbe -mno-xop -mno-lwp"





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2014-02-02 22:26 Thomas Sachau (tommy)
  0 siblings, 0 replies; 64+ messages in thread
From: Thomas Sachau (tommy) @ 2014-02-02 22:26 UTC (permalink / raw
  To: gentoo-commits

tommy       14/02/02 22:26:13

  Modified:             flag-o-matic.eclass
  Log:
  Add missing leading spaces for ALLOWED_FLAGS for 4.8 and 4.9

Revision  Changes    Path
1.197                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.197&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.197&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.196&r2=1.197

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -r1.196 -r1.197
--- flag-o-matic.eclass	1 Feb 2014 18:52:32 -0000	1.196
+++ flag-o-matic.eclass	2 Feb 2014 22:26:13 -0000	1.197
@@ -1,6 +1,6 @@
 # Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.196 2014/02/01 18:52:32 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.197 2014/02/02 22:26:13 tommy Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -56,9 +56,9 @@
 	# 4.7
 	ALLOWED_FLAGS+=" -mno-avx2 -mno-bmi2 -mno-fma -mno-lzcnt"
 	# 4.8
-	ALLOWED_FLAGS+="-mno-fxsr -mno-rtm -mno-xsave -mno-xsaveopt"
+	ALLOWED_FLAGS+=" -mno-fxsr -mno-rtm -mno-xsave -mno-xsaveopt"
 	# 4.9
-	ALLOWED_FLAGS+="-mno-avx512cd -mno-avx512er -mno-avx512f -mno-avx512pf -mno-sha"
+	ALLOWED_FLAGS+=" -mno-avx512cd -mno-avx512er -mno-avx512f -mno-avx512pf -mno-sha"
 
 	# CPPFLAGS and LDFLAGS
 	ALLOWED_FLAGS+=" -I* -L* -R* -Wl,*"





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2013-10-12 19:50 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2013-10-12 19:50 UTC (permalink / raw
  To: gentoo-commits

vapier      13/10/12 19:50:02

  Modified:             flag-o-matic.eclass
  Log:
  strip-flags: log changes when they happen for user to see #487104

Revision  Changes    Path
1.190                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.190&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.190&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.189&r2=1.190

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -r1.189 -r1.190
--- flag-o-matic.eclass	30 Sep 2013 06:39:56 -0000	1.189
+++ flag-o-matic.eclass	12 Oct 2013 19:50:02 -0000	1.190
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.189 2013/09/30 06:39:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.190 2013/10/12 19:50:02 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -392,6 +392,9 @@
 			new+=( -O2 )
 		fi
 
+		if [[ ${!var} != "${new[*]}" ]] ; then
+			einfo "strip-flags: ${var}: changed '${!var}' to '${new[*]}'"
+		fi
 		eval export ${var}=\""${new[*]}"\"
 	done
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2013-09-30  6:39 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2013-09-30  6:39 UTC (permalink / raw
  To: gentoo-commits

vapier      13/09/30 06:39:56

  Modified:             flag-o-matic.eclass
  Log:
  append-*flags: revert to old behavior where we always append the flags specified rather than doing testing on them; it is not feasible to handle flags that have spaces in them #417047

Revision  Changes    Path
1.189                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.189&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.189&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.188&r2=1.189

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -r1.188 -r1.189
--- flag-o-matic.eclass	5 Sep 2013 05:28:01 -0000	1.188
+++ flag-o-matic.eclass	30 Sep 2013 06:39:56 -0000	1.189
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.188 2013/09/05 05:28:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.189 2013/09/30 06:39:56 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -144,38 +144,53 @@
 # Add extra <flags> to the current CPPFLAGS.
 append-cppflags() {
 	[[ $# -eq 0 ]] && return 0
-	export CPPFLAGS="${CPPFLAGS} $*"
+	export CPPFLAGS+=" $*"
 	return 0
 }
 
 # @FUNCTION: append-cflags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Add extra <flags> to the current CFLAGS.
+# Add extra <flags> to the current CFLAGS.  If a flag might not be supported
+# with different compilers (or versions), then use test-flags-CC like so:
+# @CODE
+# append-cflags $(test-flags-CC -funky-flag)
+# @CODE
 append-cflags() {
 	[[ $# -eq 0 ]] && return 0
-	export CFLAGS=$(test-flags-CC ${CFLAGS} "$@")
+	# Do not do automatic flag testing ourselves. #417047
+	export CFLAGS+=" $*"
 	return 0
 }
 
 # @FUNCTION: append-cxxflags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Add extra <flags> to the current CXXFLAGS.
+# Add extra <flags> to the current CXXFLAGS.  If a flag might not be supported
+# with different compilers (or versions), then use test-flags-CXX like so:
+# @CODE
+# append-cxxflags $(test-flags-CXX -funky-flag)
+# @CODE
 append-cxxflags() {
 	[[ $# -eq 0 ]] && return 0
-	export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} "$@")
+	# Do not do automatic flag testing ourselves. #417047
+	export CXXFLAGS+=" $*"
 	return 0
 }
 
 # @FUNCTION: append-fflags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Add extra <flags> to the current {F,FC}FLAGS.
+# Add extra <flags> to the current {F,FC}FLAGS.  If a flag might not be supported
+# with different compilers (or versions), then use test-flags-F77 like so:
+# @CODE
+# append-fflags $(test-flags-F77 -funky-flag)
+# @CODE
 append-fflags() {
 	[[ $# -eq 0 ]] && return 0
-	export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@")
-	export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@")
+	# Do not do automatic flag testing ourselves. #417047
+	export FFLAGS+=" $*"
+	export FCFLAGS+=" $*"
 	return 0
 }
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2013-09-05  5:28 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2013-09-05  5:28 UTC (permalink / raw
  To: gentoo-commits

vapier      13/09/05 05:28:01

  Modified:             flag-o-matic.eclass
  Log:
  filter-mfpmath: handle "both" and "387+sse" forms #349172 by Kacper Kowalik

Revision  Changes    Path
1.188                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.188&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.188&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.187&r2=1.188

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -r1.187 -r1.188
--- flag-o-matic.eclass	12 Jan 2013 14:32:31 -0000	1.187
+++ flag-o-matic.eclass	5 Sep 2013 05:28:01 -0000	1.188
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.187 2013/01/12 14:32:31 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.188 2013/09/05 05:28:01 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -325,7 +325,9 @@
 	orig_mfpmath=$(get-flag -mfpmath)
 	# get the value of the current -mfpmath flag
 	new_math=$(get-flag mfpmath)
-	new_math=" ${new_math//,/ } "
+	# convert "both" to something we can filter
+	new_math=${new_math/both/387,sse}
+	new_math=" ${new_math//[,+]/ } "
 	# figure out which math values are to be removed
 	prune_math=""
 	for prune_math in "$@" ; do





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2013-01-12 14:32 Justin Lecher (jlec)
  0 siblings, 0 replies; 64+ messages in thread
From: Justin Lecher (jlec) @ 2013-01-12 14:32 UTC (permalink / raw
  To: gentoo-commits

jlec        13/01/12 14:32:31

  Modified:             flag-o-matic.eclass
  Log:
  Don't check for  twice, but check for redirect support, #445244; thanks Andrey Hippo for the patch

Revision  Changes    Path
1.187                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.187&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.187&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.186&r2=1.187

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -r1.186 -r1.187
--- flag-o-matic.eclass	20 Dec 2012 21:01:50 -0000	1.186
+++ flag-o-matic.eclass	12 Jan 2013 14:32:31 -0000	1.187
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.186 2012/12/20 21:01:50 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.187 2013/01/12 14:32:31 jlec Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -392,12 +392,11 @@
 
 	# use -c so we can test the assembler as well
 	local PROG=$(tc-get${comp})
-	if $( ${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null > /dev/null 2>&1 ); then
+	if ${PROG} -c -o /dev/null -x${lang} - < /dev/null > /dev/null 2>&1 ; then
 		${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null \
 			> /dev/null 2>&1
 	else
-		${PROG} "${flag}" -c -o /dev/null /dev/null \
-			> /dev/null 2>&1
+		${PROG} "${flag}" -c -o /dev/null /dev/null > /dev/null 2>&1
 	fi
 }
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-12-03 21:20 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-12-03 21:20 UTC (permalink / raw
  To: gentoo-commits

vapier      12/12/03 21:20:54

  Modified:             flag-o-matic.eclass
  Log:
  strip-flags: tweak -mfloat-abi in ALLOWED_FLAGS setup #445718 by Rick Farina

Revision  Changes    Path
1.185                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.185&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.185&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.184&r2=1.185

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -r1.184 -r1.185
--- flag-o-matic.eclass	29 Nov 2012 23:27:32 -0000	1.184
+++ flag-o-matic.eclass	3 Dec 2012 21:20:54 -0000	1.185
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.184 2012/11/29 23:27:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.185 2012/12/03 21:20:54 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -45,7 +45,7 @@
 		-mtls-direct-seg-refs -mno-tls-direct-seg-refs -mflat -mno-flat \
 		-mno-faster-structs -mfaster-structs -m32 -m64 -mx32 -mabi \
 		-mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 -mcmodel \
-		-mstack-bias -mno-stack-bias -msecure-plt -m*-toc -mfloat-abi=* \
+		-mstack-bias -mno-stack-bias -msecure-plt -m*-toc -mfloat-abi \
 		-D* -U*"
 
 	# 4.5





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-11-29 23:27 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-29 23:27 UTC (permalink / raw
  To: gentoo-commits

vapier      12/11/29 23:27:33

  Modified:             flag-o-matic.eclass
  Log:
  test-flag-PROG: read from stdin rather than directly from /dev/null as some compiler driver versions cannot handle that #443778

Revision  Changes    Path
1.184                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.184&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.184&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.183&r2=1.184

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- flag-o-matic.eclass	18 Nov 2012 08:29:17 -0000	1.183
+++ flag-o-matic.eclass	29 Nov 2012 23:27:32 -0000	1.184
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.183 2012/11/18 08:29:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.184 2012/11/29 23:27:32 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -392,7 +392,7 @@
 
 	# use -c so we can test the assembler as well
 	local PROG=$(tc-get${comp})
-	${PROG} "${flag}" -c -o /dev/null -x${lang} /dev/null \
+	${PROG} "${flag}" -c -o /dev/null -x${lang} - < /dev/null \
 		> /dev/null 2>&1
 }
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-11-18  8:29 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-18  8:29 UTC (permalink / raw
  To: gentoo-commits

vapier      12/11/18 08:29:17

  Modified:             flag-o-matic.eclass
  Log:
  test-flags-PROG: use arrays to simplify code a bit

Revision  Changes    Path
1.183                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.183&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.183&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.182&r2=1.183

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.182
retrieving revision 1.183
diff -u -r1.182 -r1.183
--- flag-o-matic.eclass	18 Nov 2012 08:27:00 -0000	1.182
+++ flag-o-matic.eclass	18 Nov 2012 08:29:17 -0000	1.183
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.182 2012/11/18 08:27:00 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.183 2012/11/18 08:29:17 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -422,21 +422,21 @@
 
 test-flags-PROG() {
 	local comp=$1
-	local flags
+	local flags=()
 	local x
 
 	shift
 
 	[[ -z ${comp} ]] && return 1
 
-	for x in "$@" ; do
-		test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}"
+	for x ; do
+		test-flag-${comp} "${x}" && flags+=( "${x}" )
 	done
 
-	echo "${flags}"
+	echo "${flags[*]}"
 
 	# Just bail if we dont have any flags
-	[[ -n ${flags} ]]
+	[[ ${#flags[@]} -gt 0 ]]
 }
 
 # @FUNCTION: test-flags-CC





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-11-18  8:27 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-18  8:27 UTC (permalink / raw
  To: gentoo-commits

vapier      12/11/18 08:27:01

  Modified:             flag-o-matic.eclass
  Log:
  test-flags: set the lang according to the compiler we are using rather than always testing the C frontend so that we can handle language-specific flags correctly #439914 by Alphat-PC

Revision  Changes    Path
1.182                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.182&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.182&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.181&r2=1.182

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -r1.181 -r1.182
--- flag-o-matic.eclass	11 Nov 2012 20:00:57 -0000	1.181
+++ flag-o-matic.eclass	18 Nov 2012 08:27:00 -0000	1.182
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.181 2012/11/11 20:00:57 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.182 2012/11/18 08:27:00 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -385,13 +385,14 @@
 
 test-flag-PROG() {
 	local comp=$1
-	local flag=$2
+	local lang=$2
+	local flag=$3
 
 	[[ -z ${comp} || -z ${flag} ]] && return 1
 
 	# use -c so we can test the assembler as well
 	local PROG=$(tc-get${comp})
-	${PROG} "${flag}" -c -o /dev/null -xc /dev/null \
+	${PROG} "${flag}" -c -o /dev/null -x${lang} /dev/null \
 		> /dev/null 2>&1
 }
 
@@ -399,25 +400,25 @@
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the C compiler, else returns shell false.
-test-flag-CC() { test-flag-PROG "CC" "$1"; }
+test-flag-CC() { test-flag-PROG "CC" c "$1"; }
 
 # @FUNCTION: test-flag-CXX
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the C++ compiler, else returns shell false.
-test-flag-CXX() { test-flag-PROG "CXX" "$1"; }
+test-flag-CXX() { test-flag-PROG "CXX" c++ "$1"; }
 
 # @FUNCTION: test-flag-F77
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false.
-test-flag-F77() { test-flag-PROG "F77" "$1"; }
+test-flag-F77() { test-flag-PROG "F77" f77 "$1"; }
 
 # @FUNCTION: test-flag-FC
 # @USAGE: <flag>
 # @DESCRIPTION:
 # Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false.
-test-flag-FC() { test-flag-PROG "FC" "$1"; }
+test-flag-FC() { test-flag-PROG "FC" f95 "$1"; }
 
 test-flags-PROG() {
 	local comp=$1





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-11-11 20:00 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-11 20:00 UTC (permalink / raw
  To: gentoo-commits

vapier      12/11/11 20:00:57

  Modified:             flag-o-matic.eclass
  Log:
  raw-ldflags: fix typo in previous commit #441808#10

Revision  Changes    Path
1.181                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.181&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.181&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.180&r2=1.181

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -r1.180 -r1.181
--- flag-o-matic.eclass	11 Nov 2012 07:00:01 -0000	1.180
+++ flag-o-matic.eclass	11 Nov 2012 20:00:57 -0000	1.181
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.180 2012/11/11 07:00:01 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.181 2012/11/11 20:00:57 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -600,7 +600,7 @@
 	set --
 	for x in ${input} ; do
 		case ${x} in
-		-Wl*,)
+		-Wl,*)
 			x=${x#-Wl,}
 			set -- "$@" ${x//,/ }
 			;;





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-11-11  7:00 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-11-11  7:00 UTC (permalink / raw
  To: gentoo-commits

vapier      12/11/11 07:00:01

  Modified:             flag-o-matic.eclass
  Log:
  raw-ldflags: throw away flags that do not start with -Wl, #441808

Revision  Changes    Path
1.180                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.180&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.180&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.179&r2=1.180

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- flag-o-matic.eclass	30 Oct 2012 20:51:44 -0000	1.179
+++ flag-o-matic.eclass	11 Nov 2012 07:00:01 -0000	1.180
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.179 2012/10/30 20:51:44 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.180 2012/11/11 07:00:01 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -599,8 +599,14 @@
 	[[ -z ${input} ]] && input=${LDFLAGS}
 	set --
 	for x in ${input} ; do
-		x=${x#-Wl,}
-		set -- "$@" ${x//,/ }
+		case ${x} in
+		-Wl*,)
+			x=${x#-Wl,}
+			set -- "$@" ${x//,/ }
+			;;
+		*)	# Assume it's a compiler driver flag, so throw it away #441808
+			;;
+		esac
 	done
 	echo "$@"
 }





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-10-30 20:51 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-10-30 20:51 UTC (permalink / raw
  To: gentoo-commits

vapier      12/10/30 20:51:44

  Modified:             flag-o-matic.eclass
  Log:
  strip-flags: revert previous commit as it was unnecessary; fix _is_flagq to handle arrays #440306 by Mr. Bones.

Revision  Changes    Path
1.179                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.179&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.179&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.178&r2=1.179

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -r1.178 -r1.179
--- flag-o-matic.eclass	30 Oct 2012 20:20:37 -0000	1.178
+++ flag-o-matic.eclass	30 Oct 2012 20:51:44 -0000	1.179
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.178 2012/10/30 20:20:37 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.179 2012/10/30 20:51:44 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -265,8 +265,9 @@
 }
 
 _is_flagq() {
-	local x
-	for x in ${!1} ; do
+	local x var
+	eval var=\""\${$1[*]}"\"
+	for x in ${var} ; do
 		[[ ${x} == $2 ]] && return 0
 	done
 	return 1
@@ -370,7 +371,7 @@
 		done
 
 		# In case we filtered out all optimization flags fallback to -O2
-		if _is_flagq ${var} "-O*" && ! (_is_flagq new "-O*" || _is_flagq new -O) ; then
+		if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then
 			new+=( -O2 )
 		fi
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-10-30 20:20 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-10-30 20:20 UTC (permalink / raw
  To: gentoo-commits

vapier      12/10/30 20:20:37

  Modified:             flag-o-matic.eclass
  Log:
  strip-flags: do not add -O2 if user has -O #440306 by Denis M

Revision  Changes    Path
1.178                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.178&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.178&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.177&r2=1.178

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -r1.177 -r1.178
--- flag-o-matic.eclass	23 Jun 2012 22:21:50 -0000	1.177
+++ flag-o-matic.eclass	30 Oct 2012 20:20:37 -0000	1.178
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.177 2012/06/23 22:21:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.178 2012/10/30 20:20:37 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -370,7 +370,7 @@
 		done
 
 		# In case we filtered out all optimization flags fallback to -O2
-		if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then
+		if _is_flagq ${var} "-O*" && ! (_is_flagq new "-O*" || _is_flagq new -O) ; then
 			new+=( -O2 )
 		fi
 





^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-06-23 22:21 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-06-23 22:21 UTC (permalink / raw
  To: gentoo-commits

vapier      12/06/23 22:21:50

  Modified:             flag-o-matic.eclass
  Log:
  use eqawarn rather than ewarn for append-ldflags checking #423159 by Pacho Ramos

Revision  Changes    Path
1.177                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.177&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.177&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.176&r2=1.177

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.176
retrieving revision 1.177
diff -u -r1.176 -r1.177
--- flag-o-matic.eclass	18 Jun 2012 06:45:28 -0000	1.176
+++ flag-o-matic.eclass	23 Jun 2012 22:21:50 -0000	1.177
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.176 2012/06/18 06:45:28 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.177 2012/06/23 22:21:50 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -197,7 +197,7 @@
 	local flag
 	for flag in "$@"; do
 		[[ ${flag} == -l* ]] && \
-			ewarn "Appending a library link instruction (${flag}); libraries to link to should not be passed through LDFLAGS"
+			eqawarn "Appending a library link instruction (${flag}); libraries to link to should not be passed through LDFLAGS"
 	done
 
 	export LDFLAGS="${LDFLAGS} $*"






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-05-31  0:29 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-31  0:29 UTC (permalink / raw
  To: gentoo-commits

vapier      12/05/31 00:29:06

  Modified:             flag-o-matic.eclass
  Log:
  fix moronic syntax error in previous commit

Revision  Changes    Path
1.173                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.173&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.173&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.172&r2=1.173

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -r1.172 -r1.173
--- flag-o-matic.eclass	31 May 2012 00:24:47 -0000	1.172
+++ flag-o-matic.eclass	31 May 2012 00:29:06 -0000	1.173
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.172 2012/05/31 00:24:47 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.173 2012/05/31 00:29:06 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -207,7 +207,7 @@
 	case " $* " in
 	*' '-[DIU]*) eqawarn 'please use append-cppflags for preprocessor flags' ;;
 	*' '-L*|\
-	*' '-Wl,*')  eqawarn 'please use append-ldflags for linker flags' ;;
+	*' '-Wl,*)  eqawarn 'please use append-ldflags for linker flags' ;;
 	esac
 	append-cflags "$@"
 	append-cxxflags "$@"






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-05-31  0:24 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-31  0:24 UTC (permalink / raw
  To: gentoo-commits

vapier      12/05/31 00:24:47

  Modified:             flag-o-matic.eclass
  Log:
  also warn on -Wl, flags passed to append-flags

Revision  Changes    Path
1.172                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.172&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.172&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.171&r2=1.172

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- flag-o-matic.eclass	30 May 2012 07:59:51 -0000	1.171
+++ flag-o-matic.eclass	31 May 2012 00:24:47 -0000	1.172
@@ -1,6 +1,6 @@
 # Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.171 2012/05/30 07:59:51 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.172 2012/05/31 00:24:47 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -206,7 +206,8 @@
 	[[ $# -eq 0 ]] && return 0
 	case " $* " in
 	*' '-[DIU]*) eqawarn 'please use append-cppflags for preprocessor flags' ;;
-	*' '-L*)     eqawarn 'please use append-ldflags for linker flags' ;;
+	*' '-L*|\
+	*' '-Wl,*')  eqawarn 'please use append-ldflags for linker flags' ;;
 	esac
 	append-cflags "$@"
 	append-cxxflags "$@"






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-05-26  2:55 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-05-26  2:55 UTC (permalink / raw
  To: gentoo-commits

vapier      12/05/26 02:55:02

  Modified:             flag-o-matic.eclass
  Log:
  warn when people add preprocessor/linker flags with `append-flags`

Revision  Changes    Path
1.170                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.170&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.170&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.169&r2=1.170

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -r1.169 -r1.170
--- flag-o-matic.eclass	26 Feb 2012 12:09:44 -0000	1.169
+++ flag-o-matic.eclass	26 May 2012 02:55:02 -0000	1.170
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.169 2012/02/26 12:09:44 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.170 2012/05/26 02:55:02 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -179,6 +179,10 @@
 # Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
 append-flags() {
 	[[ $# -eq 0 ]] && return 0
+	case " $* " in
+	*' '-[DIU]*) eqawarn 'please use append-cppflags for preprocessor flags' ;;
+	*' '-L*)     eqawarn 'please use append-ldflags for linker flags' ;;
+	esac
 	append-cflags "$@"
 	append-cxxflags "$@"
 	append-fflags "$@"






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-02-26 12:09 Anthony G. Basile (blueness)
  0 siblings, 0 replies; 64+ messages in thread
From: Anthony G. Basile (blueness) @ 2012-02-26 12:09 UTC (permalink / raw
  To: gentoo-commits

blueness    12/02/26 12:09:45

  Modified:             flag-o-matic.eclass
  Log:
  Adds CCASFLAGS to list of flags which are filtered

Revision  Changes    Path
1.169                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.169&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.169&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.168&r2=1.169

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- flag-o-matic.eclass	16 Jan 2012 20:03:32 -0000	1.168
+++ flag-o-matic.eclass	26 Feb 2012 12:09:44 -0000	1.169
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.168 2012/01/16 20:03:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.169 2012/02/26 12:09:44 blueness Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -17,7 +17,7 @@
 
 # Return all the flag variables that our high level funcs operate on.
 all-flag-vars() {
-	echo {C,CPP,CXX,F,FC,LD}FLAGS
+	echo {C,CPP,CXX,CCAS,F,FC,LD}FLAGS
 }
 
 # {C,CXX,F,FC}FLAGS that we allow in strip-flags
@@ -101,7 +101,7 @@
 # @FUNCTION: filter-flags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Remove particular <flags> from {C,CPP,CXX,F,FC,LD}FLAGS.  Accepts shell globs.
+# Remove particular <flags> from {C,CPP,CXX,CCAS,F,FC,LD}FLAGS.  Accepts shell globs.
 filter-flags() {
 	_filter-hardened "$@"
 	local v






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-01-16 20:03 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-16 20:03 UTC (permalink / raw
  To: gentoo-commits

vapier      12/01/16 20:03:32

  Modified:             flag-o-matic.eclass
  Log:
  quote single flag arg to test-flag-PROG since we are only testing one flag, and we want to handle any weirdness in that flag (such as spaces) #399055

Revision  Changes    Path
1.168                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.168&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.168&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.167&r2=1.168

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- flag-o-matic.eclass	14 Jan 2012 09:10:54 -0000	1.167
+++ flag-o-matic.eclass	16 Jan 2012 20:03:32 -0000	1.168
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.167 2012/01/14 09:10:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.168 2012/01/16 20:03:32 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -347,13 +347,13 @@
 
 test-flag-PROG() {
 	local comp=$1
-	local flags="$2"
+	local flag=$2
 
-	[[ -z ${comp} || -z ${flags} ]] && return 1
+	[[ -z ${comp} || -z ${flag} ]] && return 1
 
 	# use -c so we can test the assembler as well
 	local PROG=$(tc-get${comp})
-	${PROG} ${flags} -c -o /dev/null -xc /dev/null \
+	${PROG} "${flag}" -c -o /dev/null -xc /dev/null \
 		> /dev/null 2>&1
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-01-14  9:10 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-14  9:10 UTC (permalink / raw
  To: gentoo-commits

vapier      12/01/14 09:10:54

  Modified:             flag-o-matic.eclass
  Log:
  unify duplicated lists of variable names and duplicated code blocks, and try to clean up code a bit

Revision  Changes    Path
1.167                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.167&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.167&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.166&r2=1.167

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- flag-o-matic.eclass	14 Jan 2012 08:22:13 -0000	1.166
+++ flag-o-matic.eclass	14 Jan 2012 09:10:54 -0000	1.167
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.166 2012/01/14 08:22:13 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.167 2012/01/14 09:10:54 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -15,6 +15,11 @@
 
 inherit eutils toolchain-funcs multilib
 
+# Return all the flag variables that our high level funcs operate on.
+all-flag-vars() {
+	echo {C,CPP,CXX,F,FC,LD}FLAGS
+}
+
 # {C,CXX,F,FC}FLAGS that we allow in strip-flags
 # Note: shell globs and character lists are allowed
 setup-allowed-flags() {
@@ -80,20 +85,17 @@
 # Strings removed are matched as globs, so for example
 # '-O*' would remove -O1, -O2 etc.
 _filter-var() {
-	local f x VAR VAL
-	declare -a new
-
-	VAR=$1
+	local f x var=$1 new=()
 	shift
-	eval VAL=\${${VAR}}
-	for f in ${VAL}; do
-		for x in "$@"; do
+
+	for f in ${!var} ; do
+		for x in "$@" ; do
 			# Note this should work with globs like -O*
 			[[ ${f} == ${x} ]] && continue 2
 		done
-		eval new\[\${\#new\[@]}]=\${f}
+		new+=( "${f}" )
 	done
-	eval export ${VAR}=\${new\[*]}
+	eval export ${var}=\""${new[*]}"\"
 }
 
 # @FUNCTION: filter-flags
@@ -103,8 +105,8 @@
 filter-flags() {
 	_filter-hardened "$@"
 	local v
-	for v in C CPP CXX F FC LD ; do
-		_filter-var ${v}FLAGS "$@"
+	for v in $(all-flag-vars) ; do
+		_filter-var ${v} "$@"
 	done
 	return 0
 }
@@ -188,24 +190,21 @@
 # @DESCRIPTION:
 # Replace the <old> flag with <new>.  Accepts shell globs for <old>.
 replace-flags() {
-	[[ $# != 2 ]] \
-		&& echo && eerror "Usage: replace-flags <old flag> <new flag>" \
-		&& die "replace-flags takes 2 arguments, not $#"
+	[[ $# != 2 ]] && die "Usage: replace-flags <old flag> <new flag>"
 
-	local f fset
-	declare -a new_CFLAGS new_CXXFLAGS new_FFLAGS new_FCFLAGS
-
-	for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do
+	local f var new
+	for var in $(all-flag-vars) ; do
 		# Looping over the flags instead of using a global
 		# substitution ensures that we're working with flag atoms.
 		# Otherwise globs like -O* have the potential to wipe out the
 		# list of flags.
-		for f in ${!fset}; do
+		new=()
+		for f in ${!var} ; do
 			# Note this should work with globs like -O*
 			[[ ${f} == ${1} ]] && f=${2}
-			eval new_${fset}\[\${\#new_${fset}\[@]}]=\${f}
+			new+=( "${f}" )
 		done
-		eval export ${fset}=\${new_${fset}\[*]}
+		eval export ${var}=\""${new[*]}"\"
 	done
 
 	return 0
@@ -243,7 +242,12 @@
 # Returns shell true if <flag> is in {C,CXX,F,FC}FLAGS, else returns shell false.  Accepts shell globs.
 is-flagq() {
 	[[ -n $2 ]] && die "Usage: is-flag <flag>"
-	_is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 || _is_flagq FFLAGS $1 || _is_flagq FCFLAGS $1
+
+	local var
+	for var in $(all-flag-vars) ; do
+		_is_flagq ${var} "$1" && return 0
+	done
+	return 1
 }
 
 # @FUNCTION: is-flag
@@ -309,77 +313,35 @@
 # @DESCRIPTION:
 # Strip C[XX]FLAGS of everything except known good/safe flags.
 strip-flags() {
-	local x y flag NEW_CFLAGS NEW_CXXFLAGS NEW_FFLAGS NEW_FCFLAGS
+	local x y var
 
 	setup-allowed-flags
 
-	local NEW_CFLAGS=""
-	local NEW_CXXFLAGS=""
-	local NEW_FFLAGS=""
-	local NEW_FCFLAGS=""
-
 	set -f	# disable pathname expansion
 
-	for x in ${CFLAGS}; do
-		for y in ${ALLOWED_FLAGS}; do
-			flag=${x%%=*}
-			if [ "${flag%%${y}}" = "" ] ; then
-				NEW_CFLAGS="${NEW_CFLAGS} ${x}"
-				break
-			fi
-		done
-	done
+	for var in $(all-flag-vars) ; do
+		local new=()
 
-	for x in ${CXXFLAGS}; do
-		for y in ${ALLOWED_FLAGS}; do
-			flag=${x%%=*}
-			if [ "${flag%%${y}}" = "" ] ; then
-				NEW_CXXFLAGS="${NEW_CXXFLAGS} ${x}"
-				break
-			fi
+		for x in ${!var} ; do
+			local flag=${x%%=*}
+			for y in ${ALLOWED_FLAGS} ; do
+				if [[ -z ${flag%%${y}} ]] ; then
+					new+=( "${x}" )
+					break
+				fi
+			done
 		done
-	done
 
-	for x in ${FFLAGS}; do
-		for y in ${ALLOWED_FLAGS}; do
-			flag=${x%%=*}
-			if [ "${flag%%${y}}" = "" ] ; then
-				NEW_FFLAGS="${NEW_FFLAGS} ${x}"
-				break
-			fi
-		done
-	done
+		# In case we filtered out all optimization flags fallback to -O2
+		if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then
+			new+=( -O2 )
+		fi
 
-	for x in ${FCFLAGS}; do
-		for y in ${ALLOWED_FLAGS}; do
-			flag=${x%%=*}
-			if [ "${flag%%${y}}" = "" ] ; then
-				NEW_FCFLAGS="${NEW_FCFLAGS} ${x}"
-				break
-			fi
-		done
+		eval export ${var}=\""${new[*]}"\"
 	done
 
-	# In case we filtered out all optimization flags fallback to -O2
-	if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then
-		NEW_CFLAGS="${NEW_CFLAGS} -O2"
-	fi
-	if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then
-		NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2"
-	fi
-	if [ "${FFLAGS/-O}" != "${FFLAGS}" -a "${NEW_FFLAGS/-O}" = "${NEW_FFLAGS}" ]; then
-		NEW_FFLAGS="${NEW_FFLAGS} -O2"
-	fi
-	if [ "${FCFLAGS/-O}" != "${FCFLAGS}" -a "${NEW_FCFLAGS/-O}" = "${NEW_FCFLAGS}" ]; then
-		NEW_FCFLAGS="${NEW_FCFLAGS} -O2"
-	fi
-
 	set +f	# re-enable pathname expansion
 
-	export CFLAGS="${NEW_CFLAGS}"
-	export CXXFLAGS="${NEW_CXXFLAGS}"
-	export FFLAGS="${NEW_FFLAGS}"
-	export FCFLAGS="${NEW_FCFLAGS}"
 	return 0
 }
 
@@ -497,18 +459,20 @@
 # @DESCRIPTION:
 # Find and echo the value for a particular flag.  Accepts shell globs.
 get-flag() {
-	local f findflag="$1"
+	local f var findflag="$1"
 
 	# this code looks a little flaky but seems to work for
 	# everything we want ...
 	# for example, if CFLAGS="-march=i686":
 	# `get-flag -march` == "-march=i686"
 	# `get-flag march` == "i686"
-	for f in ${CFLAGS} ${CXXFLAGS} ${FFLAGS} ${FCFLAGS} ; do
-		if [ "${f/${findflag}}" != "${f}" ] ; then
-			printf "%s\n" "${f/-${findflag}=}"
-			return 0
-		fi
+	for var in $(all-flag-vars) ; do
+		for f in ${!var} ; do
+			if [ "${f/${findflag}}" != "${f}" ] ; then
+				printf "%s\n" "${f/-${findflag}=}"
+				return 0
+			fi
+		done
 	done
 	return 1
 }






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-01-14  8:22 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-14  8:22 UTC (permalink / raw
  To: gentoo-commits

vapier      12/01/14 08:22:14

  Modified:             flag-o-matic.eclass
  Log:
  mark has_m32 as dead since no one uses it, and mark has_m64 as a warning until xalan-c gets fixed #398855

Revision  Changes    Path
1.166                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.166&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.166&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.165&r2=1.166

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- flag-o-matic.eclass	14 Jan 2012 08:05:32 -0000	1.165
+++ flag-o-matic.eclass	14 Jan 2012 08:22:13 -0000	1.166
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.165 2012/01/14 08:05:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.166 2012/01/14 08:22:13 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -519,6 +519,8 @@
 # WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works
 # return code is 0, else the return code is 1.
 has_m64() {
+	eqawarn "${FUNCNAME}: don't use this anymore"
+
 	# this doesnt test if the flag is accepted, it tests if the flag
 	# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
 	# please dont replace this function with test_flag in some future
@@ -534,27 +536,8 @@
 	return 1
 }
 
-# @FUNCTION: has_m32
-# @DESCRIPTION:
-# This doesn't test if the flag is accepted, it tests if the flag actually
-# WORKS. Non-mulilib gcc will take both -m32 and -64. If the flag works return
-# code is 0, else return code is 1.
 has_m32() {
-	# this doesnt test if the flag is accepted, it tests if the flag
-	# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
-	# please dont replace this function with test_flag in some future
-	# clean-up!
-
-	[ "$(tc-arch)" = "amd64" ] && has_multilib_profile && return 0
-
-	local temp=$(emktemp)
-	echo "int main() { return(0); }" > "${temp}".c
-	MY_CC=$(tc-getCC)
-	${MY_CC/ .*/} -m32 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1
-	local ret=$?
-	rm -f "${temp}".c
-	[[ ${ret} != 1 ]] && return 0
-	return 1
+	die "${FUNCNAME}: don't use this anymore"
 }
 
 # @FUNCTION: replace-sparc64-flags






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-01-14  8:05 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-14  8:05 UTC (permalink / raw
  To: gentoo-commits

vapier      12/01/14 08:05:32

  Modified:             flag-o-matic.eclass
  Log:
  delete dead funcs

Revision  Changes    Path
1.165                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.165&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.165&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.164&r2=1.165

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- flag-o-matic.eclass	13 Jan 2012 22:40:29 -0000	1.164
+++ flag-o-matic.eclass	14 Jan 2012 08:05:32 -0000	1.165
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.164 2012/01/13 22:40:29 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.165 2012/01/14 08:05:32 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -15,20 +15,6 @@
 
 inherit eutils toolchain-funcs multilib
 
-################ DEPRECATED functions ################
-# The following are still present to avoid breaking existing
-# code more than necessary; however they are deprecated. Please
-# use gcc-specs-* from toolchain-funcs.eclass instead, if you
-# need to know which hardened techs are active in the compiler.
-# See bug #100974
-#
-# has_hardened
-# has_pie
-# has_pic
-# has_ssp_all
-# has_ssp
-
-
 # {C,CXX,F,FC}FLAGS that we allow in strip-flags
 # Note: shell globs and character lists are allowed
 setup-allowed-flags() {
@@ -527,14 +513,6 @@
 	return 1
 }
 
-# DEAD FUNCS.  Remove by Dec 2011.
-test_flag()    { die "$0: deprecated, please use test-flags()!" ; }
-has_hardened() { die "$0: deprecated, please use gcc-specs-{relro,now}()!" ; }
-has_pic()      { die "$0: deprecated, please use gcc-specs-pie()!" ; }
-has_pie()      { die "$0: deprecated, please use gcc-specs-pie()!" ; }
-has_ssp_all()  { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
-has_ssp()      { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
-
 # @FUNCTION: has_m64
 # @DESCRIPTION:
 # This doesn't test if the flag is accepted, it tests if the flag actually






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2012-01-13 22:40 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-13 22:40 UTC (permalink / raw
  To: gentoo-commits

vapier      12/01/13 22:40:29

  Modified:             flag-o-matic.eclass
  Log:
  have filter-flags filter out LDFLAGS too #395619

Revision  Changes    Path
1.164                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.164&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.164&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.163&r2=1.164

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -r1.163 -r1.164
--- flag-o-matic.eclass	28 Dec 2011 06:28:55 -0000	1.163
+++ flag-o-matic.eclass	13 Jan 2012 22:40:29 -0000	1.164
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.163 2011/12/28 06:28:55 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.164 2012/01/13 22:40:29 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -113,14 +113,13 @@
 # @FUNCTION: filter-flags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS.  Accepts shell globs.
+# Remove particular <flags> from {C,CPP,CXX,F,FC,LD}FLAGS.  Accepts shell globs.
 filter-flags() {
 	_filter-hardened "$@"
-	_filter-var CFLAGS "$@"
-	_filter-var CPPFLAGS "$@"
-	_filter-var CXXFLAGS "$@"
-	_filter-var FFLAGS "$@"
-	_filter-var FCFLAGS "$@"
+	local v
+	for v in C CPP CXX F FC LD ; do
+		_filter-var ${v}FLAGS "$@"
+	done
 	return 0
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-12-15  5:23 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-12-15  5:23 UTC (permalink / raw
  To: gentoo-commits

vapier      11/12/15 05:23:15

  Modified:             flag-o-matic.eclass
  Log:
  relocate tests to tests/ subdir

Revision  Changes    Path
1.161                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.161&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.161&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.160&r2=1.161

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -r1.160 -r1.161
--- flag-o-matic.eclass	10 Dec 2011 20:03:17 -0000	1.160
+++ flag-o-matic.eclass	15 Dec 2011 05:23:15 -0000	1.161
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.160 2011/12/10 20:03:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.161 2011/12/15 05:23:15 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -687,30 +687,4 @@
 	esac
 }
 
-# Some tests for when we screw with things and want to make
-# sure we didn't break anything
-#TESTS() {
-#	CFLAGS="-a -b -c=1"
-#	CXXFLAGS="-x -y -z=2"
-#	LDFLAGS="-l -m -n=3"
-#
-#	die() { exit 1; }
-#	(is-flag 1 2 3) && die
-#	(is-ldflag 1 2 3) && die
-#
-#	is-flagq -l && die
-#	is-ldflagq -a && die
-#	is-flagq -a || die
-#	is-flagq -x || die
-#	is-ldflagq -n=* || die
-#	is-ldflagq -n && die
-#
-#	strip-unsupported-flags
-#	[[ ${CFLAGS} == "-c=1" ]] || die
-#	[[ ${CXXFLAGS} == "-y -z=2" ]] || die
-#
-#	echo "All tests pass"
-#}
-#TESTS
-
 fi






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-12-07  6:42 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-12-07  6:42 UTC (permalink / raw
  To: gentoo-commits

vapier      11/12/07 06:42:40

  Modified:             flag-o-matic.eclass
  Log:
  allow -mx32 ABI flag

Revision  Changes    Path
1.159                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.159&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.159&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.158&r2=1.159

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- flag-o-matic.eclass	14 Nov 2011 20:29:03 -0000	1.158
+++ flag-o-matic.eclass	7 Dec 2011 06:42:40 -0000	1.159
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.158 2011/11/14 20:29:03 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.159 2011/12/07 06:42:40 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -51,7 +51,7 @@
 		-mieee -mieee-with-inexact -mschedule -mfloat-gprs -mspe -mno-spe \
 		-mtls-direct-seg-refs -mno-tls-direct-seg-refs \
 		-mflat -mno-flat -mno-faster-structs -mfaster-structs \
-		-m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
+		-m32 -m64 -mx32 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
 		-msecure-plt -m*-toc -D* -U*"
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-11-14 20:29 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-11-14 20:29 UTC (permalink / raw
  To: gentoo-commits

vapier      11/11/14 20:29:03

  Modified:             flag-o-matic.eclass
  Log:
  move away from $* to "$@" to pass args sanely

Revision  Changes    Path
1.158                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.158&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.158&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.157&r2=1.158

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -r1.157 -r1.158
--- flag-o-matic.eclass	11 Nov 2011 07:06:25 -0000	1.157
+++ flag-o-matic.eclass	14 Nov 2011 20:29:03 -0000	1.158
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.157 2011/11/11 07:06:25 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.158 2011/11/14 20:29:03 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -143,7 +143,7 @@
 # @DESCRIPTION:
 # Add extra <flags> to the current CPPFLAGS.
 append-cppflags() {
-	[[ -z $* ]] && return 0
+	[[ $# -eq 0 ]] && return 0
 	export CPPFLAGS="${CPPFLAGS} $*"
 	return 0
 }
@@ -153,8 +153,8 @@
 # @DESCRIPTION:
 # Add extra <flags> to the current CFLAGS.
 append-cflags() {
-	[[ -z $* ]] && return 0
-	export CFLAGS=$(test-flags-CC ${CFLAGS} $*)
+	[[ $# -eq 0 ]] && return 0
+	export CFLAGS=$(test-flags-CC ${CFLAGS} "$@")
 	return 0
 }
 
@@ -163,8 +163,8 @@
 # @DESCRIPTION:
 # Add extra <flags> to the current CXXFLAGS.
 append-cxxflags() {
-	[[ -z $* ]] && return 0
-	export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} $*)
+	[[ $# -eq 0 ]] && return 0
+	export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} "$@")
 	return 0
 }
 
@@ -173,9 +173,9 @@
 # @DESCRIPTION:
 # Add extra <flags> to the current {F,FC}FLAGS.
 append-fflags() {
-	[[ -z $* ]] && return 0
-	export FFLAGS=$(test-flags-F77 ${FFLAGS} $*)
-	export FCFLAGS=$(test-flags-FC ${FCFLAGS} $*)
+	[[ $# -eq 0 ]] && return 0
+	export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@")
+	export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@")
 	return 0
 }
 
@@ -193,7 +193,7 @@
 # @DESCRIPTION:
 # Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
 append-flags() {
-	[[ -z $* ]] && return 0
+	[[ $# -eq 0 ]] && return 0
 	append-cflags "$@"
 	append-cxxflags "$@"
 	append-fflags "$@"
@@ -450,7 +450,6 @@
 
 	[[ -z ${comp} ]] && return 1
 
-	x=""
 	for x in "$@" ; do
 		test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}"
 	done
@@ -622,7 +621,7 @@
 # @DESCRIPTION:
 # Add extra <libs> to the current LIBS.
 append-libs() {
-	[[ -z $* ]] && return 0
+	[[ $# -eq 0 ]] && return 0
 	local flag
 	for flag in "$@"; do
 		[[ ${flag} == -l* ]] && flag=${flag#-l}
@@ -637,7 +636,7 @@
 # @DESCRIPTION:
 # Add extra <flags> to the current LDFLAGS.
 append-ldflags() {
-	[[ -z $* ]] && return 0
+	[[ $# -eq 0 ]] && return 0
 	local flag
 	for flag in "$@"; do
 		[[ ${flag} == -l* ]] && \






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-10-08 18:37 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-10-08 18:37 UTC (permalink / raw
  To: gentoo-commits

vapier      11/10/08 18:37:30

  Modified:             flag-o-matic.eclass
  Log:
  document optional args to raw-ldflags

Revision  Changes    Path
1.156                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.156&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.156&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.155&r2=1.156

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- flag-o-matic.eclass	17 Aug 2011 18:20:59 -0000	1.155
+++ flag-o-matic.eclass	8 Oct 2011 18:37:30 -0000	1.156
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.155 2011/08/17 18:20:59 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.156 2011/10/08 18:37:30 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -658,11 +658,13 @@
 }
 
 # @FUNCTION: raw-ldflags
-# @USAGE: <flags>
+# @USAGE: [flags]
 # @DESCRIPTION:
 # Turn C style ldflags (-Wl,-foo) into straight ldflags - the results
 # are suitable for passing directly to 'ld'; note LDFLAGS is usually passed
 # to gcc where it needs the '-Wl,'.
+#
+# If no flags are specified, then default to ${LDFLAGS}.
 raw-ldflags() {
 	local x input="$@"
 	[[ -z ${input} ]] && input=${LDFLAGS}






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-08-17 18:20 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-17 18:20 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/17 18:20:59

  Modified:             flag-o-matic.eclass
  Log:
  add pointer to docs in append-lfs-flags too

Revision  Changes    Path
1.155                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.155&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.155&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.154&r2=1.155

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -r1.154 -r1.155
--- flag-o-matic.eclass	17 Aug 2011 17:59:35 -0000	1.154
+++ flag-o-matic.eclass	17 Aug 2011 18:20:59 -0000	1.155
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.154 2011/08/17 17:59:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.155 2011/08/17 18:20:59 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -184,6 +184,7 @@
 # Add flags that enable Large File Support.
 append-lfs-flags() {
 	[[ $# -ne 0 ]] && die "append-lfs-flags takes no arguments"
+	# see comments in filter-lfs-flags func for meaning of these
 	append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-08-17 17:59 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-17 17:59 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/17 17:59:35

  Modified:             flag-o-matic.eclass
  Log:
  test the actual # of args and not whether their expansion is an empty string

Revision  Changes    Path
1.154                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.154&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.154&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.153&r2=1.154

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -r1.153 -r1.154
--- flag-o-matic.eclass	17 Aug 2011 17:54:48 -0000	1.153
+++ flag-o-matic.eclass	17 Aug 2011 17:59:35 -0000	1.154
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.153 2011/08/17 17:54:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.154 2011/08/17 17:59:35 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -130,7 +130,7 @@
 # @DESCRIPTION:
 # Remove flags that enable Large File Support.
 filter-lfs-flags() {
-	[[ -n $@ ]] && die "filter-lfs-flags takes no arguments"
+	[[ $# -ne 0 ]] && die "filter-lfs-flags takes no arguments"
 	# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
 	# _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...)
 	# _LARGEFILE64_SOURCE: enable support for 64bit variants (off64_t/fseeko64/etc...)
@@ -183,7 +183,7 @@
 # @DESCRIPTION:
 # Add flags that enable Large File Support.
 append-lfs-flags() {
-	[[ -n $@ ]] && die "append-lfs-flags takes no arguments"
+	[[ $# -ne 0 ]] && die "append-lfs-flags takes no arguments"
 	append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-08-17 17:54 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-08-17 17:54 UTC (permalink / raw
  To: gentoo-commits

vapier      11/08/17 17:54:48

  Modified:             flag-o-matic.eclass
  Log:
  document what each LFS flag does exactly

Revision  Changes    Path
1.153                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.153&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.153&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.152&r2=1.153

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- flag-o-matic.eclass	12 Jul 2011 04:08:52 -0000	1.152
+++ flag-o-matic.eclass	17 Aug 2011 17:54:48 -0000	1.153
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.152 2011/07/12 04:08:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.153 2011/08/17 17:54:48 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -131,6 +131,10 @@
 # Remove flags that enable Large File Support.
 filter-lfs-flags() {
 	[[ -n $@ ]] && die "filter-lfs-flags takes no arguments"
+	# http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
+	# _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...)
+	# _LARGEFILE64_SOURCE: enable support for 64bit variants (off64_t/fseeko64/etc...)
+	# _FILE_OFFSET_BITS: default to 64bit variants (off_t is defined as off64_t)
 	filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-07-12  4:08 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-07-12  4:08 UTC (permalink / raw
  To: gentoo-commits

vapier      11/07/12 04:08:52

  Modified:             flag-o-matic.eclass
  Log:
  use -c rather than -S when testing flags so that we can check for assembler flags and not just compiler flags (which lets use check -Wa,--xxx flags #373743)

Revision  Changes    Path
1.152                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.152&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.152&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.151&r2=1.152

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.151
retrieving revision 1.152
diff -u -r1.151 -r1.152
--- flag-o-matic.eclass	12 Jul 2011 03:58:11 -0000	1.151
+++ flag-o-matic.eclass	12 Jul 2011 04:08:52 -0000	1.152
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.151 2011/07/12 03:58:11 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.152 2011/07/12 04:08:52 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -404,11 +404,11 @@
 	local comp=$1
 	local flags="$2"
 
-	[[ -z ${comp} || -z ${flags} ]] && \
-		return 1
+	[[ -z ${comp} || -z ${flags} ]] && return 1
 
+	# use -c so we can test the assembler as well
 	local PROG=$(tc-get${comp})
-	${PROG} ${flags} -S -o /dev/null -xc /dev/null \
+	${PROG} ${flags} -c -o /dev/null -xc /dev/null \
 		> /dev/null 2>&1
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-07-12  3:58 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2011-07-12  3:58 UTC (permalink / raw
  To: gentoo-commits

vapier      11/07/12 03:58:11

  Modified:             flag-o-matic.eclass
  Log:
  turn `ewarn` for dead flags into `die`

Revision  Changes    Path
1.151                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.151&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.151&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.150&r2=1.151

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- flag-o-matic.eclass	25 Feb 2011 10:51:44 -0000	1.150
+++ flag-o-matic.eclass	12 Jul 2011 03:58:11 -0000	1.151
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.150 2011/02/25 10:51:44 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.151 2011/07/12 03:58:11 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -487,15 +487,6 @@
 # its really only present due to the append-flags() abomination.
 test-flags() { test-flags-CC "$@"; }
 
-# @FUNCTION: test_flag
-# @DESCRIPTION:
-# DEPRICIATED, use test-flags()
-test_flag() {
-	ewarn "test_flag: deprecated, please use test-flags()!" >&2
-
-	test-flags-CC "$@"
-}
-
 # @FUNCTION: test_version_info
 # @USAGE: <version>
 # @DESCRIPTION:
@@ -540,66 +531,13 @@
 	return 1
 }
 
-# @FUNCTION: has_hardened
-# @DESCRIPTION:
-# DEPRECATED - use gcc-specs-relro or gcc-specs-now from toolchain-funcs
-has_hardened() {
-	ewarn "has_hardened: deprecated, please use gcc-specs-{relro,now}()!" >&2
-
-	test_version_info Hardened && return 0
-	# The specs file wont exist unless gcc has GCC_SPECS support
-	[[ -f ${GCC_SPECS} && ${GCC_SPECS} != ${GCC_SPECS/hardened/} ]]
-}
-
-# @FUNCTION: has_pic
-# @DESCRIPTION:
-# DEPRECATED - use gcc-specs-pie from toolchain-funcs
-# indicate whether PIC is set
-has_pic() {
-	ewarn "has_pic: deprecated, please use gcc-specs-pie()!" >&2
-
-	[[ ${CFLAGS/-fPIC} != ${CFLAGS} || \
-	   ${CFLAGS/-fpic} != ${CFLAGS} ]] || \
-	gcc-specs-pie
-}
-
-# @FUNCTION: has_pie
-# @DESCRIPTION:
-# DEPRECATED - use gcc-specs-pie from toolchain-funcs
-# indicate whether PIE is set
-has_pie() {
-	ewarn "has_pie: deprecated, please use gcc-specs-pie()!" >&2
-
-	[[ ${CFLAGS/-fPIE} != ${CFLAGS} || \
-	   ${CFLAGS/-fpie} != ${CFLAGS} ]] || \
-	gcc-specs-pie
-}
-
-# @FUNCTION: has_ssp_all
-# @DESCRIPTION:
-# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
-# indicate whether code for SSP is being generated for all functions
-has_ssp_all() {
-	ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >&2
-
-	# note; this matches only -fstack-protector-all
-	[[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \
-	   -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \
-	gcc-specs-ssp-to-all
-}
-
-# @FUNCTION: has_ssp
-# @DESCRIPTION:
-# DEPRECATED - use gcc-specs-ssp from toolchain-funcs
-# indicate whether code for SSP is being generated
-has_ssp() {
-	ewarn "has_ssp: deprecated, please use gcc-specs-ssp()!" >&2
-
-	# note; this matches both -fstack-protector and -fstack-protector-all
-	[[ ${CFLAGS/-fstack-protector} != ${CFLAGS} || \
-	   -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP__) ]] || \
-	gcc-specs-ssp
-}
+# DEAD FUNCS.  Remove by Dec 2011.
+test_flag()    { die "$0: deprecated, please use test-flags()!" ; }
+has_hardened() { die "$0: deprecated, please use gcc-specs-{relro,now}()!" ; }
+has_pic()      { die "$0: deprecated, please use gcc-specs-pie()!" ; }
+has_pie()      { die "$0: deprecated, please use gcc-specs-pie()!" ; }
+has_ssp_all()  { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
+has_ssp()      { die "$0: deprecated, please use gcc-specs-ssp()!" ; }
 
 # @FUNCTION: has_m64
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-02-25 10:51 Ryan Hill (dirtyepic)
  0 siblings, 0 replies; 64+ messages in thread
From: Ryan Hill (dirtyepic) @ 2011-02-25 10:51 UTC (permalink / raw
  To: gentoo-commits

dirtyepic    11/02/25 10:51:44

  Modified:             flag-o-matic.eclass
  Log:
  Allow -fpermissive.

Revision  Changes    Path
1.150                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.150&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.150&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.149&r2=1.150

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- flag-o-matic.eclass	1 Feb 2011 05:41:30 -0000	1.149
+++ flag-o-matic.eclass	25 Feb 2011 10:51:44 -0000	1.150
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.149 2011/02/01 05:41:30 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.150 2011/02/25 10:51:44 dirtyepic Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -36,7 +36,7 @@
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking -fno-strict-overflow"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+"
-		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident"
+		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident -fpermissive"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -W* -w"
 	fi
 	# allow a bunch of flags that negate features / control ABI






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2011-02-01  5:41 Ryan Hill (dirtyepic)
  0 siblings, 0 replies; 64+ messages in thread
From: Ryan Hill (dirtyepic) @ 2011-02-01  5:41 UTC (permalink / raw
  To: gentoo-commits

dirtyepic    11/02/01 05:41:30

  Modified:             flag-o-matic.eclass
  Log:
  Add -mfloat-gprs, -mspe, and -mno-spe for bug #353008 and new flags for 4.6.

Revision  Changes    Path
1.149                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.149&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.149&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.148&r2=1.149

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -r1.148 -r1.149
--- flag-o-matic.eclass	8 May 2010 03:47:41 -0000	1.148
+++ flag-o-matic.eclass	1 Feb 2011 05:41:30 -0000	1.149
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.148 2010/05/08 03:47:41 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.149 2011/02/01 05:41:30 dirtyepic Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -48,7 +48,7 @@
 		-mno-popcnt -mno-abm \
 		-mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt \
 		-msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \
-		-mieee -mieee-with-inexact -mschedule \
+		-mieee -mieee-with-inexact -mschedule -mfloat-gprs -mspe -mno-spe \
 		-mtls-direct-seg-refs -mno-tls-direct-seg-refs \
 		-mflat -mno-flat -mno-faster-structs -mfaster-structs \
 		-m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
@@ -57,6 +57,9 @@
 
 	# 4.5
 	ALLOWED_FLAGS="${ALLOWED_FLAGS} -mno-fma4 -mno-movbe -mno-xop -mno-lwp"
+	# 4.6
+	ALLOWED_FLAGS="${ALLOWED_FLAGS} -mno-fsgsbase -mno-rdrnd -mno-f16c \
+		-mno-bmi -mno-tbm"
 
 	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2010-05-08  3:47 Ryan Hill (dirtyepic)
  0 siblings, 0 replies; 64+ messages in thread
From: Ryan Hill (dirtyepic) @ 2010-05-08  3:47 UTC (permalink / raw
  To: gentoo-commits

dirtyepic    10/05/08 03:47:41

  Modified:             flag-o-matic.eclass
  Log:
  Add 4.5 -mno-* flags to exception list.

Revision  Changes    Path
1.148                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.148&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.148&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.147&r2=1.148

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- flag-o-matic.eclass	2 Apr 2010 02:50:29 -0000	1.147
+++ flag-o-matic.eclass	8 May 2010 03:47:41 -0000	1.148
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.147 2010/04/02 02:50:29 abcd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.148 2010/05/08 03:47:41 dirtyepic Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -55,6 +55,9 @@
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
 		-msecure-plt -m*-toc -D* -U*"
 
+	# 4.5
+	ALLOWED_FLAGS="${ALLOWED_FLAGS} -mno-fma4 -mno-movbe -mno-xop -mno-lwp"
+
 	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's
 	export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks"






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2010-04-02  2:50 Jonathan Callen (abcd)
  0 siblings, 0 replies; 64+ messages in thread
From: Jonathan Callen (abcd) @ 2010-04-02  2:50 UTC (permalink / raw
  To: gentoo-commits

abcd        10/04/02 02:50:31

  Modified:             flag-o-matic.eclass
  Log:
  Add append-libs() function

Revision  Changes    Path
1.147                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.147&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.147&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.146&r2=1.147

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -r1.146 -r1.147
--- flag-o-matic.eclass	17 Feb 2010 18:20:49 -0000	1.146
+++ flag-o-matic.eclass	2 Apr 2010 02:50:29 -0000	1.147
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.146 2010/02/17 18:20:49 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.147 2010/04/02 02:50:29 abcd Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -668,6 +668,21 @@
 	export CFLAGS CXXFLAGS
 }
 
+# @FUNCTION: append-libs
+# @USAGE: <libs>
+# @DESCRIPTION:
+# Add extra <libs> to the current LIBS.
+append-libs() {
+	[[ -z $* ]] && return 0
+	local flag
+	for flag in "$@"; do
+		[[ ${flag} == -l* ]] && flag=${flag#-l}
+		export LIBS="${LIBS} -l${flag}"
+	done
+
+	return 0
+}
+
 # @FUNCTION: append-ldflags
 # @USAGE: <flags>
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2010-02-17 18:20 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 64+ messages in thread
From: Samuli Suominen (ssuominen) @ 2010-02-17 18:20 UTC (permalink / raw
  To: gentoo-commits

ssuominen    10/02/17 18:20:50

  Modified:             flag-o-matic.eclass
  Log:
  Remove last of bindnow-flags.

Revision  Changes    Path
1.146                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.146&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.146&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.145&r2=1.146

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- flag-o-matic.eclass	4 Oct 2009 10:00:53 -0000	1.145
+++ flag-o-matic.eclass	17 Feb 2010 18:20:49 -0000	1.146
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.145 2009/10/04 10:00:53 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.146 2010/02/17 18:20:49 ssuominen Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -710,15 +710,6 @@
 	echo "$@"
 }
 
-# @FUNCTION: bindnow-flags
-# @RETURN: Returns the flags to enable "now" binding in the current selected linker.
-# @DESCRIPTION:
-# DEPRECATED - Gets the flags needed for "NOW" binding
-bindnow-flags() {
-	eerror "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
-	die "Stop using bindnow-flags."
-}
-
 # @FUNCTION: no-as-needed
 # @RETURN: Flag to disable asneeded behavior for use with append-ldflags.
 no-as-needed() {






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-10-04 10:00 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 64+ messages in thread
From: Samuli Suominen (ssuominen) @ 2009-10-04 10:00 UTC (permalink / raw
  To: gentoo-commits

ssuominen    09/10/04 10:00:53

  Modified:             flag-o-matic.eclass
  Log:
  New function: no-as-needed which returns the value to disable asneeded, for GNU ld only at this time.

Revision  Changes    Path
1.145                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.145&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.145&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.144&r2=1.145

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -r1.144 -r1.145
--- flag-o-matic.eclass	16 Aug 2009 00:16:12 -0000	1.144
+++ flag-o-matic.eclass	4 Oct 2009 10:00:53 -0000	1.145
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.144 2009/08/16 00:16:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.145 2009/10/04 10:00:53 ssuominen Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -719,6 +719,14 @@
 	die "Stop using bindnow-flags."
 }
 
+# @FUNCTION: no-as-needed
+# @RETURN: Flag to disable asneeded behavior for use with append-ldflags.
+no-as-needed() {
+	case $($(tc-getLD) -v 2>&1 </dev/null) in
+		*GNU*) # GNU ld
+		echo "-Wl,--no-as-needed" ;;
+	esac
+}
 
 # Some tests for when we screw with things and want to make
 # sure we didn't break anything






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-08-15 18:04 Zac Medico (zmedico)
  0 siblings, 0 replies; 64+ messages in thread
From: Zac Medico (zmedico) @ 2009-08-15 18:04 UTC (permalink / raw
  To: gentoo-commits

zmedico     09/08/15 18:04:08

  Modified:             flag-o-matic.eclass
  Log:
  Bug #281311 - Escape ~ inside strip-flags().

Revision  Changes    Path
1.143                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.143&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.143&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.142&r2=1.143

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- flag-o-matic.eclass	29 Jul 2009 08:32:43 -0000	1.142
+++ flag-o-matic.eclass	15 Aug 2009 18:04:08 -0000	1.143
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.142 2009/07/29 08:32:43 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.143 2009/08/15 18:04:08 zmedico Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -325,7 +325,7 @@
 	local NEW_FCFLAGS=""
 
 	# Allow unstable C[XX]FLAGS if we are using unstable profile ...
-	if has ~$(tc-arch) ${ACCEPT_KEYWORDS} ; then
+	if has \~$(tc-arch) ${ACCEPT_KEYWORDS} ; then
 		ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}"
 	fi
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-07-29  8:32 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 64+ messages in thread
From: Samuli Suominen (ssuominen) @ 2009-07-29  8:32 UTC (permalink / raw
  To: gentoo-commits

ssuominen    09/07/29 08:32:43

  Modified:             flag-o-matic.eclass
  Log:
  err.

Revision  Changes    Path
1.142                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.142&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.142&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.141&r2=1.142

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- flag-o-matic.eclass	29 Jul 2009 08:31:32 -0000	1.141
+++ flag-o-matic.eclass	29 Jul 2009 08:32:43 -0000	1.142
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.141 2009/07/29 08:31:32 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.142 2009/07/29 08:32:43 ssuominen Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -716,7 +716,7 @@
 # DEPRECATED - Gets the flags needed for "NOW" binding
 bindnow-flags() {
 	eerror "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
-	die || "Stop using bindnow-flags."
+	die "Stop using bindnow-flags."
 }
 
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-07-29  8:31 Samuli Suominen (ssuominen)
  0 siblings, 0 replies; 64+ messages in thread
From: Samuli Suominen (ssuominen) @ 2009-07-29  8:31 UTC (permalink / raw
  To: gentoo-commits

ssuominen    09/07/29 08:31:32

  Modified:             flag-o-matic.eclass
  Log:
  Die if bindnow-flags is detected. Nothing in tree is using it anymore, including any of the old revisions.

Revision  Changes    Path
1.141                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.141&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.141&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.140&r2=1.141

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- flag-o-matic.eclass	20 Jul 2009 04:28:07 -0000	1.140
+++ flag-o-matic.eclass	29 Jul 2009 08:31:32 -0000	1.141
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.140 2009/07/20 04:28:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.141 2009/07/29 08:31:32 ssuominen Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -715,7 +715,8 @@
 # @DESCRIPTION:
 # DEPRECATED - Gets the flags needed for "NOW" binding
 bindnow-flags() {
-	ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
+	eerror "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
+	die || "Stop using bindnow-flags."
 }
 
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-07-20  4:28 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2009-07-20  4:28 UTC (permalink / raw
  To: gentoo-commits

vapier      09/07/20 04:28:07

  Modified:             flag-o-matic.eclass
  Log:
  add -mplt to allowed flags #278276 by Zhang Le

Revision  Changes    Path
1.140                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.140&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.140&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.139&r2=1.140

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -r1.139 -r1.140
--- flag-o-matic.eclass	9 Jun 2009 22:15:43 -0000	1.139
+++ flag-o-matic.eclass	20 Jul 2009 04:28:07 -0000	1.140
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.139 2009/06/09 22:15:43 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.140 2009/07/20 04:28:07 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -46,7 +46,7 @@
 		-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 \
 		-mno-sse4.2 -mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow \
 		-mno-popcnt -mno-abm \
-		-mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 \
+		-mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt \
 		-msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \
 		-mieee -mieee-with-inexact -mschedule \
 		-mtls-direct-seg-refs -mno-tls-direct-seg-refs \






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-06-09 22:15 Ryan Hill (dirtyepic)
  0 siblings, 0 replies; 64+ messages in thread
From: Ryan Hill (dirtyepic) @ 2009-06-09 22:15 UTC (permalink / raw
  To: gentoo-commits

dirtyepic    09/06/09 22:15:43

  Modified:             flag-o-matic.eclass
  Log:
  Update with new instruction sets.

Revision  Changes    Path
1.139                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.139&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.139&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.138&r2=1.139

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- flag-o-matic.eclass	26 May 2009 07:18:33 -0000	1.138
+++ flag-o-matic.eclass	9 Jun 2009 22:15:43 -0000	1.139
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.138 2009/05/26 07:18:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.139 2009/06/09 22:15:43 dirtyepic Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -43,7 +43,9 @@
 	ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \
 		-fno-strict-aliasing -fno-bounds-checking -fstrict-overflow -fno-omit-frame-pointer"
 	ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \
-		-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow \
+		-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 \
+		-mno-sse4.2 -mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow \
+		-mno-popcnt -mno-abm \
 		-mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 \
 		-msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \
 		-mieee -mieee-with-inexact -mschedule \






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-05-26  7:18 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2009-05-26  7:18 UTC (permalink / raw
  To: gentoo-commits

vapier      09/05/26 07:18:33

  Modified:             flag-o-matic.eclass
  Log:
  fix another think-o in append-flags unification #271141 by Sebastian Lechte

Revision  Changes    Path
1.138                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.138&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.138&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.137&r2=1.138

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- flag-o-matic.eclass	24 May 2009 00:33:33 -0000	1.137
+++ flag-o-matic.eclass	26 May 2009 07:18:33 -0000	1.138
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.137 2009/05/24 00:33:33 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.138 2009/05/26 07:18:33 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -182,7 +182,7 @@
 append-flags() {
 	[[ -z $* ]] && return 0
 	append-cflags "$@"
-	append-cppflags "$@"
+	append-cxxflags "$@"
 	append-fflags "$@"
 	return 0
 }






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-05-24  0:33 Michael Sterrett (mr_bones_)
  0 siblings, 0 replies; 64+ messages in thread
From: Michael Sterrett (mr_bones_) @ 2009-05-24  0:33 UTC (permalink / raw
  To: gentoo-commits

mr_bones_    09/05/24 00:33:33

  Modified:             flag-o-matic.eclass
  Log:
  typo fix: cpp->c for append-cflags

Revision  Changes    Path
1.137                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.137&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.137&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.136&r2=1.137

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- flag-o-matic.eclass	23 May 2009 23:12:07 -0000	1.136
+++ flag-o-matic.eclass	24 May 2009 00:33:33 -0000	1.137
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.136 2009/05/23 23:12:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.137 2009/05/24 00:33:33 mr_bones_ Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -140,7 +140,7 @@
 # @USAGE: <flags>
 # @DESCRIPTION:
 # Add extra <flags> to the current CFLAGS.
-append-cppflags() {
+append-cflags() {
 	[[ -z $* ]] && return 0
 	export CFLAGS="${CFLAGS} $*"
 	return 0






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-05-23 23:12 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2009-05-23 23:12 UTC (permalink / raw
  To: gentoo-commits

vapier      09/05/23 23:12:07

  Modified:             flag-o-matic.eclass
  Log:
  add a dedicated append-cflags function and define append-flags in terms of other append-*flags functions

Revision  Changes    Path
1.136                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.136&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.136&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.135&r2=1.136

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -r1.135 -r1.136
--- flag-o-matic.eclass	23 May 2009 23:06:55 -0000	1.135
+++ flag-o-matic.eclass	23 May 2009 23:12:07 -0000	1.136
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.135 2009/05/23 23:06:55 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.136 2009/05/23 23:12:07 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -136,6 +136,16 @@
 	return 0
 }
 
+# @FUNCTION: append-cflags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Add extra <flags> to the current CFLAGS.
+append-cppflags() {
+	[[ -z $* ]] && return 0
+	export CFLAGS="${CFLAGS} $*"
+	return 0
+}
+
 # @FUNCTION: append-cxxflags
 # @USAGE: <flags>
 # @DESCRIPTION:
@@ -171,10 +181,9 @@
 # Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
 append-flags() {
 	[[ -z $* ]] && return 0
-	export CFLAGS="${CFLAGS} $*"
-	export CXXFLAGS="${CXXFLAGS} $*"
-	export FFLAGS="${FFLAGS} $*"
-	export FCFLAGS="${FCFLAGS} $*"
+	append-cflags "$@"
+	append-cppflags "$@"
+	append-fflags "$@"
 	return 0
 }
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-04-04 17:57 Fabian Groffen (grobian)
  0 siblings, 0 replies; 64+ messages in thread
From: Fabian Groffen (grobian) @ 2009-04-04 17:57 UTC (permalink / raw
  To: gentoo-commits

grobian     09/04/04 17:57:54

  Modified:             flag-o-matic.eclass
  Log:
  backport fix for x86-macos in filter-flags from Prefix

Revision  Changes    Path
1.133                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.133&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.133&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.132&r2=1.133

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- flag-o-matic.eclass	21 Jan 2009 00:42:20 -0000	1.132
+++ flag-o-matic.eclass	4 Apr 2009 17:57:54 -0000	1.133
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.132 2009/01/21 00:42:20 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.133 2009/04/04 17:57:54 grobian Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -52,6 +52,12 @@
 		-m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
 		-msecure-plt -m*-toc -D* -U*"
+	
+	# killing these two on OSX/Intel will disable SSE, resulting in failing
+	# compilations, as the headers expect SSE to be enabled (Apple knows what
+	# hardware they run on afterall, don't they?)
+	[[ ${CHOST} == i?86-apple-darwin* ]] \
+		&& ALLOWED_FLAGS="${ALLOWED_FLAGS} -march=prescott -march=nocona"
 
 	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-01-21  0:42 Gordon Malm (gengor)
  0 siblings, 0 replies; 64+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-21  0:42 UTC (permalink / raw
  To: gentoo-commits

gengor      09/01/21 00:42:20

  Modified:             flag-o-matic.eclass
  Log:
  Add append-cxxflags function

Revision  Changes    Path
1.132                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.132&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.132&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.131&r2=1.132

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- flag-o-matic.eclass	8 Jan 2009 11:29:06 -0000	1.131
+++ flag-o-matic.eclass	21 Jan 2009 00:42:20 -0000	1.132
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.131 2009/01/08 11:29:06 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.132 2009/01/21 00:42:20 gengor Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -136,6 +136,16 @@
 	return 0
 }
 
+# @FUNCTION: append-cxxflags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Add extra <flags> to the current CXXFLAGS.
+append-cxxflags() {
+	[[ -z $* ]] && return 0
+	export CXXFLAGS="${CXXFLAGS} $*"
+	return 0
+}
+
 # @FUNCTION: append-fflags
 # @USAGE: <flags>
 # @DESCRIPTION:






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-01-08 11:29 Gordon Malm (gengor)
  0 siblings, 0 replies; 64+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-08 11:29 UTC (permalink / raw
  To: gentoo-commits

gengor      09/01/08 11:29:06

  Modified:             flag-o-matic.eclass
  Log:
  Only append flags in _filter-hardened if they are valid

Revision  Changes    Path
1.131                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.131&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.131&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.130&r2=1.131

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- flag-o-matic.eclass	8 Jan 2009 08:12:55 -0000	1.130
+++ flag-o-matic.eclass	8 Jan 2009 11:29:06 -0000	1.131
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.130 2009/01/08 08:12:55 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.131 2009/01/08 11:29:06 gengor Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -73,13 +73,13 @@
 				is-flagq -nopie || append-flags -nopie;;
 			-fstack-protector)
 				gcc-specs-ssp || continue
-				is-flagq -fno-stack-protector || append-flags -fno-stack-protector;;
+				is-flagq -fno-stack-protector || append-flags $(test-flags -fno-stack-protector);;
 			-fstack-protector-all)
 				gcc-specs-ssp-to-all || continue
-				is-flagq -fno-stack-protector-all || append-flags -fno-stack-protector-all;;
+				is-flagq -fno-stack-protector-all || append-flags $(test-flags -fno-stack-protector-all);;
 			-fno-strict-overflow)
 				gcc-specs-nostrict || continue
-				is-flagq -fstrict-overflow || append-flags -fstrict-overflow;;
+				is-flagq -fstrict-overflow || append-flags $(test-flags -fstrict-overflow);;
 		esac
 	done
 }






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-01-08  8:12 Gordon Malm (gengor)
  0 siblings, 0 replies; 64+ messages in thread
From: Gordon Malm (gengor) @ 2009-01-08  8:12 UTC (permalink / raw
  To: gentoo-commits

gengor      09/01/08 08:12:55

  Modified:             flag-o-matic.eclass
  Log:
  Fix typo, there is no gcc-specs-ssp-all function

Revision  Changes    Path
1.130                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.130&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.130&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.129&r2=1.130

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- flag-o-matic.eclass	4 Jan 2009 17:22:16 -0000	1.129
+++ flag-o-matic.eclass	8 Jan 2009 08:12:55 -0000	1.130
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.129 2009/01/04 17:22:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.130 2009/01/08 08:12:55 gengor Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -558,7 +558,7 @@
 	# note; this matches only -fstack-protector-all
 	[[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \
 	   -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \
-	gcc-specs-ssp-all
+	gcc-specs-ssp-to-all
 }
 
 # @FUNCTION: has_ssp






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2009-01-04 17:22 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2009-01-04 17:22 UTC (permalink / raw
  To: gentoo-commits

vapier      09/01/04 17:22:16

  Modified:             flag-o-matic.eclass
  Log:
  neuter bindnow-flags even more

Revision  Changes    Path
1.129                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.129&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.129&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.128&r2=1.129

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- flag-o-matic.eclass	2 Jan 2009 22:14:18 -0000	1.128
+++ flag-o-matic.eclass	4 Jan 2009 17:22:16 -0000	1.129
@@ -1,6 +1,6 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.128 2009/01/02 22:14:18 gengor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.129 2009/01/04 17:22:16 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -694,21 +694,7 @@
 # @DESCRIPTION:
 # DEPRECATED - Gets the flags needed for "NOW" binding
 bindnow-flags() {
-	ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild" >&2
-
-	case $($(tc-getLD) -v 2>&1 </dev/null) in
-	*GNU* | *'with BFD'*) # GNU ld
-		echo "-Wl,-z,now" ;;
-	*Apple*) # Darwin ld
-		echo "-bind_at_load" ;;
-	*)
-		# Some linkers just recognize -V instead of -v
-		case $($(tc-getLD) -V 2>&1 </dev/null) in
-			*Solaris*) # Solaris accept almost the same GNU options
-				echo "-Wl,-z,now" ;;
-		esac
-		;;
-	esac
+	ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
 }
 
 






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-12-21 21:40 Ned Ludd (solar)
  0 siblings, 0 replies; 64+ messages in thread
From: Ned Ludd (solar) @ 2008-12-21 21:40 UTC (permalink / raw
  To: gentoo-commits

solar       08/12/21 21:40:49

  Modified:             flag-o-matic.eclass
  Log:
  gcc emits -fstrict-overflow on '>gcc-4.2' need to be able to disable that and pass -U to undefine bad defines - http://gcc.gnu.org/gcc-4.2/changes.html

Revision  Changes    Path
1.127                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.127&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.127&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.126&r2=1.127

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- flag-o-matic.eclass	3 Nov 2008 05:52:39 -0000	1.126
+++ flag-o-matic.eclass	21 Dec 2008 21:40:49 -0000	1.127
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.126 2008/11/03 05:52:39 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.127 2008/12/21 21:40:49 solar Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -33,7 +33,7 @@
 		export ALLOWED_FLAGS="-pipe"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fstack-protector-all"
-		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking"
+		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking -fno-strict-overflow"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+"
 		export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident"
@@ -41,7 +41,7 @@
 	fi
 	# allow a bunch of flags that negate features / control ABI
 	ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \
-		-fno-strict-aliasing -fno-bounds-checking"
+		-fno-strict-aliasing -fno-bounds-checking -fstrict-overflow"
 	ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \
 		-mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow \
 		-mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 \
@@ -51,7 +51,7 @@
 		-mflat -mno-flat -mno-faster-structs -mfaster-structs \
 		-m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
-		-msecure-plt -m*-toc -D*"
+		-msecure-plt -m*-toc -D* -U*"
 
 	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-11-03  5:52 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2008-11-03  5:52 UTC (permalink / raw
  To: gentoo-commits

vapier      08/11/03 05:52:39

  Modified:             flag-o-matic.eclass
  Log:
  do not filter TOC related flags for ppc64

Revision  Changes    Path
1.126                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.126&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.126&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.125&r2=1.126

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -r1.125 -r1.126
--- flag-o-matic.eclass	14 Sep 2008 19:43:41 -0000	1.125
+++ flag-o-matic.eclass	3 Nov 2008 05:52:39 -0000	1.126
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.125 2008/09/14 19:43:41 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.126 2008/11/03 05:52:39 vapier Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -51,7 +51,7 @@
 		-mflat -mno-flat -mno-faster-structs -mfaster-structs \
 		-m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
-		-msecure-plt -D*"
+		-msecure-plt -m*-toc -D*"
 
 	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-09-14 19:43 Ryan Hill (dirtyepic)
  0 siblings, 0 replies; 64+ messages in thread
From: Ryan Hill (dirtyepic) @ 2008-09-14 19:43 UTC (permalink / raw
  To: gentoo-commits

dirtyepic    08/09/14 19:43:41

  Modified:             flag-o-matic.eclass
  Log:
  Also declare new_FFLAGS and new_FCFLAGS as arrays in replace-flags().  Bug #234249.

Revision  Changes    Path
1.125                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.125&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.125&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.124&r2=1.125

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- flag-o-matic.eclass	3 Jul 2008 05:30:54 -0000	1.124
+++ flag-o-matic.eclass	14 Sep 2008 19:43:41 -0000	1.125
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.124 2008/07/03 05:30:54 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.125 2008/09/14 19:43:41 dirtyepic Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -175,7 +175,7 @@
 		&& die "replace-flags takes 2 arguments, not $#"
 
 	local f fset
-	declare -a new_CFLAGS new_CXXFLAGS
+	declare -a new_CFLAGS new_CXXFLAGS new_FFLAGS new_FCFLAGS
 
 	for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do
 		# Looping over the flags instead of using a global






^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-07-03  5:30 Donnie Berkholz (dberkholz)
  0 siblings, 0 replies; 64+ messages in thread
From: Donnie Berkholz (dberkholz) @ 2008-07-03  5:30 UTC (permalink / raw
  To: gentoo-commits

dberkholz    08/07/03 05:30:54

  Modified:             flag-o-matic.eclass
  Log:
  [Fortran] Add Fortran support to filter-flags(), append-flags(), is-flagq(), strip-flags(), strip-unsupported-flags(), get-flag(). Add new functions parallel to existing ones for Fortran: append-fflags(), test-flag-F77(), test-flags-FC().

Revision  Changes    Path
1.124                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.124&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.124&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.123&r2=1.124

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- flag-o-matic.eclass	7 Jun 2008 16:42:32 -0000	1.123
+++ flag-o-matic.eclass	3 Jul 2008 05:30:54 -0000	1.124
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.123 2008/06/07 16:42:32 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.124 2008/07/03 05:30:54 dberkholz Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -26,7 +26,7 @@
 # has_ssp
 
 
-# C[XX]FLAGS that we allow in strip-flags
+# {C,CXX,F,FC}FLAGS that we allow in strip-flags
 # Note: shell globs and character lists are allowed
 setup-allowed-flags() {
 	if [[ -z ${ALLOWED_FLAGS} ]] ; then
@@ -53,7 +53,7 @@
 		-mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \
 		-msecure-plt -D*"
 
-	# C[XX]FLAGS that we are think is ok, but needs testing
+	# {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing
 	# NOTE:  currently -Os have issues with gcc3 and K6* arch's
 	export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks"
 	return 0
@@ -104,12 +104,14 @@
 # @FUNCTION: filter-flags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Remove particular <flags> from {C,CPP,CXX}FLAGS.  Accepts shell globs.
+# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS.  Accepts shell globs.
 filter-flags() {
 	_filter-hardened "$@"
 	_filter-var CFLAGS "$@"
 	_filter-var CPPFLAGS "$@"
 	_filter-var CXXFLAGS "$@"
+	_filter-var FFLAGS "$@"
+	_filter-var FCFLAGS "$@"
 	return 0
 }
 
@@ -131,6 +133,17 @@
 	return 0
 }
 
+# @FUNCTION: append-fflags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Add extra <flags> to the current {F,FC}FLAGS.
+append-fflags() {
+	[[ -z $* ]] && return 0
+	export FFLAGS="${FFLAGS} $*"
+	export FCFLAGS="${FCFLAGS} $*"
+	return 0
+}
+
 # @FUNCTION: append-lfs-flags
 # @DESCRIPTION:
 # Add flags that enable Large File Support.
@@ -142,11 +155,13 @@
 # @FUNCTION: append-flags
 # @USAGE: <flags>
 # @DESCRIPTION:
-# Add extra <flags> to your current C[XX]FLAGS.
+# Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
 append-flags() {
 	[[ -z $* ]] && return 0
 	export CFLAGS="${CFLAGS} $*"
 	export CXXFLAGS="${CXXFLAGS} $*"
+	export FFLAGS="${FFLAGS} $*"
+	export FCFLAGS="${FCFLAGS} $*"
 	return 0
 }
 
@@ -162,7 +177,7 @@
 	local f fset
 	declare -a new_CFLAGS new_CXXFLAGS
 
-	for fset in CFLAGS CXXFLAGS; do
+	for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do
 		# Looping over the flags instead of using a global
 		# substitution ensures that we're working with flag atoms.
 		# Otherwise globs like -O* have the potential to wipe out the
@@ -207,16 +222,16 @@
 # @FUNCTION: is-flagq
 # @USAGE: <flag>
 # @DESCRIPTION:
-# Returns shell true if <flag> is in C[XX]FLAGS, else returns shell false.  Accepts shell globs.
+# Returns shell true if <flag> is in {C,CXX,F,FC}FLAGS, else returns shell false.  Accepts shell globs.
 is-flagq() {
 	[[ -n $2 ]] && die "Usage: is-flag <flag>"
-	_is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1
+	_is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 || _is_flagq FFLAGS $1 || _is_flagq FCFLAGS $1
 }
 
 # @FUNCTION: is-flag
 # @USAGE: <flag>
 # @DESCRIPTION:
-# Echo's "true" if flag is set in C[XX]FLAGS.  Accepts shell globs.
+# Echo's "true" if flag is set in {C,CXX,F,FC}FLAGS.  Accepts shell globs.
 is-flag() {
 	is-flagq "$@" && echo true
 }
@@ -276,12 +291,14 @@
 # @DESCRIPTION:
 # Strip C[XX]FLAGS of everything except known good/safe flags.
 strip-flags() {
-	local x y flag NEW_CFLAGS NEW_CXXFLAGS
+	local x y flag NEW_CFLAGS NEW_CXXFLAGS NEW_FFLAGS NEW_FCFLAGS
 
 	setup-allowed-flags
 
 	local NEW_CFLAGS=""
 	local NEW_CXXFLAGS=""
+	local NEW_FFLAGS=""
+	local NEW_FCFLAGS=""
 
 	# Allow unstable C[XX]FLAGS if we are using unstable profile ...
 	if has ~$(tc-arch) ${ACCEPT_KEYWORDS} ; then
@@ -310,6 +327,26 @@
 		done
 	done
 
+	for x in ${FFLAGS}; do
+		for y in ${ALLOWED_FLAGS}; do
+			flag=${x%%=*}
+			if [ "${flag%%${y}}" = "" ] ; then
+				NEW_FFLAGS="${NEW_FFLAGS} ${x}"
+				break
+			fi
+		done
+	done
+
+	for x in ${FCFLAGS}; do
+		for y in ${ALLOWED_FLAGS}; do
+			flag=${x%%=*}
+			if [ "${flag%%${y}}" = "" ] ; then
+				NEW_FCFLAGS="${NEW_FCFLAGS} ${x}"
+				break
+			fi
+		done
+	done
+
 	# In case we filtered out all optimization flags fallback to -O2
 	if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then
 		NEW_CFLAGS="${NEW_CFLAGS} -O2"
@@ -317,11 +354,19 @@
 	if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then
 		NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2"
 	fi
+	if [ "${FFLAGS/-O}" != "${FFLAGS}" -a "${NEW_FFLAGS/-O}" = "${NEW_FFLAGS}" ]; then
+		NEW_FFLAGS="${NEW_FFLAGS} -O2"
+	fi
+	if [ "${FCFLAGS/-O}" != "${FCFLAGS}" -a "${NEW_FCFLAGS/-O}" = "${NEW_FCFLAGS}" ]; then
+		NEW_FCFLAGS="${NEW_FCFLAGS} -O2"
+	fi
 
 	set +f	# re-enable pathname expansion
 
 	export CFLAGS="${NEW_CFLAGS}"
 	export CXXFLAGS="${NEW_CXXFLAGS}"
+	export FFLAGS="${NEW_FFLAGS}"
+	export FCFLAGS="${NEW_FCFLAGS}"
 	return 0
 }
 
@@ -349,6 +394,18 @@
 # Returns shell true if <flag> is supported by the C++ compiler, else returns shell false.
 test-flag-CXX() { test-flag-PROG "CXX" "$1"; }
 
+# @FUNCTION: test-flag-F77
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false.
+test-flag-F77() { test-flag-PROG "F77" "$1"; }
+
+# @FUNCTION: test-flag-FC
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false.
+test-flag-FC() { test-flag-PROG "FC" "$1"; }
+
 test-flags-PROG() {
 	local comp=$1
 	local flags
@@ -381,6 +438,18 @@
 # Returns shell true if <flags> are supported by the C++ compiler, else returns shell false.
 test-flags-CXX() { test-flags-PROG "CXX" "$@"; }
 
+# @FUNCTION: test-flags-F77
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Returns shell true if <flags> are supported by the Fortran 77 compiler, else returns shell false.
+test-flags-F77() { test-flags-PROG "F77" "$@"; }
+
+# @FUNCTION: test-flags-FC
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Returns shell true if <flags> are supported by the Fortran 90 compiler, else returns shell false.
+test-flags-FC() { test-flags-PROG "FC" "$@"; }
+
 # @FUNCTION: test-flags
 # @USAGE: <flags>
 # @DESCRIPTION:
@@ -412,10 +481,12 @@
 
 # @FUNCTION: strip-unsupported-flags
 # @DESCRIPTION:
-# Strip C[XX]FLAGS of any flags not supported by the active toolchain.
+# Strip {C,CXX,F,FC}FLAGS of any flags not supported by the active toolchain.
 strip-unsupported-flags() {
 	export CFLAGS=$(test-flags-CC ${CFLAGS})
 	export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS})
+	export FFLAGS=$(test-flags-F77 ${FFLAGS})
+	export FCFLAGS=$(test-flags-FC ${FCFLAGS})
 }
 
 # @FUNCTION: get-flag
@@ -430,7 +501,7 @@
 	# for example, if CFLAGS="-march=i686":
 	# `get-flag -march` == "-march=i686"
 	# `get-flag march` == "i686"
-	for f in ${CFLAGS} ${CXXFLAGS} ; do
+	for f in ${CFLAGS} ${CXXFLAGS} ${FFLAGS} ${FCFLAGS} ; do
 		if [ "${f/${findflag}}" != "${f}" ] ; then
 			printf "%s\n" "${f/-${findflag}=}"
 			return 0



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-06-07 16:42 Diego Petteno (flameeyes)
  0 siblings, 0 replies; 64+ messages in thread
From: Diego Petteno (flameeyes) @ 2008-06-07 16:42 UTC (permalink / raw
  To: gentoo-commits

flameeyes    08/06/07 16:42:32

  Modified:             flag-o-matic.eclass
  Log:
  Warn when using append-ldflags to pass libraries to link to.
  
  Libraries shouldn't be passed as LDFLAGS, the flags should be passed
  before the object files to link, while libraries should be passed
  after. Passing libraries through LDFLAGS is one of the causes of
  --as-needed failures.

Revision  Changes    Path
1.123                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.123&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.123&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.122&r2=1.123

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- flag-o-matic.eclass	18 Feb 2008 18:20:47 -0000	1.122
+++ flag-o-matic.eclass	7 Jun 2008 16:42:32 -0000	1.123
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.122 2008/02/18 18:20:47 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.123 2008/06/07 16:42:32 flameeyes Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -579,6 +579,12 @@
 # Add extra <flags> to the current LDFLAGS.
 append-ldflags() {
 	[[ -z $* ]] && return 0
+	local flag
+	for flag in "$@"; do
+		[[ ${flag} == -l* ]] && \
+			ewarn "Appending a library link instruction (${flag}); libraries to link to should not be passed through LDFLAGS"
+	done
+
 	export LDFLAGS="${LDFLAGS} $*"
 	return 0
 }



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-02-18 18:20 Sven Wegener (swegener)
  0 siblings, 0 replies; 64+ messages in thread
From: Sven Wegener (swegener) @ 2008-02-18 18:20 UTC (permalink / raw
  To: gentoo-commits

swegener    08/02/18 18:20:47

  Modified:             flag-o-matic.eclass
  Log:
  redirect the ewarn message to stderr

Revision  Changes    Path
1.122                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.122&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.122&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.121&r2=1.122

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- flag-o-matic.eclass	16 Feb 2008 22:43:04 -0000	1.121
+++ flag-o-matic.eclass	18 Feb 2008 18:20:47 -0000	1.122
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.121 2008/02/16 22:43:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.122 2008/02/18 18:20:47 swegener Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -614,7 +614,7 @@
 # @DESCRIPTION:
 # DEPRECATED - Gets the flags needed for "NOW" binding
 bindnow-flags() {
-	ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
+	ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild" >&2
 
 	case $($(tc-getLD) -v 2>&1 </dev/null) in
 	*GNU* | *'with BFD'*) # GNU ld



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 64+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
@ 2008-02-16 22:43 Mike Frysinger (vapier)
  0 siblings, 0 replies; 64+ messages in thread
From: Mike Frysinger (vapier) @ 2008-02-16 22:43 UTC (permalink / raw
  To: gentoo-commits

vapier      08/02/16 22:43:04

  Modified:             flag-o-matic.eclass
  Log:
  add eclass documentation #210394 by mren

Revision  Changes    Path
1.121                eclass/flag-o-matic.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.121&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.121&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.120&r2=1.121

Index: flag-o-matic.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- flag-o-matic.eclass	22 Jul 2007 08:21:09 -0000	1.120
+++ flag-o-matic.eclass	16 Feb 2008 22:43:04 -0000	1.121
@@ -1,67 +1,17 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.120 2007/07/22 08:21:09 dberkholz Exp $
-#
-# Maintainer: toolchain@gentoo.org
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.121 2008/02/16 22:43:04 vapier Exp $
+
+# @ECLASS: flag-o-matic.eclass
+# @MAINTAINER:
+# toolchain@gentoo.org
+# @BLURB: common functions to manipulate and query toolchain flags
+# @DESCRIPTION:
+# This eclass contains a suite of functions to help developers sanely
+# and safely manage toolchain flags in their builds.
 
-# need access to emktemp()
 inherit eutils toolchain-funcs multilib
 
-#
-#### filter-flags <flags> ####
-# Remove particular flags from C[XX]FLAGS
-# Matches only complete flags
-#
-#### append-flags <flags> ####
-# Add extra flags to your current C[XX]FLAGS
-#
-#### replace-flags <orig.flag> <new.flag> ###
-# Replace a flag by another one
-#
-#### replace-cpu-flags <old.cpus> <new.cpu> ###
-# Replace march/mcpu flags that specify <old.cpus>
-# with flags that specify <new.cpu>
-#
-#### is-flag[q] <flag> ####
-# Returns "true" if flag is set in C[XX]FLAGS
-# Matches only complete a flag
-# q version sets return code but doesn't echo
-#
-#### is-ldflag[q] <flag> ####
-# Returns "true" if flag is set in LDFLAGS
-# Matches only complete a flag
-# q version sets return code but doesn't echo
-#
-#### strip-flags ####
-# Strip C[XX]FLAGS of everything except known
-# good options.
-#
-#### strip-unsupported-flags ####
-# Strip C[XX]FLAGS of any flags not supported by
-# installed version of gcc
-#
-#### get-flag <flag> ####
-# Find and echo the value for a particular flag
-#
-#### replace-sparc64-flags ####
-# Sets mcpu to v8 and uses the original value
-# as mtune if none specified.
-#
-#### filter-mfpmath <math types> ####
-# Remove specified math types from the fpmath specification
-# If the user has -mfpmath=sse,386, running `filter-mfpmath sse`
-# will leave the user with -mfpmath=386
-#
-#### append-ldflags ####
-# Add extra flags to your current LDFLAGS
-#
-#### filter-ldflags <flags> ####
-# Remove particular flags from LDFLAGS
-# Matches only complete flags
-#
-#### bindnow-flags ####
-# Returns the flags to enable "now" binding in the current selected linker.
-#
 ################ DEPRECATED functions ################
 # The following are still present to avoid breaking existing
 # code more than necessary; however they are deprecated. Please
@@ -69,27 +19,12 @@
 # need to know which hardened techs are active in the compiler.
 # See bug #100974
 #
-#### has_hardened ####
-# Returns true if the compiler has 'Hardened' in its version string,
-# (note; switched-spec vanilla compilers satisfy this condition) or
-# the specs file name contains 'hardened'.
-#
-#### has_pie ####
-# Returns true if the compiler by default or with current CFLAGS
-# builds position-independent code.
-#
-#### has_pic ####
-# Returns true if the compiler by default or with current CFLAGS
-# builds position-independent code.
-#
-#### has_ssp_all ####
-# Returns true if the compiler by default or with current CFLAGS
-# generates stack smash protections for all functions
-#
-#### has_ssp ####
-# Returns true if the compiler by default or with current CFLAGS
-# generates stack smash protections for most vulnerable functions
-#
+# has_hardened
+# has_pie
+# has_pic
+# has_ssp_all
+# has_ssp
+
 
 # C[XX]FLAGS that we allow in strip-flags
 # Note: shell globs and character lists are allowed
@@ -166,6 +101,10 @@
 	eval export ${VAR}=\${new\[*]}
 }
 
+# @FUNCTION: filter-flags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Remove particular <flags> from {C,CPP,CXX}FLAGS.  Accepts shell globs.
 filter-flags() {
 	_filter-hardened "$@"
 	_filter-var CFLAGS "$@"
@@ -174,22 +113,36 @@
 	return 0
 }
 
+# @FUNCTION: filter-lfs-flags
+# @DESCRIPTION:
+# Remove flags that enable Large File Support.
 filter-lfs-flags() {
 	[[ -n $@ ]] && die "filter-lfs-flags takes no arguments"
 	filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 }
 
+# @FUNCTION: append-cppflags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Add extra <flags> to the current CPPFLAGS.
 append-cppflags() {
 	[[ -z $* ]] && return 0
 	export CPPFLAGS="${CPPFLAGS} $*"
 	return 0
 }
 
+# @FUNCTION: append-lfs-flags
+# @DESCRIPTION:
+# Add flags that enable Large File Support.
 append-lfs-flags() {
 	[[ -n $@ ]] && die "append-lfs-flags takes no arguments"
 	append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 }
 
+# @FUNCTION: append-flags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Add extra <flags> to your current C[XX]FLAGS.
 append-flags() {
 	[[ -z $* ]] && return 0
 	export CFLAGS="${CFLAGS} $*"
@@ -197,6 +150,10 @@
 	return 0
 }
 
+# @FUNCTION: replace-flags
+# @USAGE: <old> <new>
+# @DESCRIPTION:
+# Replace the <old> flag with <new>.  Accepts shell globs for <old>.
 replace-flags() {
 	[[ $# != 2 ]] \
 		&& echo && eerror "Usage: replace-flags <old flag> <new flag>" \
@@ -221,6 +178,11 @@
 	return 0
 }
 
+# @FUNCTION: replace-cpu-flags
+# @USAGE: <old> <new>
+# @DESCRIPTION:
+# Replace cpu flags (like -march/-mcpu/-mtune) that select the <old> cpu
+# with flags that select the <new> cpu.  Accepts shell globs for <old>.
 replace-cpu-flags() {
 	local newcpu="$#" ; newcpu="${!newcpu}"
 	while [ $# -gt 1 ] ; do
@@ -242,24 +204,46 @@
 	return 1
 }
 
+# @FUNCTION: is-flagq
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Returns shell true if <flag> is in C[XX]FLAGS, else returns shell false.  Accepts shell globs.
 is-flagq() {
 	[[ -n $2 ]] && die "Usage: is-flag <flag>"
 	_is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1
 }
 
+# @FUNCTION: is-flag
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Echo's "true" if flag is set in C[XX]FLAGS.  Accepts shell globs.
 is-flag() {
 	is-flagq "$@" && echo true
 }
 
+# @FUNCTION: is-ldflagq
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Returns shell true if <flag> is in LDFLAGS, else returns shell false.  Accepts shell globs.
 is-ldflagq() {
 	[[ -n $2 ]] && die "Usage: is-ldflag <flag>"
 	_is_flagq LDFLAGS $1
 }
 
+# @FUNCTION: is-ldflag
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Echo's "true" if flag is set in LDFLAGS.  Accepts shell globs.
 is-ldflag() {
 	is-ldflagq "$@" && echo true
 }
 
+# @FUNCTION: filter-mfpmath
+# @USAGE: <math types>
+# @DESCRIPTION:
+# Remove specified math types from the fpmath flag.  For example, if the user
+# has -mfpmath=sse,386, running `filter-mfpmath sse` will leave the user with
+# -mfpmath=386.
 filter-mfpmath() {
 	local orig_mfpmath new_math prune_math
 
@@ -288,6 +272,9 @@
 	return 0
 }
 
+# @FUNCTION: strip-flags
+# @DESCRIPTION:
+# Strip C[XX]FLAGS of everything except known good/safe flags.
 strip-flags() {
 	local x y flag NEW_CFLAGS NEW_CXXFLAGS
 
@@ -350,10 +337,16 @@
 		> /dev/null 2>&1
 }
 
-# Returns true if C compiler support given flag
+# @FUNCTION: test-flag-CC
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Returns shell true if <flag> is supported by the C compiler, else returns shell false.
 test-flag-CC() { test-flag-PROG "CC" "$1"; }
 
-# Returns true if C++ compiler support given flag
+# @FUNCTION: test-flag-CXX
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Returns shell true if <flag> is supported by the C++ compiler, else returns shell false.
 test-flag-CXX() { test-flag-PROG "CXX" "$1"; }
 
 test-flags-PROG() {
@@ -376,23 +369,39 @@
 	[[ -n ${flags} ]]
 }
 
-# Returns (echo's) the given flags supported by the C compiler
+# @FUNCTION: test-flags-CC
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Returns shell true if <flags> are supported by the C compiler, else returns shell false.
 test-flags-CC() { test-flags-PROG "CC" "$@"; }
 
-# Returns (echo's) the given flags supported by the C++ compiler
+# @FUNCTION: test-flags-CXX
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Returns shell true if <flags> are supported by the C++ compiler, else returns shell false.
 test-flags-CXX() { test-flags-PROG "CXX" "$@"; }
 
+# @FUNCTION: test-flags
+# @USAGE: <flags>
+# @DESCRIPTION:
 # Short-hand that should hopefully work for both C and C++ compiler, but
 # its really only present due to the append-flags() abomination.
 test-flags() { test-flags-CC "$@"; }
 
-# Depriciated, use test-flags()
+# @FUNCTION: test_flag
+# @DESCRIPTION:
+# DEPRICIATED, use test-flags()
 test_flag() {
 	ewarn "test_flag: deprecated, please use test-flags()!" >&2
 
 	test-flags-CC "$@"
 }
 
+# @FUNCTION: test_version_info
+# @USAGE: <version>
+# @DESCRIPTION:
+# Returns shell true if the current C compiler version matches <version>, else returns shell false.
+# Accepts shell globs.
 test_version_info() {
 	if [[ $($(tc-getCC) --version 2>&1) == *$1* ]]; then
 		return 0
@@ -401,11 +410,18 @@
 	fi
 }
 
+# @FUNCTION: strip-unsupported-flags
+# @DESCRIPTION:
+# Strip C[XX]FLAGS of any flags not supported by the active toolchain.
 strip-unsupported-flags() {
 	export CFLAGS=$(test-flags-CC ${CFLAGS})
 	export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS})
 }
 
+# @FUNCTION: get-flag
+# @USAGE: <flag>
+# @DESCRIPTION:
+# Find and echo the value for a particular flag.  Accepts shell globs.
 get-flag() {
 	local f findflag="$1"
 
@@ -423,6 +439,8 @@
 	return 1
 }
 
+# @FUNCTION: has_hardened
+# @DESCRIPTION:
 # DEPRECATED - use gcc-specs-relro or gcc-specs-now from toolchain-funcs
 has_hardened() {
 	ewarn "has_hardened: deprecated, please use gcc-specs-{relro,now}()!" >&2
@@ -432,6 +450,8 @@
 	[[ -f ${GCC_SPECS} && ${GCC_SPECS} != ${GCC_SPECS/hardened/} ]]
 }
 
+# @FUNCTION: has_pic
+# @DESCRIPTION:
 # DEPRECATED - use gcc-specs-pie from toolchain-funcs
 # indicate whether PIC is set
 has_pic() {
@@ -442,6 +462,8 @@
 	gcc-specs-pie
 }
 
+# @FUNCTION: has_pie
+# @DESCRIPTION:
 # DEPRECATED - use gcc-specs-pie from toolchain-funcs
 # indicate whether PIE is set
 has_pie() {
@@ -452,6 +474,8 @@
 	gcc-specs-pie
 }
 
+# @FUNCTION: has_ssp_all
+# @DESCRIPTION:
 # DEPRECATED - use gcc-specs-ssp from toolchain-funcs
 # indicate whether code for SSP is being generated for all functions
 has_ssp_all() {
@@ -463,6 +487,8 @@
 	gcc-specs-ssp-all
 }
 
+# @FUNCTION: has_ssp
+# @DESCRIPTION:
 # DEPRECATED - use gcc-specs-ssp from toolchain-funcs
 # indicate whether code for SSP is being generated
 has_ssp() {
@@ -474,6 +500,11 @@
 	gcc-specs-ssp
 }
 
+# @FUNCTION: has_m64
+# @DESCRIPTION:
+# This doesn't test if the flag is accepted, it tests if the flag actually
+# WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works
+# return code is 0, else the return code is 1.
 has_m64() {
 	# this doesnt test if the flag is accepted, it tests if the flag
 	# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
@@ -490,6 +521,11 @@
 	return 1
 }
 
+# @FUNCTION: has_m32
+# @DESCRIPTION:
+# This doesn't test if the flag is accepted, it tests if the flag actually
+# WORKS. Non-mulilib gcc will take both -m32 and -64. If the flag works return
+# code is 0, else return code is 1.
 has_m32() {
 	# this doesnt test if the flag is accepted, it tests if the flag
 	# actually -WORKS-. non-multilib gcc will take both -m32 and -m64!
@@ -508,6 +544,9 @@
 	return 1
 }
 
+# @FUNCTION: replace-sparc64-flags
+# @DESCRIPTION:
+# Sets mcpu to v8 and uses the original value as mtune if none specified.
 replace-sparc64-flags() {
 	local SPARC64_CPUS="ultrasparc3 ultrasparc v9"
 
@@ -534,19 +573,28 @@
 	export CFLAGS CXXFLAGS
 }
 
+# @FUNCTION: append-ldflags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Add extra <flags> to the current LDFLAGS.
 append-ldflags() {
 	[[ -z $* ]] && return 0
 	export LDFLAGS="${LDFLAGS} $*"
 	return 0
 }
 
-# Remove flags from LDFLAGS - it's up to the ebuild to filter
-# CFLAGS and CXXFLAGS via filter-flags if they need to.
+# @FUNCTION: filter-ldflags
+# @USAGE: <flags>
+# @DESCRIPTION:
+# Remove particular <flags> from LDFLAGS.  Accepts shell globs.
 filter-ldflags() {
 	_filter-var LDFLAGS "$@"
 	return 0
 }
 
+# @FUNCTION: raw-ldflags
+# @USAGE: <flags>
+# @DESCRIPTION:
 # Turn C style ldflags (-Wl,-foo) into straight ldflags - the results
 # are suitable for passing directly to 'ld'; note LDFLAGS is usually passed
 # to gcc where it needs the '-Wl,'.
@@ -561,8 +609,13 @@
 	echo "$@"
 }
 
-# Gets the flags needed for "NOW" binding
+# @FUNCTION: bindnow-flags
+# @RETURN: Returns the flags to enable "now" binding in the current selected linker.
+# @DESCRIPTION:
+# DEPRECATED - Gets the flags needed for "NOW" binding
 bindnow-flags() {
+	ewarn "QA: stop using the bindnow-flags function ... simply drop it from your ebuild"
+
 	case $($(tc-getLD) -v 2>&1 </dev/null) in
 	*GNU* | *'with BFD'*) # GNU ld
 		echo "-Wl,-z,now" ;;



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2015-05-24  7:05 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-05  8:22 [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass Fabian Groffen (grobian)
  -- strict thread matches above, loose matches on Subject: below --
2015-05-24  7:05 Mike Frysinger (vapier)
2015-05-06  7:04 Mike Frysinger (vapier)
2014-12-31  8:26 Mike Frysinger (vapier)
2014-11-01  3:45 Mike Frysinger (vapier)
2014-08-11  0:36 Joshua Kinard (kumba)
2014-02-02 22:26 Thomas Sachau (tommy)
2013-10-12 19:50 Mike Frysinger (vapier)
2013-09-30  6:39 Mike Frysinger (vapier)
2013-09-05  5:28 Mike Frysinger (vapier)
2013-01-12 14:32 Justin Lecher (jlec)
2012-12-03 21:20 Mike Frysinger (vapier)
2012-11-29 23:27 Mike Frysinger (vapier)
2012-11-18  8:29 Mike Frysinger (vapier)
2012-11-18  8:27 Mike Frysinger (vapier)
2012-11-11 20:00 Mike Frysinger (vapier)
2012-11-11  7:00 Mike Frysinger (vapier)
2012-10-30 20:51 Mike Frysinger (vapier)
2012-10-30 20:20 Mike Frysinger (vapier)
2012-06-23 22:21 Mike Frysinger (vapier)
2012-05-31  0:29 Mike Frysinger (vapier)
2012-05-31  0:24 Mike Frysinger (vapier)
2012-05-26  2:55 Mike Frysinger (vapier)
2012-02-26 12:09 Anthony G. Basile (blueness)
2012-01-16 20:03 Mike Frysinger (vapier)
2012-01-14  9:10 Mike Frysinger (vapier)
2012-01-14  8:22 Mike Frysinger (vapier)
2012-01-14  8:05 Mike Frysinger (vapier)
2012-01-13 22:40 Mike Frysinger (vapier)
2011-12-15  5:23 Mike Frysinger (vapier)
2011-12-07  6:42 Mike Frysinger (vapier)
2011-11-14 20:29 Mike Frysinger (vapier)
2011-10-08 18:37 Mike Frysinger (vapier)
2011-08-17 18:20 Mike Frysinger (vapier)
2011-08-17 17:59 Mike Frysinger (vapier)
2011-08-17 17:54 Mike Frysinger (vapier)
2011-07-12  4:08 Mike Frysinger (vapier)
2011-07-12  3:58 Mike Frysinger (vapier)
2011-02-25 10:51 Ryan Hill (dirtyepic)
2011-02-01  5:41 Ryan Hill (dirtyepic)
2010-05-08  3:47 Ryan Hill (dirtyepic)
2010-04-02  2:50 Jonathan Callen (abcd)
2010-02-17 18:20 Samuli Suominen (ssuominen)
2009-10-04 10:00 Samuli Suominen (ssuominen)
2009-08-15 18:04 Zac Medico (zmedico)
2009-07-29  8:32 Samuli Suominen (ssuominen)
2009-07-29  8:31 Samuli Suominen (ssuominen)
2009-07-20  4:28 Mike Frysinger (vapier)
2009-06-09 22:15 Ryan Hill (dirtyepic)
2009-05-26  7:18 Mike Frysinger (vapier)
2009-05-24  0:33 Michael Sterrett (mr_bones_)
2009-05-23 23:12 Mike Frysinger (vapier)
2009-04-04 17:57 Fabian Groffen (grobian)
2009-01-21  0:42 Gordon Malm (gengor)
2009-01-08 11:29 Gordon Malm (gengor)
2009-01-08  8:12 Gordon Malm (gengor)
2009-01-04 17:22 Mike Frysinger (vapier)
2008-12-21 21:40 Ned Ludd (solar)
2008-11-03  5:52 Mike Frysinger (vapier)
2008-09-14 19:43 Ryan Hill (dirtyepic)
2008-07-03  5:30 Donnie Berkholz (dberkholz)
2008-06-07 16:42 Diego Petteno (flameeyes)
2008-02-18 18:20 Sven Wegener (swegener)
2008-02-16 22:43 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox