Re: [PATCH 2/5] configure.ac, arch/x86_64: handle x32 as subarch of x86_64 and don't specify -mcmodel=large there

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

 



On Fri, Oct 23, 2020 at 04:33:07PM +0200, Simon Horman wrote:
> On Fri, Oct 09, 2020 at 05:39:42PM +0200, Ahelenia Ziemiańska wrote:
> > Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
> > ---
> >  configure.ac                   | 8 ++++++++
> >  purgatory/arch/x86_64/Makefile | 2 ++
> >  2 files changed, 10 insertions(+)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index f025823..4e8f7c5 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -54,6 +54,14 @@ case $target_cpu in
> >  		;;
> >  	ia64|x86_64|alpha|m68k )
> >  		ARCH="$target_cpu"
> > +		case $target in
> > +			*x32 )
> > +				SUBARCH="x32"
> > +				;;
> > +			* )
> > +				SUBARCH=""
> > +				;;
> > +		esac
> 
> Is x32 value only for x86_64 or ia64, x886_64, alpha and m68k as
> seems to be implied by this change?

There is, indeed, no x32 equivalent for non-amd64,
but I just put this here like this because there aren't
any other triples that end in "x32". Would you rather this go
in a separate "if ARCH=x86_64 && target=*x32" clause below?

> Also, could you let me know how to exercise compiling this changeset?

The easiest way would be to install GCC for "x86_64-linux-gnux32";
on Buster, installing gcc-x86-64-linux-gnux32 followed by
  ./configure --host=x86_64-linux-gnux32
worked and built.

Alternatively, you could use an x32 chroot via something
along the lines of
  debootstrap --arch=x32 --variant=minbase
    --include=debian-ports-archive-keyring --no-check-gpg sid target
    https://deb.debian.org/debian-ports
and proceeding as normal within.

To test the kexecution and/or get the x32 userland to run, you'll need
your kernel to have CONFIG_X86_X32=y, or, on Debian amd64 kernels,
to pass syscall.x32=y on the cmdline.

Best,
Ahelenia

Attachment: signature.asc
Description: PGP signature

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec

[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux