Re: [fpc-pascal] building arm cross compiler on FreeBSD

2016-01-10 Thread Michael Ring
Perhaps you should build your own binutils, it seems that the version 
you are using right now does not properly support armv7-m architecture.


download

ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.gz

|extract, create an empty directory and do:|
||
|../binutils-2.25.1/configure --target=arm-none-eabi --disable-multilib 
--program-prefix=arm-none-eabi-|

||
|sudo make install will install the tools to /usr/local|
||
||
or try this version from freshports:

https://www.freshports.org/devel/gcc-arm-embedded/

It also builds gcc, which of course you do not need.

Michael

Am 10.01.16 um 00:16 schrieb Marc Santhoff:

On Sa, 2016-01-09 at 23:44 +0100, Jonas Maebe wrote:

OS_TARGET=embedded

No, doesn'r do. The error message talks about the assemble, maybe it is
the binuitls variant installed?

gmake[3]: Entering directory 
`/usr/p1/home/marc/program/fpc-cross/src/fpc/rtl/embedded'
/usr/local/bin/gmkdir -p 
/usr/p1/home/marc/program/fpc-cross/src/fpc/rtl/units/arm-embedded
/usr/p1/home/marc/program/fpc-cross/src/fpc/compiler/ppcrossarm -Cparmv7m 
@rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n -Fi../inc 
-Fi../arm -FE. 
-FU/usr/p1/home/marc/program/fpc-cross/src/fpc/rtl/units/arm-embedded -darm 
-dRELEASE -XParm-elf- -Us -Sg system.pp
Assembler messages:
Error: unknown architecture `armv7-m'

Error: unrecognized option -march=armv7-m
system.pp(285) Error: Error while assembling exitcode 1
system.pp(285) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted

If I try directly:

  > arm-elf-as -march=armv7-m
