On Thu, Feb 11, 2010 at 02:19:49PM +0100, Jan Engelhardt wrote: > > On Thursday 2010-02-11 05:16, David Gibson wrote: > >On Mon, Feb 08, 2010 at 06:41:24PM +0100, Jan Engelhardt wrote: > >> > >> make > >> %ifarch sparc sparcv9 # that's targetarch > >> CC32="gcc" CC64="" NATIVEONLY=1 > >> %endif > > > >But there's a good reason we don't just take whatever gcc produces for > >libhugetlbfs. For platforms with 32-bit and 64-bit variants > >(i386/x86_64, powerpc/powerpc64) we want to build both 32-bit and > >64-bit versions of the libraries - so they can be used with both > >32-bit and 64-bit apps. > >I'd have expected you also want builds for both sparc and sparc64, > >likewise. > > Well, that is why build systems call the compilation twice or more, > depending on which configurations they want to compile.
That's all very well if you're packaging, but it's a pain in the arse if you're building manually. > >If you're building for a different setup than the one > >you're compiling on, it's essentially a trivial case of > >cross-compiling, and as usual for a cross-compile, you need to specify > >the right compiler. > > > Or in the case of libhugetlbfs the right two > >compilers, one for the 32-bit target arch and one for the 64-bit > >target arch. > > Well, what if the target to compile for only has one type of bitness > you don't know in advance (but xgcc produces the "right" thing)? What > if that bitness is neither 32 nor 64? No, hypothetical what-ifs don't stack up against the real, practical, encountered fact that people want biarch versions of the library on x86 and powerpc, and the Makefiles cater to be convenient for that case. You can work around it for your packaging with the right settings for CC32, CC64 and NATIVEONLY. If you can see a way to make the Makefiles more convenient for you *without* sacrificing the biarch convenience on existing platforms, by all means suggest it. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel