Bug 210039 - nspr has broken 64bit checking
Bug#: 210039 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: mozilla@gentoo.org Reported By: vapier@gentoo.org
Component: Applications
URL: 
Summary: nspr has broken 64bit checking
Keywords:  
Status Whiteboard: 
Opened: 2008-02-13 19:37 0000
Description:   Opened: 2008-02-13 19:37 0000
here is the current code:
    if use amd64 || use ppc64 || use ia64 || use s390; then
        myconf="${myconf} --enable-64bit"
    else
        myconf=""
    fi

problems:
 - s390 is not a 64bit arch ... s390x is ... but s390x is not a KEYWORD.  s390
and s390x both use the s390 KEYWORD.
 - 64bit mips is ignored

if the build system is so terrible it cannot do the 64bit detection itself,
then use the toolchain to produce an object and run file on it:
echo > "${T}"/test.c
$(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o
case $(file "${T}"/test.o) in
    *64-bit*) myconf="${myconf} --enable-64bit"
    *32-bit*) ;;
    *) die "FAIL";;
esac

------- Comment #1 From Raúl Porcel 2008-02-14 11:11:04 0000 -------
Added, thanks