Albert Chin-A-Young <china@thewrittenword.com>)
p4raw-id: //depot/perl@6046
case "$cc" in
*"cc -n32"*)
- libscheck='case "`/usr/bin/file $xxx`" in
-*N32*) ;;
-*) xxx=/no/n32$xxx ;;
+ # If a library is requested to link against, make sure the
+ # objects in the library are of the same ABI we are compiling
+ # against. Albert Chin-A-Young <china@thewrittenword.com>
+ libscheck='case "$xxx" in
+*.a) /bin/ar p $xxx `/bin/ar t $xxx | /usr/bsd/head -1` >$$.o;
+ case "`/usr/bin/file $$.o`" in
+ *N32*) rm -f $$.o ;;
+ *) rm -f $$.o; xxx=/no/n32$xxx ;;
+ esac ;;
+*) case "`/usr/bin/file $xxx`" in
+ *N32*) ;;
+ *) xxx=/no/n32$xxx ;;
+ esac ;;
esac'
# NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker