Re: [PATCH] options: allow to specify the desired arch with --arch=<arch>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 29, 2019 at 07:05:13PM +0000, Ramsay Jones wrote:
> >>> +			if (bits == 0) {
> >>> +				// guess the size of the architecture
> >>> +				if (!strcmp(suf, "")) {
> >>> +					if (arch_m64 == ARCH_LP32)
> >>> +						bits = 32;
> >>> +					else
> >>> +						bits = 64;
> >>
> >> So, this is a 50-50 bet. ;-)
> > 
> > No, not really.
> > The -m32/-m64 flags are still taken in account, before the
> > --arch and after it too. If no -m32/-m64 is given at all
> > then the used size is the one of the native arch (because
> > arch_m64 is initialized so).
> 
> heh, yes, I just meant that (if -m32/-m64 has _not_ been given)
> then you have a 50/50 chance that you are cross-compiling to a
> system that has the same 'bit-ness' as your current platform.
> 
> (well, actually, I suppose both are likely to be 64-bit these
> days - so, maybe not 50/50! ;-) ).

Yes, I somehow agree. It would probably be better to make 'mips',
'ppc' & 'sparc' default to 32-bit since it's what uname seems to
do (for RISC-V uname returns 'riscv32' or 'riscv64'). For the
kernel, the plain name is always used but -m32/-m64 is awalys given,
so it's never a problem.

Thank you for your input.
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux