I don't know the build system for this program (and this is a generic bug template so I cannot tell you which program exactly is), but my tests shows that it's not respecting CFLAGS (or CXXFLAGS) properly. Please look into it, since it's important to respect user CFLAGS and CXXFLAGS. Warning: this bug might look like a false positive because you actually have your CFLAGS being used; this happens if the CFLAGS are "set in stone" in the build system during src_unpack/src_prepare. While QA has not as of this moment expressed to me a preference, I'd sincerely suggest to avoid the set-in-stone approach, so that ebuild commands could work to reproduce the actual results. To avoid the set in stone approach: - consider just changing CFLAGS= to CFLAGS+= if the build system enables warnings; - if the buildsystem does not use CFLAGS variable at all, in the sed use '$(CFLAGS)', single quoted, so that the CFLAGS variable is picked up; - use '$(OPTCFLAGS)' in the sed and then use make OPTCFLAGS=$CFLAGS. Thanks, Diego
I believe you are wrong. x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I. -march=core2 -msse4.1 -O2 -pipe -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c xlibwrap.cc x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I. -march=core2 -msse4.1 -O2 -pipe -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -c xlib.c As you can see.. -march, -msse4.1, and others are passed to configure (which is fixed in src_unpack, now src_prepare since I've converted it to EAPI2)
are ignored *(at src_configure/compile)* No I'm not wrong; it's just that instead of actually fixing the configure you're _hardcoding_ the flags. So the bug is valid.. Please fix the ebuild (I guess just replacing the double quotes with single in the sed call could work...)
(In reply to comment #2) > are ignored *(at src_configure/compile)* > > No I'm not wrong; it's just that instead of actually fixing the configure > you're _hardcoding_ the flags. So the bug is valid.. > > Please fix the ebuild (I guess just replacing the double quotes with single in > the sed call could work...) > I entirely understand the how, but I'm not sure why. Do you mean like, if one does "ebuild foo.ebuild prepare", and enters the /var/tmp directory, to do a manual ./configure the configure is still broken? If so, then I do understand. If this is not the case, please explain. Anyway, your suggested fix also worked fine so it's in portage now.