alternative name fpc cross

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

alternative name fpc cross

turro75
Hi All,

when I create the cross compiler to arm-android and arm-embedded I get the
same compiler name so unable to have both running in the same system.
any workaround?

Regards



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: alternative name fpc cross

Tomas Hajny-2
On Tue, October 10, 2017 10:13, turro75 wrote:


Hi,

> when I create the cross compiler to arm-android and arm-embedded I get the
> same compiler name so unable to have both running in the same system.
> any workaround?

Are the two cross-compilers compiled with different options, or for
different endianess (in other words, are the executables different)?
Otherwise the same compiler binary should be usable for both targets.

Tomas


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

Re: alternative name fpc cross

Karoly Balogh (Charlie/SGR)
In reply to this post by turro75
Hi,

On Tue, 10 Oct 2017, turro75 wrote:

> when I create the cross compiler to arm-android and arm-embedded I get the
> same compiler name so unable to have both running in the same system.
> any workaround?

The compiler is *NOT* OS/platform specific, only CPU specific. Use any for
both, and specify the right target using -Tandroid or -Tembedded when
invoking.

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

Re: alternative name fpc cross

pascalX
On 10/10/17 11:16, Karoly Balogh (Charlie/SGR) wrote:

> Hi,
>
> On Tue, 10 Oct 2017, turro75 wrote:
>
>> when I create the cross compiler to arm-android and arm-embedded I get the
>> same compiler name so unable to have both running in the same system.
>> any workaround?
>
> The compiler is *NOT* OS/platform specific, only CPU specific. Use any for
> both, and specify the right target using -Tandroid or -Tembedded when
> invoking.
>
> Charlie

Maybe you meant the compiler is not TARGET OS specific in that it can
compiler for any target ( that does seem to be the point the OP was
missing) .  It is specific to what HOST  it is built to run on. I don't
think you will get far running a linux x64 fpc on win64 and vice versa.





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

Re: alternative name fpc cross

Karoly Balogh (Charlie/SGR)
Hi,

On Tue, 10 Oct 2017, [hidden email] wrote:

> > The compiler is *NOT* OS/platform specific, only CPU specific. Use any for
> > both, and specify the right target using -Tandroid or -Tembedded when
> > invoking.
>
> Maybe you meant the compiler is not TARGET OS specific in that it can
> compiler for any target ( that does seem to be the point the OP was
> missing).

Yes.

> It is specific to what HOST it is built to run on. I don't think you
> will get far running a linux x64 fpc on win64 and vice versa.

While I understand what you mean, I'd recommend taking a look on WINE and
the Linux Subsystem for Windows. You might be surprised... ;)

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

Re: alternative name fpc cross

pascalX
On 10/10/17 13:29, Karoly Balogh (Charlie/SGR) wrote:
>   Linux Subsystem for Windows.

While I know what you mean ...

I used to be maintainer on Wine AppDB for several years. Nothing ever
worked from one release to the next.  WINE spent 10y  as an alpha
release and it started to get embarrassing so they called it beta.
Everything still, broke , it is still an alpha produce in all but name.

Sadly the target is moving faster than their ability to emulate it.

As for attempting to run a stable and secure  OS inside an insecure and
unstable one, that's a great way to combine all the disadvantages of
both. Probably clinically certifiable behaviour or at least "autistic
spectrum".


;)

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

Re: alternative name fpc cross

Michael Van Canneyt


On Tue, 10 Oct 2017, [hidden email] wrote:

> On 10/10/17 13:29, Karoly Balogh (Charlie/SGR) wrote:
>>   Linux Subsystem for Windows.
>
> While I know what you mean ...
>
> I used to be maintainer on Wine AppDB for several years. Nothing ever
> worked from one release to the next.  WINE spent 10y  as an alpha
> release and it started to get embarrassing so they called it beta.
> Everything still, broke , it is still an alpha produce in all but name.
>
> Sadly the target is moving faster than their ability to emulate it.
>
> As for attempting to run a stable and secure  OS inside an insecure and
> unstable one, that's a great way to combine all the disadvantages of
> both. Probably clinically certifiable behaviour or at least "autistic
> spectrum".
>
>
> ;)

LOL :)

My point of view since 15+ years...
Don't mix the 2 environments. Frustration and disappointment guaranteed.
It used to work more or less with VMWare and Virtualbox, but even this is
now becoming more a source of frustration than of satisfaction...

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

Re: alternative name fpc cross

turro75
In reply to this post by pascalX
Well,

I think my problem is easier....
when I compile fpc for arm-android target I get ppccrossarm and units
arm-android (with binutils arm-linux-android-*)
 
when I compile fpc for arm-embedded target I get ppccrossarm and units
arm-embedded (with binutils arm-none-eabi-*)

both are able to create binary as I need.

