I need to build shared libc.so for System V ABI system under GNU ABI system from sources. I'm trying to build glibc2.16 if it is important.
My gcc compiler was built with the default --hash-style option set to "sysv". Every application built with it has System V ABI. Every, but not libc.
Tried to add C*FLAGS -Wl,--hash-style=sysv, but it didn't work. Configure was done, but making stopped with errors:
glibc cannot be compiled without optimization
I found that it is because of gcc options order. So, I decided to put necessary options by myself. Found --hash-style=both in Makeconfig and configure.in. Changed it to sysv. All libs (ld.so and other) were eventually built appropriate with System V. All except libc.so.
Do you know, how to build exactly libc.so? Thanks!
After different combinations of configuration options I got an answer. The right configuration commands:
For x32 systems:
For x64 systems:
And you need to export CFLAGS with the next value: