Example: x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o nasm.o nasm.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o ver.o ver.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o raa.o raa.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o saa.o saa.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o rbtree.o rbtree.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o float.o float.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o insnsa.o insnsa.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o insnsb.o insnsb.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o directiv.o directiv.c x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -O2 -W -Wall -std=c99 -pedantic -DHAVE_CONFIG_H -I. -I. -o assemble.o assemble.c Reproducible: Always
# ▶ emerge --info | grep CFLAGS 49:CFLAGS="-march=native -O2 -pipe"
That's a bug in strip-flags. This code doesn't work: if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then new+=( -O2 ) fi
http://sources.gentoo.org/eclass/flag-o-matic.eclass?r1=1.177&r2=1.178
That doesn't fix the problem. The current code for _is_flagq doesn't support arrays.
CFLAGS=-march=native -O2 -pipe -Wall -Wno-pointer-sign works to show the issue.
(In reply to comment #4) http://sources.gentoo.org/eclass/flag-o-matic.eclass?r1=1.178&r2=1.179