Subject: Re: compat code restructuring status
To: None <>
From: Valeriy E. Ushakov <>
List: current-users
Date: 09/16/2005 03:07:45
On Tue, Sep 13, 2005 at 16:17:02 -0400, Christos Zoulas wrote:

> Last night I committed the bulk of the changes to the compat infrastructure.
> Here's what's changed...
> christos
> The same holds for assembly source files, which should be moved to
> the compat arch-specific subdirectories (this is work in progress).
> Currently i386 and sparc64 compile, but only the i386 arch specific
> code has been moved to the src/lib/libc/compat/arch/i386 directories.
> Even some of the i386 arch-specific files will be renamed eventually.
> It is better to fix the sources by moving the compat .S files in
> src/lib/libc/compat/arch rather than just adding <compat/sys/...>
> includes to make them compile.

For those who will be coverting other arches, this is a quick summary
of what I did for sh3:

Create subtree for your arch under compat/arch

Steal compat/arch/i386/

Convert "sys" subdirectory:

. In lib/libc/sys/ there's a list of files under

. Move each file $foo to compat/arch/$ARCH/sys/compat_$foo

. Adjust arch/$ARCH/sys/ accordingly

. Steal compat/arch/i386/sys/

Convert "gen" subdirectory:

. Move setjmp.S sigsetjmp.S _setjmp.S to compat/arch/$ARCH/gen/compat_$foo

. Move __setjmp14.S -> setjmp.S

. Move __sigsetjmp14.S -> sigsetjmp.S

. Adjust arch/$ARCH/gen/ accordingly, droping the moved
  files from SRCS and lint stubs

. Steal compat/arch/i386/gen/

This should be it.

If you are paranoid, save your old objdir before performing the move.
Then verify that the corresponding object files are identical, and exports the same symbols.

Note that in sys we didn't renamed __vfork14.S yet (like we did
e.g. __setjmp14.S in gen).  Christos says he will take care about that
later, so for now omit that step for consistency between archs.

SY, Uwe
--                         |       Zu Grunde kommen            |       Ist zu Grunde gehen