Port-amd64 archive

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

Re: Build a file with -m32



On Fri, Nov 08, 2019 at 07:39:07AM +0000, Emmanuel Dreyfus wrote:
> Hello
> 
> I am working on multiboot support for amd64, and I have a C funciton 
> to call from locore.S before we witch to 64 bit mode. After a few 
> experiment, it seems that calling 64 bit code from 32 bit code causes
> a lot of mess, and I would like to build the function with -m32.
> 
> Any advice on how I could modify the amd64 kernel build so that a 
> given file is built with -m32?

Maybe something like:

CC32= ${NORMAL_C} -m32

in Makefile.amd64 and in files.amd64:

path/to/my/file.c compile-with "${CC32}"

We used to have (in very ancient versions) files for the sparc64 kernel that
were miscompiled with default COPTS and used that trick to lower optimization
settings.

Martin


Home | Main Index | Thread Index | Old Index