Compiler 2.20 for Arm

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiler 2.20 for Arm

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiler 2.20 for Arm

Jonas Maebe-2

On 19 Sep 2007, at 15:34, Carsten Bager wrote:

> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Compiler 2.20 for Arm

josepascual (almudi)
In reply to this post by 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?

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/


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiler 2.20 for Arm

Marc Santhoff
In reply to this post by Carsten Bager
Am Mittwoch, den 19.09.2007, 15:34 +0200 schrieb Carsten Bager:

> 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?

Yes, it is. Very much, if you askme. :)

Marc


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiler 2.20 for Arm

Carsten Bager
In reply to this post by Jonas Maebe-2
> Install a newer version of ld which does support the --gc-sections flag.

Do you know where to find a newer version of the linker
(binutils for arm linux)

Regards
Carsten

Med venlig hilsen
Carsten Bager

BEAS A/S
Brørupvænget 10
DK-7650 Bøvlingbjerg
Tlf. : +45 9788 5222 Fax : +45 9788 5434
www.beas.dk


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiler 2.20 for Arm

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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiler 2.20 for Arm

Marco van de Voort
> > > 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiler 2.20 for Arm

Carsten Bager
> 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>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal