This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] Enable ILP32 mode on aarch64


On Fri, Dec 02, 2016 at 06:47:46PM +0000, Szabolcs Nagy wrote:
> On 01/12/16 05:05, Yury Norov wrote:
> > On Wed, Nov 30, 2016 at 04:39:11PM -0800, Steve Ellcey wrote:
> >> On Wed, 2016-11-30 at 10:06 +0100, Andreas Schwab wrote:
> >>> ../sysdeps/unix/sysv/linux/generic/rename.c: In function ‘rename’:
> >>> ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:41:32: error:
> >>> ‘__NR_renameat’ undeclared (first use in this function)
> >>>  #define SYS_ify(syscall_name) (__NR_##syscall_name)
> >>>                                 ^
> >>>
> >>> Andreas.
> >>
> >> Were you able to build a normal aarch64 glibc before?  I do not
> >> understand what is going on but to fix this I edited my
> >> /usr/include/aarch64-linux-gnu/asm/unistd.h file to include
> >>
> >> #define __ARCH_WANT_RENAMEAT
> >>
> >> Without this change, even if I build with older non-modified glibc
> >> sources I am hitting the bug you got above.  I was able to build those
> >> sources on the same system, with the same compiler before.  I don't
> >> know why things changed.  My /usr/include/asm/unistd.h header file
> >> already had that, I am not sure why the two header files were
> >> different, but my best guess is that somehow that define got removed
> >> from my kernel header file, but I don't know how that would happen
> >> since I never changed it.
> >>
> >> Steve Ellcey
> >> sellcey@caviumnetworks.com
> > 
> > You should also update kernel headers before build.
> > __ARCH_WANT_RENAMEAT is introduced in kernel series for ILP3 and it makes
> > a choice to use or not __NR_renameat properly.
> > https://patchwork.kernel.org/patch/9390105/
> > 
> 
> isn't there a kernel header version check that's supposed to catch this?

IIUC, there's a line "arch_minimum_kernel=4.8.0" that defines minimum
version of kernel in files sysdeps/unix/sysv/linux/aarch64/configure
and sysdeps/unix/sysv/linux/aarch64/configure.ac. 

Josef asked to make it 10.0.0, and replace with actual version when
kernel people will take ilp32. So I did. But for testing purposes I
changed versions to 4.8 in temporary patch 'vers':
https://github.com/norov/glibc/commits/dev7

I'm not sure we need that patch in upstream.

Regarding headers mess - I understand that it may confuse people.
That's why I always share links to kernel and glibc patches together,
and try always remind that glibc will not work alone, even build.

When kernel patches will be applied, the mess will stop.
https://github.com/norov/linux/tree/rc6

Yury.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]