Mailinglist Archive: opensuse-buildservice (132 mails)

< Previous Next >
Re: [opensuse-buildservice] [RFC] Is there any plan to add ILP32 support for aarch64?
  • From: Bamvor Jian Zhang <bamvor.zhangjian@xxxxxxxxxx>
  • Date: Tue, 27 Jan 2015 19:03:09 +0800
  • Message-id: <>
Hi, Jan

On 2015/1/26 18:37, Jan Engelhardt wrote:
In case of x32 and sparcv9, our gcc(64bit) already can produce these,
and is the one to use.
Yes. our gcc could compile ilp32 on aarch64. But it failed in linking:

# cat main.c
int main(){return 0;}
# gcc-4.9 -mabi=ilp32 main.c -o main.ilp32 -nostdlib -nostartfiles -v
/usr/lib64/gcc/aarch64-suse-linux/4.9/collect2 -plugin
-plugin-opt=-fresolution=main.res --build-id --eh-frame-hdr -dynamic-linker
/lib/ -X -EL -maarch64linux -o main.ilp32
-L/usr/lib64/gcc/aarch64-suse-linux/4.9/../../../../lib64 -L/lib/../lib64
-L/usr/lib64/gcc/aarch64-suse-linux/4.9/../../.. main.o
aarch64:ilp32 architecture of input file `main.o' is incompatible with aarch64
warning: cannot find entry symbol _start; defaulting to 00000000004000d4
collect2: error: ld returned 1 exit status

It set the wrong be /lib/, wrong elf
type(should be -maarch64linux32). And it also required libilp32 library with
compile without -nostdlib. I could make it right by forcing -maarch64linux32:
/usr/lib64/gcc/aarch64-suse-linux/4.9/collect2 -plugin
/usr/lib64/gcc/aarch64-suse-linux/4.9/ -plug
-plugin-opt=-fresolution=main.res --build-id --eh-frame-hdr -dynamic-linker
/lib/ld-linux-aarc -X -EL -maarch64linux32 -o main.ilp32
-L/usr/lib64/gcc/aarch64-suse-linux/4.9/../../../../lib64 -L/lib /../lib64
.. main.o
/usr/bin/ld: warning: cannot find entry symbol _start; defaulting to

And the dynamic linker could be fixed by "gcc/config/aarch64/aarch64-linux.h":

But I do not know how to pass the -maarch64linux32 for linker. Any suggestion?

Besides, when I install gcc49 on opensuse 13.2(aarch64), it reports the
libgcc_s1 conflict. Could I force installing the libgcc_s1_4.9.0 and
libgomp1-4.9.0(maybe and libitm)?
:/ # zypper in gcc49
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: gcc49-4.9.0+r211729-2.1.2.aarch64 requires libgcc_s1 >=
4.9.0+r211729-2.1.2, but this requirement cannot be provided
uninstallable providers:
Solution 1: Following actions will be done:
deinstallation of libgcc_s1-4.8.3+r212056-2.2.1.aarch64
deinstallation of libgomp1-4.8.3+r212056-2.2.1.aarch64
Solution 2: do not install gcc49-4.9.0+r211729-2.1.2.aarch64
Solution 3: break gcc49-4.9.0+r211729-2.1.2.aarch64 by ignoring some of its

The ILP32 ones work more like what ppc is to ppc64 than what
i586 is to x86_64.



To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups