The current qt builds ignore the user's set CFLAGS because the qt build system only uses the CFLAGS defined in qmake.conf. This tiny patch will fix that by updating qmake.conf with the user's selected CFLAGS. It shouldn't break the fix for alpha right above it either. This is for 3.1.1 but it could be easily applied to any other 3.x ebuild.
Created attachment 6941 [details, diff] Patch for qt-3.1.1.ebuild
*** This bug has been marked as a duplicate of 12335 ***