Sign in Join

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

Mailing lists / fpc-pascal / 2017-10

alternative name fpc cross

18 messages · 9 people · –

Reply by email Subscribe to this list Your subscription

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

Tomas Hajny
to turro75

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

Unknown author
to Karoly Balogh (Charlie/SGR
Karoly Balogh wrote 13 lines
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.

Karoly Balogh (Charlie/SGR
to Unknown author

Hi,

Show quoted text 7 lines
> 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

Unknown author
to Karoly Balogh (Charlie/SGR
Karoly Balogh 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".

;)

Michael Van Canneyt
to Unknown author
Show quoted text 19 lines
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.

turro75
to Unknown author: While I know what you mean ... I used to be maintainer on Wine AppDB for several years.…

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?

Karoly Balogh (Charlie/SGR
to Michael Van Canneyt: LOL :) My point of view since 15+ years... Don't mix the 2 environments. Frustration and…

Hi,

Michael Van Canneyt wrote 18 lines
> 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

;)

Tony Whyman
to Unknown author: While I know what you mean ... I used to be maintainer on Wine AppDB for several years.…
Show quoted text 17 lines
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.

Sven Barth
to turro75: I think my problem is easier.... when I compile fpc for arm-android target I get…
"turro75" wrote 16 lines
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

Unknown author
to Sven Barth

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

Tony Whyman
to Unknown author

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

{ $DEFINE DEVEL}

FPC then ignores the define

Show quoted text 28 lines
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  -  http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Mattias Gaertner
to Unknown author: I had a little trick that I used on BP and Delphi code that does not work on Lazarus. I…
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.

Show quoted text 15 lines
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

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 41 lines
On Wed, 11 Oct 2017 10:00:15 +0100 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.

Mattias Gaertner
to Unknown author
[...] 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

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 14 lines
On Wed, 11 Oct 2017 11:45:33 +0100 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.