So the last crosschain created overwrites the previous (the ppcrossarm
executable).
Is there a way to instruct  fpc.cfg to use an alternative name (i.e.
ppcrossarmdroid or ppcrossarmembed) when fpc invokes the right compiler?



--
Sent from: http://free-pascal-general.1045716.n5.nabble.com/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: alternative name fpc cross

Karoly Balogh (Charlie/SGR)
In reply to this post by Michael Van Canneyt
Hi,

On Tue, 10 Oct 2017, Michael Van Canneyt wrote:

> > I used to be maintainer on Wine AppDB for several years. Nothing ever
> > worked from one release to the next.  WINE spent 10y  as an alpha
> > release and it started to get embarrassing so they called it beta.
> > Everything still, broke , it is still an alpha produce in all but name.
> >
> > Sadly the target is moving faster than their ability to emulate it.
> >
> > As for attempting to run a stable and secure  OS inside an insecure and
> > unstable one, that's a great way to combine all the disadvantages of
> > both. Probably clinically certifiable behaviour or at least "autistic
> > spectrum".
>
> LOL :)
>
> My point of view since 15+ years...
> Don't mix the 2 environments. Frustration and disappointment guaranteed.
> It used to work more or less with VMWare and Virtualbox, but even this is
> now becoming more a source of frustration than of satisfaction...

Although this is getting off topic now, it's a mater of use case I guess.
For once, I was pretty happy WINE existed, because I could run a bunch of
Windows (and binary) only tools on Linux and Mac OS with it already. I'm
pretty sure an FPC binary would also work fine in both directions, which
is where the whole discussion started.

I for example was glad I could run the ancient and Windows only POSE Palm
emulator on macOS, and I even used it for some retro FPC stuff...
(https://twitter.com/chainq/status/908439601630629888) Or I used the Amiga
emulator WinUAE a lot under WINE, before FS UAE matured, etc.

Nothing is a silver bullet and there are a lot of caveats. But
nevertheless, the state of interoperability between platforms is much
better than most people think, and care to admit. (And reach almost the
state of running a MacOS VM under AmigaOS 20 years ago, but that's a whole
different story... ;) )

Charlie

Ps:
http://charlie.amigaspirit.hu/screenshots/a2000/A2000-FPCvsThinkPascal.png

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

Re: alternative name fpc cross

Tony Whyman
In reply to this post by pascalX

On 10/10/17 13:50, [hidden email] wrote:

> On 10/10/17 13:29, Karoly Balogh (Charlie/SGR) wrote:
>>   Linux Subsystem for Windows.
>
> While I know what you mean ...
>
> I used to be maintainer on Wine AppDB for several years. Nothing ever
> worked from one release to the next.  WINE spent 10y  as an alpha
> release and it started to get embarrassing so they called it beta.
> Everything still, broke , it is still an alpha produce in all but name.
>
> Sadly the target is moving faster than their ability to emulate it.
>
> As for attempting to run a stable and secure  OS inside an insecure
> and unstable one, that's a great way to combine all the disadvantages
> of both. Probably clinically certifiable behaviour or at least
> "autistic spectrum".
>
On the other hand, without wine (and mono) I couldn't run WIX on Linux.

  If I couldn't run WIX on Linux then I could not build WIndows
Installer Packages on Linux.

  If I couldn't build WIndows Installer Packages on Linux then I would
not be able to have one script building for both Linux and Windows targets.

And then what would be the point of having cross-compilers and cross
platform libraries in the first place.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: alternative name fpc cross

Free Pascal - General mailing list
In reply to this post by turro75

Am 10.10.2017 15:21 schrieb "turro75" <[hidden email]>:
>
> Well,
>
> I think my problem is easier....
> when I compile fpc for arm-android target I get ppccrossarm and units
> arm-android (with binutils arm-linux-android-*)
>
> when I compile fpc for arm-embedded target I get ppccrossarm and units
> arm-embedded (with binutils arm-none-eabi-*)
>
> both are able to create binary as I need.
>
> So the last crosschain created overwrites the previous (the ppcrossarm
> executable).
> Is there a way to instruct  fpc.cfg to use an alternative name (i.e.
> ppcrossarmdroid or ppcrossarmembed) when fpc invokes the right compiler?

You can use the same binary for both as long as both compile for the same ABI (EABI vs. HardFloat vs. OABI).

Alternatively you can supply the -V option for the fpc binary. Used as "-Vxyz" the compiler driver will call <binary>-xyz.

Regards,
Sven


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

{$DEFINE DEVEL}

pascalX
Hi ,

I had a little trick that I used on BP and Delphi code that does not
work on Lazarus.

