Subject: Re: pkgsrc/bootstrap is broken , Solaris and co
To: None <tech-pkg@NetBSD.org>
From: Gilles Dauphin <Gilles.Dauphin@enst.fr>
List: tech-pkg
Date: 07/20/2006 16:50:58
>
> Just so I understand, does bootstrap currently work or is it still
> broken? I didn't quite follow what you said above.
The bootstrap compile and work fine for me, I begin to compile my essential
packages.
Thanks for you (very fast) help.
Gilles
PS:
Maybe you know, I wrap my gcc compiler and it make true 64bit binaries.
I will be please if you include this patch in bootstrap , the reason is
a new arch for Solaris that is usefull for multimedia package.
(avoid to compile i386 assembler when ABI is 64 and/or guess the real
processor).
That was a talk with Joerg and he found this idea not bad.
I think my patch have no side effect with other Solaris users (gcc/SunPro)
here is the patch I hope:
-----------------------------------------------------------------------
--- cvshead/pkgsrc/bootstrap/bootstrap Thu Jul 20 10:14:24 2006
+++ cvsmywork/pkgsrc/bootstrap/bootstrap Thu Jul 20 10:53:59 2006
@@ -131,6 +131,15 @@
abi=32
fi
;;
+ SunOS)
+ # Search the compiler default 32/64
+ unset abi
+ lp64_def=`${CC:-gcc} -E - -dM </dev/null 2>/dev/null | grep
__LP64__`
+ if [ ! -z "$lp64_def" ] ; then
+ abi=64
+ fi
+
+ ;;
esac
}
@@ -436,7 +445,15 @@
need_sed=yes
set_opsys=no
whoamiprog=/usr/ucb/whoami
+ get_abi "SunOS"
+ if [ "X${abi}" = "X64" ] ; then
+ machine_arch=`uname -p | sed -e 's/i86pc/x86_64/' |sed -e
's/i386/x86_64/' |sed -e 's/sparc/sparc64/'`
+ bmakexargs="MACHINE_ARCH=$machine_arch"
+ else
machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
+ fi
+ echo "ABI = $abi"
+ echo "MACHINE_ARCH=$machine_arch"
;;
AIX)
root_group=system
------------------------------------------------------------------------
the second file to patch is the bulk/upload.conf-example
-----------------------------------------------------------------------
-arch=`uname -m`
+arch=`(cd /usr/pkgsrc/pkgtools/pkglint/; bmake show-var VARNAME=MACHINE_ARCH)`
------------------------------------------------------------------------