While performing a portage-multilib emerge of these packages linking fails during the x86 stage due to the object files being compiled without the -m32 flag. This stems from the fact the "Makefile.in" files set CFLAGS with configure derived values instead of appending to those already set in the environment.
Steps to Reproduce:
Environment CFLAGS are ignored.
Environment CFLAGS should be respected.
The existing dev-db/libdbi ebuilds attempt to fix this, but only by modifying src/Makefile.in, this isn't the only Makefile.in, and is insufficiemt. It would be better to replace "src/Makefile.in" with "$(find -name Makefile.in)", with this change the issue is resolved.
dev-db/libdbi-drivers doesn't have this code in the ebuild, but it is also required.
Please update description with package versions that are affected by this bug.
Also, as usual, please add output of emerge --info.
Created attachment 283057 [details, diff]
the patch that also correct the compile with portage multilib
Created attachment 283059 [details, diff]
the patch that makes the drivers compile with portage multilib