uname -p is "x86" even on x86_gcc2 installs, and won't handle secondary architecture properly anyway. Use haikuports provided $targetArchitecture, which I think is the right thing to do here.