this becomes an obvious issue if you have CFLAGS in the environment. so having CFLAGS="-march=athlon64", for instance, and going into the 32bit chroot with that, might probably result unxpectedly .. here is my /usr/bin/x86-chroot: #!/bin/bash source /etc/conf.d/x86-chroot which xhost &>/dev/null && xhost local:localhost &>/dev/null env -i env TERM=$TERM linux32 chroot ${CHROOT_LOCATION} /bin/bash -l it's quick and dirty (because of two env's), well but it works totaly fine. i had it without TERM presrvation bit at first, but found some actuall problems when ran emerge .. if someone has a better idea what could happend if we compile with -march=k8 in the chroot which is dedicated to be 32bit, please tell more about it! i had actully compiled one or two apps before i noticed that the CFLAGS aren't right .. is gcc just gonna make a 64bit binary? or it's gonna just assume cpu flags as for the given -march ? i think gcc fails if there is -march=k8 and -m32 together, i can't remember exactly however. another suggestion could be to put some if()'s into the script, so if there CFLAGS, CPPFLAGS, CXX.. and such - just unset them. but i suspect there might be some other potentially dengerous vars in the env, so could be a good idea to set all to the most basic kind .. and may be give an option in /etc/conf.d/x86-chroot to turn this feature on or off; may be even let the user supply the flags he/she wiosh to keep. Reproducible: Always
If you need support, use a proper place fir this; bugzilla is not one of them. Thanks. http://www.gentoo.org/main/en/support.xml
(In reply to comment #1) > If you need support, use a proper place fir this; bugzilla is not one of them. > Thanks. > > http://www.gentoo.org/main/en/support.xml > i did not mean that need support. i was suggesting a bug fix, and added some consideration ..reasoning why we need it.
1/ x86-chroot ebuild is pending removal 2/ There's nothing to fix - you should *never* stick -m[32|64] into your make.conf yourself, that's taken care of by the appropriate profiles (which would be x86 ones in your chroot). 3/ -march=k8 or whatever similar works perfectly fine on 32bit userland, see man gcc. If you have more questions, see http://www.gentoo.org/main/en/support.xml; this doesn't belong here.