Assembler messages:
Error: unknown architecture `armv7-m'

  > lpkg|grep arm
arm-elf-binutils-2.17

Which version of binutils is needed or what's going worng otherwise?

Marc



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] building arm cross compiler on FreeBSD

2016-01-10 Thread Jonas Maebe

Tomas Hajny wrote:

On Sat, January 9, 2016 23:44, Jonas Maebe wrote:

On 09/01/16 23:27, Marc Santhoff wrote:



How can I build a build a cross compiler running on FreeBSD compiling
for ARM?

Try adding OS_TARGET=embedded to your "make all CPU_TARGET=arm"
invocation in the top level directory (assuming you've set up your
environment for cross-compiling to embedded).


I know next to nothing about target embedded or ARM, but the original
poster seems to have asked for support of FreeBSD on ARM


His previous messages were about embedded development for ARM. I 
interpreted "I'm stuck while trying to build a cross compiler for ARM on 
FreeBSD" as (a cross compiler for ARM) (on FreeBSD) rather than (a cross 
compiler) (for ARM on FreeBSD), especially given the last sentence from 
his mail quoted above..


My guess was that the reason he was asking, was that if you do a "make 
all CPU_TARGET=arm" at the top level to get an ARM cross-compiler, the 
Makefile will default to $(OS_SOURCE)/$(CPU_TARGET), which will indeed 
result in complaints about FreeBSD/ARM not being supported if you do it 
on FreeBSD.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] building arm cross compiler on FreeBSD

2016-01-10 Thread Tomas Hajny
On Sun, January 10, 2016 12:57, Jonas Maebe wrote:
> Tomas Hajny wrote:
>> On Sat, January 9, 2016 23:44, Jonas Maebe wrote:
>>> On 09/01/16 23:27, Marc Santhoff wrote:
>>
 How can I build a build a cross compiler running on FreeBSD compiling
 for ARM?
>>> Try adding OS_TARGET=embedded to your "make all CPU_TARGET=arm"
>>> invocation in the top level directory (assuming you've set up your
>>> environment for cross-compiling to embedded).
>>
>> I know next to nothing about target embedded or ARM, but the original
>> poster seems to have asked for support of FreeBSD on ARM
>
> His previous messages were about embedded development for ARM. I
> interpreted "I'm stuck while trying to build a cross compiler for ARM on
> FreeBSD" as (a cross compiler for ARM) (on FreeBSD) rather than (a cross
> compiler) (for ARM on FreeBSD), especially given the last sentence from
> his mail quoted above..

That's what I guessed from your response. Nevertheless, the message also
contained an explicit note of running FreeBSD on his device. I checked it
and FreeBSD seems to support the device according to Internet sources
indeed.

It's up to the original poster to clarify whether he intends to target
FreeBSD on his device, or whether he was interested in creating programs
for the device without an operating system.


> My guess was that the reason he was asking, was that if you do a "make
> all CPU_TARGET=arm" at the top level to get an ARM cross-compiler, the
> Makefile will default to $(OS_SOURCE)/$(CPU_TARGET), which will indeed
> result in complaints about FreeBSD/ARM not being supported if you do it
> on FreeBSD.

Yes, I think so as well, but it might be exactly the thing he was
interested in.

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] building arm cross compiler on FreeBSD

2016-01-10 Thread Marc Santhoff
On So, 2016-01-10 at 13:17 +0100, Tomas Hajny wrote:
> On Sun, January 10, 2016 12:57, Jonas Maebe wrote:
> > Tomas Hajny wrote:
> >> On Sat, January 9, 2016 23:44, Jonas Maebe wrote:
> >>> On 09/01/16 23:27, Marc Santhoff wrote:

> > His previous messages were about embedded development for ARM. I
> > interpreted "I'm stuck while trying to build a cross compiler for ARM on
> > FreeBSD" as (a cross compiler for ARM) (on FreeBSD) rather than (a cross
> > compiler) (for ARM on FreeBSD), especially given the last sentence from
> > his mail quoted above..
> 
> That's what I guessed from your response. Nevertheless, the message also
> contained an explicit note of running FreeBSD on his device. I checked it
> and FreeBSD seems to support the device according to Internet sources
> indeed.
> 
> It's up to the original poster to clarify whether he intends to target
> FreeBSD on his device, or whether he was interested in creating programs
> for the device without an operating system.

Jonas is right. Compiling a cross compiler with target arm embedded on a
system running freebsd.

-- 
Marc Santhoff 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] building arm cross compiler on FreeBSD

2016-01-10 Thread Marc Santhoff
On So, 2016-01-10 at 09:52 +0100, Michael Ring wrote:
> Perhaps you should build your own binutils, it seems that the version 
> you are using right now does not properly support armv7-m architecture.

Did the trick, a current version of arm-elf-binutils worked. :)

Many thanks to all who contributed.

Marc

-- 
Marc Santhoff 

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Do I need to make fpc 3.0.0 twice?

2016-01-10 Thread Bo Berglund
On Sat, 9 Jan 2016 00:47:54 -0700 (MST), leledumbo
 wrote:

>> Should I make fpc 3.0.0 once more using the newly created fpc 3.0.0? 
>
>Yes if you do compile by hand (without Makefile)
Which I never do...

...
>
>Else if what you mean is: will using 2.6.4 as the starting compiler produce
>different 3.0.0 binary from 3.0.0 while using the Makefile? Then no.

I always use the make all command via the Makefile.
So do I read you right that the Makefile compiles the compiler twice,
once using the seed compiler and then using the thus created compiler?

-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Do I need to make fpc 3.0.0 twice?

2016-01-10 Thread Jonas Maebe

On 10/01/16 16:22, Bo Berglund wrote:

I always use the make all command via the Makefile.
So do I read you right that the Makefile compiles the compiler twice,
once using the seed compiler and then using the thus created compiler?


It compiles it thrice: once more in the end to ensure that the resulting 
compiler is "stable", in the sense that it generates the same code when 
compiled with itself as when compiled with a previous release.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Do I need to make fpc 3.0.0 twice?

2016-01-10 Thread Bo Berglund
On Sun, 10 Jan 2016 16:35:43 +0100, Jonas Maebe
 wrote:

>On 10/01/16 16:22, Bo Berglund wrote:
>> I always use the make all command via the Makefile.
>> So do I read you right that the Makefile compiles the compiler twice,
>> once using the seed compiler and then using the thus created compiler?
>
>It compiles it thrice: once more in the end to ensure that the resulting 
>compiler is "stable", in the sense that it generates the same code when 
>compiled with itself as when compiled with a previous release.

Fantastic! Then I can be assured a successful make results in the
expected release version!
Good job!


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal