From the log: x86_64-pc-linux-gnu-g++ -march=native -O2 -g0 -pipe -march=native -O2 -pipe -Wall -ansi -pedantic -I -Wno-uninitialized -Wno-unused-parameter -O2 -fPIC -c src/SquareFreeIdeal.cpp -o bin/shared/SquareFreeIdeal.o vbp ~ # portageq envvar CFLAGS -march=native -O2 -g0 -pipe vbp ~ # portageq envvar CXXFLAGS -march=native -O2 -pipe So it does $CXX $CFLAGS $CXXFLAGS
Fixed in the current ebuild, CFLAGS are now ignored.