At the current state, gcc-ilp32 is created to be correctly installed in the separate tree (/opt/ilp32/). It correctly produces Aarch64ELF32 files, using the technique, describe below in "Testing ILP32" section. Binutils 2.24 were created to provide scripts that are needed by the linker to work with ILP32 files.
We are installing Fedora 22 on one of the builders to have a clean install with Fedora gcc. Then we will try to build our MultiLib capable gcc on that system. When succeeded, we will install our gcc on a LEAP builder, change the spec file for gcc to point towards that MultiLib capable gcc, and produce the final version of our gcc.
I changed "~/rpmbuild/SPEC/glibc.spec" file in the next way:
I run "rpmbuild -bs glibc.spec" command to get the source rpm.
* Create "hello.c" file.
* Add info to it at your discretion.
* Run "/opt/ilp32/usr/bin/gcc -c -mabi=ilp32 hello.c".
* Run "ld -m aarch64elf32 hello.o".
* If you want to run it in one commands, use "/opt/ilp32/usr/bin/gcc -mabi=ilp32 -Xlinker -maarch64elf32 hello.c".
* Run "file a.out".
* Check that it says "ELF32", "executable binary" and "statically linked".