Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-09

Compiler 2.20 for Arm

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Carsten Bager

I have tested the 2.20 compiler for Arm. It looks good, a problem I had with threads has disappeared, but (there is always a but) now I have another problem.
The bindery file is huge (Normally 160KB now 950KB. I presume that smart linking dos not work). I also get this warning form the linker "ld: Warning: gc-sections option ignored".

I have seen this since the version 214.

My min problem is the big executables.

The linker is
GNU ld version 2.15
Supported emulations:
armelf_linux
armelf

Dos anyone have a hint what I can do.

I have converted c header files for NanoX (Micro Windows) and written a small unit that can create buttons, labels etc. It is not a complete conversion, but it is useful. Is this of any interest for the free Pascal people?

Carsten

Jonas Maebe
to Carsten Bager
Carsten Bager wrote 17 lines
The bindery file is huge (Normally 160KB now 950KB. I presume that smart linking dos not work). I also get this warning form the linker "ld: Warning: gc-sections option ignored". I have seen this since the version 214. My min problem is the big executables. The linker is GNU ld version 2.15 Supported emulations: armelf_linux armelf Dos anyone have a hint what I can do.

Install a newer version of ld which does support the --gc-sections flag.

Jonas

josepascual
to Carsten Bager: I have tested the 2.20 compiler for Arm. It looks good, a problem I had with threads has…
Show quoted text 27 lines
I have tested the 2.20 compiler for Arm. It looks good, a problem I had with threads has disappeared, but (there is always a but) now I have another problem. The bindery file is huge (Normally 160KB now 950KB. I presume that smart linking dos not work). I also get this warning form the linker "ld: Warning: gc-sections option ignored". I have seen this since the version 214. My min problem is the big executables. The linker is GNU ld version 2.15 Supported emulations: armelf_linux armelf Dos anyone have a hint what I can do. I have converted c header files for NanoX (Micro Windows) and written a small unit that can create buttons, labels etc. It is not a complete conversion, but it is useful. Is this of any interest for the free Pascal people?

always it's interesting,
you can share your code with freepascal community in freepascal contribute http://www.freepascal.org/contrib/db.php3
add unit.(units)

There is a fpgui project that can find, perhaps, interested this unit for NanoX (Micro Windows) http://www.microwindows.org/

Carsten Bager
to Carsten Bager
> Install a newer version of ld which does support the --gc-sections flag.

I found a Debian tool chain (http://www.emdebian.org/ -- binutils-arm-linux-gnu_2.18- 1_i386.deb). It works ok, but the linker gives some warnings

/Fpc/ArmBin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc

The output works, but I would not expect to get this warnings when I compile with " -Xd #Don't use standard library search path (needed for cross compile)"

Am I missing something?

Regards
Carsten

Marco van de Voort
to Carsten Bager
Show quoted text 17 lines
> > Install a newer version of ld which does support the --gc-sections flag. I found a Debian tool chain (http://www.emdebian.org/ -- binutils-arm-linux-gnu_2.18- 1_i386.deb). It works ok, but the linker gives some warnings /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /Fpc/ArmBin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc The output works, but I would not expect to get this warnings when I compile with " -Xd #Don't use standard library search path (needed for cross compile)" Am I missing something?

Try to build with -s and examine/post the ppas.sh and link.res file.

Carsten Bager
to Marco van de Voort
Try to build with -s and examine/post the ppas.sh and link.res file.

This is how the ppas.sh and the link.res file looks like. To me it looks ok. Do you think it is an error in the linker.

Carsten

<ppas.sh>
#!/bin/sh
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; } DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; } echo Assembling testthreads
/Fpc/ArmBin/as -o threads.o threads.s
if [ $? != 0 ]; then DoExitAsm testthreads; fi
rm threads.s
echo Linking threads
/Fpc/ArmBin/ld -Map=link.map -dynamic-linker=/lib/ld-linux.so.2 --gc- sections -L. -o threads link.res
if [ $? != 0 ]; then DoExitLink threads; fi

<link.res>
SEARCH_DIR(/Fpc/Pas/ReleasedUnits/LibArm9/)
SEARCH_DIR(/Fpc/Lib/Ulibc/Arm/)
SEARCH_DIR(/Fpc/Lib/2.2.0/arm-linux/Fpc/)
SEARCH_DIR(/Fpc/Pas/ReleasedUnits/PpuArm9/)
SEARCH_DIR(/Fpc/ArmBin/)
INPUT(
/Fpc/Lib/Ulibc/Arm/cprt0.o
threads.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/system.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/lineinfo.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/strings.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/objpas.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/cthreads.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/sysutils.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/dos.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/baseunix.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/unix.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/unixtype.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/initc.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/dl.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/unixutil.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/syscall.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/ctypes.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/errors.o
/Fpc/Lib/2.2.0/arm-linux/Fpc/sysconst.o
)
INPUT(
-lulibc
-lgcc_s
-lpthread
-ldl
-lc
)
ENTRY(_start)
<cut>