I define compiler variable which I could toggle on and off by adding a
second opening curly bracket, since the define only works if the line
starts {$


{$DEFINE DEVEL}


If I start the line {{$  Delphi ignores it but Lazarus then highlights
the rest of the code as a comment and it fails to compile.

main.pas(172,1) Warning: Comment level 2 found


Is this a bug or a feature?

Can anyone suggest a similar one key trick ?

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

Re: {$DEFINE DEVEL}

Tony Whyman
Try adding a space between the { and $ e.g.

{ $DEFINE DEVEL}

FPC then ignores the define


On 11/10/17 10:00, [hidden email] wrote:

> Hi ,
>
> I had a little trick that I used on BP and Delphi code that does not
> work on Lazarus.
>
> I define compiler variable which I could toggle on and off by adding a
> second opening curly bracket, since the define only works if the line
> starts {$
>
>
> {$DEFINE DEVEL}
>
>
> If I start the line {{$  Delphi ignores it but Lazarus then highlights
> the rest of the code as a comment and it fails to compile.
>
> main.pas(172,1) Warning: Comment level 2 found
>
>
> Is this a bug or a feature?
>
> Can anyone suggest a similar one key trick ?
>
> thx
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>

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

Re: {$DEFINE DEVEL}

José Mejuto
In reply to this post by pascalX
El 11/10/2017 a las 11:00, [hidden email] escribió:

> {$DEFINE DEVEL}
> Can anyone suggest a similar one key trick ?
Hello,

I'm using {.$DEFINE DEVEL}

--

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

Re: {$DEFINE DEVEL}

Mattias Gaertner
In reply to this post by pascalX
On Wed, 11 Oct 2017 10:00:15 +0100
[hidden email] wrote:

> Hi ,

First of all: Please do not "reply" when starting a new thread.

 
> I had a little trick that I used on BP and Delphi code that does not
> work on Lazarus.

The compiler is FPC.

 

> I define compiler variable which I could toggle on and off by adding a
> second opening curly bracket, since the define only works if the line
> starts {$
>
>
> {$DEFINE DEVEL}
>
>
> If I start the line {{$  Delphi ignores it but Lazarus then highlights
> the rest of the code as a comment and it fails to compile.
>
> main.pas(172,1) Warning: Comment level 2 found
>
>
> Is this a bug or a feature?

It's a feature. You can turn it off with
{$ModeSwitch NestedComments-}

It is disabled by default in $mode delphi.
 
> Can anyone suggest a similar one key trick ?

Any char will do:
{ $directive}

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

Re: {$DEFINE DEVEL}

pascalX
On 11/10/17 10:13, Mattias Gaertner wrote:

> On Wed, 11 Oct 2017 10:00:15 +0100
> [hidden email] wrote:
>
>> Hi ,
>
> First of all: Please do not "reply" when starting a new thread.
>
>  
>> I had a little trick that I used on BP and Delphi code that does not
>> work on Lazarus.
>
> The compiler is FPC.
>
>  
>> I define compiler variable which I could toggle on and off by adding a
>> second opening curly bracket, since the define only works if the line
>> starts {$
>>
>>
>> {$DEFINE DEVEL}
>>
>>
>> If I start the line {{$  Delphi ignores it but Lazarus then highlights
>> the rest of the code as a comment and it fails to compile.
>>
>> main.pas(172,1) Warning: Comment level 2 found
>>
>>
>> Is this a bug or a feature?
>
> It's a feature. You can turn it off with
> {$ModeSwitch NestedComments-}
>
> It is disabled by default in $mode delphi.
>  
>> Can anyone suggest a similar one key trick ?
>
> Any char will do:
> { $directive}
>
> Mattias

Thanks for info about NestedComments. Mattias.

While I did hit "reply to list" in my email client  to get list email in
the To: field when posting this new subject , I then removed the old
subject with "Re. [ .. old subject title ]  and put in a new subject
title: {$DEFINE DEVEL}

It wasn't a reply because they was no Re and it had a new title.

I should have deleted the  [fpc-pascal]  as well . Sorry.





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

Re: {$DEFINE DEVEL}

Mattias Gaertner
On Wed, 11 Oct 2017 11:45:33 +0100
[hidden email] wrote:

>[...]
> It wasn't a reply because they was no Re and it had a new title.
>
> I should have deleted the  [fpc-pascal]  as well . Sorry.

A reply is not defined by the title. It is marked by the hidden
References aka In-Reply-To fields, that a mail client inserts when
clicking reply.

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

Re: {$DEFINE DEVEL}

pascalX
On 11/10/17 12:00, Mattias Gaertner wrote:

> On Wed, 11 Oct 2017 11:45:33 +0100
> [hidden email] wrote:
>
>> [...]
>> It wasn't a reply because they was no Re and it had a new title.
>>
>> I should have deleted the  [fpc-pascal]  as well . Sorry.
>
> A reply is not defined by the title. It is marked by the hidden
> References aka In-Reply-To fields, that a mail client inserts when
> clicking reply.
>
> Mattias
> _______________________________________________

Ah thanks I was not aware of that.  I'll stop doing it that way.






_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal