Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread luiz americo pereira camara
2015-07-09 12:58 GMT-03:00 Michael Van Canneyt mich...@freepascal.org:



 On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:



 Is there a way with the Compiler Options - Other (or Additions and
 Overrides) to include a specific package based on a compiler define?



 I would even go further, and have a package included or not depending on
 the OS.


+1.

I hit similar issue and tried to use the Conditionals script with the IDE
Macro but could not get working .

My idea was do the following, but did not work:

  if SomeCondition then begin
UsageSrcPath += GetIDEValue('$PkgSrcPath(''apackagname'')');
  end;

In my specific case the condition was the avaibility of a package. See
thread Check if a package is available through macros

Luiz
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Michael Van Canneyt



On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:


Hi,

I have two independent packages. I would like my project to toggle
between either one (but never both at the same time). Both have a unit
with the exact same name, hence both packages can't be added to the
dependency list at the same time.

Is there a way with the Compiler Options - Other (or Additions and
Overrides) to include a specific package based on a compiler define?

eg:
 if defined UsePackageA
   PackageDependecy.Add(PackageA)
 else
   PackageDependency.Add(PackageB)

Well something like that at least.


I would even go further, and have a package included or not depending on the OS.
Similar, I think it should be possible to include a unit in a package, 
depending on the OS.

In short, a set of conditions for package dependencies and contains lists.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Graeme Geldenhuys
On 2015-07-09 16:58, Michael Van Canneyt wrote:
 I would even go further, and have a package included or not depending
 on the OS. Similar, I think it should be possible to include a unit
 in a package, depending on the OS.


+1 on both counts. I've hit the issue of your second point many years
ago with fpGUI packages and had to resort to using two packages of the
same name, but in different OS directories.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Marcos Douglas
On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt
mich...@freepascal.org wrote:


 On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:

 Hi,

 I have two independent packages. I would like my project to toggle
 between either one (but never both at the same time). Both have a unit
 with the exact same name, hence both packages can't be added to the
 dependency list at the same time.

 Is there a way with the Compiler Options - Other (or Additions and
 Overrides) to include a specific package based on a compiler define?

 eg:
  if defined UsePackageA
PackageDependecy.Add(PackageA)
  else
PackageDependency.Add(PackageB)

 Well something like that at least.


 I would even go further, and have a package included or not depending on the
 OS.
 Similar, I think it should be possible to include a unit in a package,
 depending on the OS.

 In short, a set of conditions for package dependencies and contains lists.

I would even go further even more:
If we have two units with the same name, would be better if were
possible to create an alias namespace for each unit, like C# does.

https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx

But you, guys, will talk about an Unit is a namespace -- we know
this is true -- and this is not necessary... anyway.

Best regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Michael Van Canneyt



On Thu, 9 Jul 2015, Marcos Douglas wrote:


On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt
mich...@freepascal.org wrote:



On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:


Hi,

I have two independent packages. I would like my project to toggle
between either one (but never both at the same time). Both have a unit
with the exact same name, hence both packages can't be added to the
dependency list at the same time.

Is there a way with the Compiler Options - Other (or Additions and
Overrides) to include a specific package based on a compiler define?

eg:
 if defined UsePackageA
   PackageDependecy.Add(PackageA)
 else
   PackageDependency.Add(PackageB)

Well something like that at least.



I would even go further, and have a package included or not depending on the
OS.
Similar, I think it should be possible to include a unit in a package,
depending on the OS.

In short, a set of conditions for package dependencies and contains lists.


I would even go further even more:
If we have two units with the same name, would be better if were
possible to create an alias namespace for each unit, like C# does.

https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx

But you, guys, will talk about an Unit is a namespace -- we know
this is true -- and this is not necessary... anyway.


This is not correct.

We have support for dotted unit names. The only thing missing is a namespace 
directive.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Marcos Douglas
On Thu, Jul 9, 2015 at 3:45 PM, Michael Van Canneyt
mich...@freepascal.org wrote:


 On Thu, 9 Jul 2015, Marcos Douglas wrote:

 On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt
 mich...@freepascal.org wrote:



 On Thu, 9 Jul 2015, Marcos Douglas wrote:

 On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt
 mich...@freepascal.org wrote:




 On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:

 Hi,

 I have two independent packages. I would like my project to toggle
 between either one (but never both at the same time). Both have a unit
 with the exact same name, hence both packages can't be added to the
 dependency list at the same time.

 Is there a way with the Compiler Options - Other (or Additions and
 Overrides) to include a specific package based on a compiler define?

 eg:
  if defined UsePackageA
PackageDependecy.Add(PackageA)
  else
PackageDependency.Add(PackageB)

 Well something like that at least.




 I would even go further, and have a package included or not depending
 on
 the
 OS.
 Similar, I think it should be possible to include a unit in a package,
 depending on the OS.

 In short, a set of conditions for package dependencies and contains
 lists.



 I would even go further even more:
 If we have two units with the same name, would be better if were
 possible to create an alias namespace for each unit, like C# does.

 https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx

 But you, guys, will talk about an Unit is a namespace -- we know
 this is true -- and this is not necessary... anyway.



 This is not correct.

 We have support for dotted unit names. The only thing missing is a
 namespace
 directive.


 I know we have support for dotted unit names -- and this is not so
 important, ie, what the difference between MyUnitName to my.unit.name?
 -- the real problem, IMHO, is the names collisions between packages.


 I repeat:
 The only thing missing is a namespace directive.

 And then you have what you need.

Ok.

To get ideas, Graeme has created this years ago:
http://wiki.lazarus.freepascal.org/Namespaces

Regards,
Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread silvioprog

 On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt mich...@freepascal.org
  wrote:

[...]

 We have support for dotted unit names. The only thing missing is a
 namespace directive.


Is there any plan for implementing the -NS[1] compiler parameter? This
option allows to use scoped unit names, that is very good for dotted unit
names, e.g:

MyCompany.SysUtils; // scope.unitname

...

uses
  SysUtils; // this is an 'alias' for my 'MyCompany.SysUtils' unit ...

$ fpc -NSMyCompany (it could be enabled via Lazarus package too)

This option also enables the 'UseUnitScopeNames' directive, so you can use
a unit declaration like 'uses {$IFNDEF
UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'.

P.S.: you can pass two or more scopes via this options, e.g:
-NSMyCompany;OtherCompany;SomeLib

[1] http://docwiki.embarcadero.com/RADStudio/XE8/en/Delphi_Compiler

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread silvioprog
On Thu, Jul 9, 2015 at 4:05 PM, silvioprog silviop...@gmail.com wrote:
[...]

 This option also enables the 'UseUnitScopeNames' directive, so you can use
 a unit declaration like 'uses {$IFNDEF
 UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'.


Oops,

... so you can use an unit declaration like 'uses {$IFNDEF
UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils', that is very useful for
keep support for legacy codes.

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Marcos Douglas
On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt
mich...@freepascal.org wrote:


 On Thu, 9 Jul 2015, Marcos Douglas wrote:

 On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt
 mich...@freepascal.org wrote:



 On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:

 Hi,

 I have two independent packages. I would like my project to toggle
 between either one (but never both at the same time). Both have a unit
 with the exact same name, hence both packages can't be added to the
 dependency list at the same time.

 Is there a way with the Compiler Options - Other (or Additions and
 Overrides) to include a specific package based on a compiler define?

 eg:
  if defined UsePackageA
PackageDependecy.Add(PackageA)
  else
PackageDependency.Add(PackageB)

 Well something like that at least.



 I would even go further, and have a package included or not depending on
 the
 OS.
 Similar, I think it should be possible to include a unit in a package,
 depending on the OS.

 In short, a set of conditions for package dependencies and contains
 lists.


 I would even go further even more:
 If we have two units with the same name, would be better if were
 possible to create an alias namespace for each unit, like C# does.

 https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx

 But you, guys, will talk about an Unit is a namespace -- we know
 this is true -- and this is not necessary... anyway.


 This is not correct.

 We have support for dotted unit names. The only thing missing is a namespace
 directive.

I know we have support for dotted unit names -- and this is not so
important, ie, what the difference between MyUnitName to my.unit.name?
-- the real problem, IMHO, is the names collisions between packages.


Marcos Douglas

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Michael Van Canneyt



On Thu, 9 Jul 2015, Marcos Douglas wrote:


On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt
mich...@freepascal.org wrote:



On Thu, 9 Jul 2015, Marcos Douglas wrote:


On Thu, Jul 9, 2015 at 12:58 PM, Michael Van Canneyt
mich...@freepascal.org wrote:




On Thu, 9 Jul 2015, Graeme Geldenhuys wrote:


Hi,

I have two independent packages. I would like my project to toggle
between either one (but never both at the same time). Both have a unit
with the exact same name, hence both packages can't be added to the
dependency list at the same time.

Is there a way with the Compiler Options - Other (or Additions and
Overrides) to include a specific package based on a compiler define?

eg:
 if defined UsePackageA
   PackageDependecy.Add(PackageA)
 else
   PackageDependency.Add(PackageB)

Well something like that at least.




I would even go further, and have a package included or not depending on
the
OS.
Similar, I think it should be possible to include a unit in a package,
depending on the OS.

In short, a set of conditions for package dependencies and contains
lists.



I would even go further even more:
If we have two units with the same name, would be better if were
possible to create an alias namespace for each unit, like C# does.

https://msdn.microsoft.com/en-us/library/aa664765(v=vs.71).aspx

But you, guys, will talk about an Unit is a namespace -- we know
this is true -- and this is not necessary... anyway.



This is not correct.

We have support for dotted unit names. The only thing missing is a namespace
directive.


I know we have support for dotted unit names -- and this is not so
important, ie, what the difference between MyUnitName to my.unit.name?
-- the real problem, IMHO, is the names collisions between packages.


I repeat:
The only thing missing is a namespace directive.

And then you have what you need.

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread Michael Van Canneyt



On Thu, 9 Jul 2015, silvioprog wrote:


  On Thu, Jul 9, 2015 at 2:58 PM, Michael Van Canneyt 
mich...@freepascal.org wrote:

[...] 
  We have support for dotted unit names. The only thing missing is a 
namespace directive.


Is there any plan for implementing the -NS[1] compiler parameter? This option 
allows to use scoped unit names, that is very good for dotted unit names, e.g:

MyCompany.SysUtils; // scope.unitname


That is what I am talking about, this is the missing piece. Patches welcome :-)

Michael.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Conditionally add a package dependency?

2015-07-09 Thread luiz americo pereira camara
Guys, i suggest to create another thread to discuss namespace.

This thread is a different topic, related to the IDE, while namespace is a
compiler thing.

Luiz
Em 09/07/2015 16:12, silvioprog silviop...@gmail.com escreveu:

 On Thu, Jul 9, 2015 at 4:05 PM, silvioprog silviop...@gmail.com wrote:
 [...]

 This option also enables the 'UseUnitScopeNames' directive, so you can
 use a unit declaration like 'uses {$IFNDEF
 UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils'.


 Oops,

 ... so you can use an unit declaration like 'uses {$IFNDEF
 UseUnitScopeNames}MyCompany.{$ENDIF}SysUtils', that is very useful for
 keep support for legacy codes.

 --
 Silvio Clécio
 My public projects - github.com/silvioprog

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-18 Thread Marco van de Voort
On Thu, Jul 17, 2014 at 11:33:37AM +0200, Sven Barth wrote:
  Some users installed fpc with system.ppu and no
  classes.ppu. That's why the test was added years ago.
 
 Hmm... It might be that this was when Classes was not yet part of the RTL.
 This was changed some years back, so that unit should be available
 automatically now (except for selected targets). With the recent clean up
 of the RTL directory a few other units fall now under the category of
 might be missing...

Yes. Now that you say it I think too. The RTL is in some cases automatically
found, while other units aren't.

That role has mostly been replaced by unit contnrs. If RTL is found and the
other packages not, the error is usually for contnrs.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-17 Thread Marco van de Voort
On Wed, Jul 16, 2014 at 09:25:49PM +0200, Sven Barth wrote:
  installed right.
  For targets without Classes the test needs to be adapted.
  What targets do not have a classes.ppu?
 
 All targets that don't have a classes.pp in their corresponding RTL 
 directory (e.g. rtl/embedded, rtl/macos, rtl/atari, rtl/emx). Note: Unix 
 platforms like Linux, AIX, the BSDs etc. use the classes.pp in the unix 
 directory.

Windows units use win, OS/2 and emx also share some files iirc, as do
amiga and morphos.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-17 Thread Sven Barth
Am 16.07.2014 22:01 schrieb Mattias Gaertner nc-gaert...@netcologne.de:

 On Wed, 16 Jul 2014 21:25:49 +0200
 Sven Barth pascaldra...@googlemail.com wrote:

 [...]
  It's likely better to rely on the system.ppu... :/

 Some users installed fpc with system.ppu and no
 classes.ppu. That's why the test was added years ago.

Hmm... It might be that this was when Classes was not yet part of the RTL.
This was changed some years back, so that unit should be available
automatically now (except for selected targets). With the recent clean up
of the RTL directory a few other units fall now under the category of
might be missing...

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-17 Thread Justin Smyth
Whats required to change this behaviour ? 

 

 

If you can point me in the right direction  it would be of great help.

 

I’ve just gotta remember to switch from VB coding back to pascal I am so use to 
it , its not funny  - I got a job doing VB programming here in Australia back 
in feb @ www.isis.co.uk 

 

 

Kind Regards

 

 

Justin

 

From: Sven Barth [mailto:pascaldra...@googlemail.com] 
Sent: Thursday, 17 July 2014 7:34 PM
To: Lazarus mailing list
Subject: Re: [Lazarus] Compiler Options

 

Am 16.07.2014 22:01 schrieb Mattias Gaertner nc-gaert...@netcologne.de:

 On Wed, 16 Jul 2014 21:25:49 +0200
 Sven Barth pascaldra...@googlemail.com wrote:

 [...]
  It's likely better to rely on the system.ppu... :/

 Some users installed fpc with system.ppu and no
 classes.ppu. That's why the test was added years ago.

Hmm... It might be that this was when Classes was not yet part of the RTL. This 
was changed some years back, so that unit should be available automatically now 
(except for selected targets). With the recent clean up of the RTL directory a 
few other units fall now under the category of might be missing...

Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Michael Schnell

On 07/15/2014 05:26 AM, Justin Smyyth wrote:

  Target selected as embedded

Is there an official description what this is supposed to mean ?

Some years ago embedded in the Linux Kernel meant that the CPU does 
not feature a Memory management Unit.


Nowadays, ARM CPUs without MMU seem rather outdated, while a lot of the 
newly designed embedded boxes (e.g. NAS devices) in fact do uses ARM 
CPUs with MMU.


Hence IMHO the therm embedded to select a feature of an ARCH should be 
avoided.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Justin Smyth
If you compile using trunk fpc I need to use -Cparmv7m

 

-Op is target cpu optimization 

 

And -cp is for choice of instruction set.

 

 

The -Op seems wrong to be used in this case, project options are for
defining the cpu type not if optimizations are needed.

 

 

The two are listed from ppcrossarm.exe -h

 

-Opx Set target cpu for optimizing, see fpc -i for possible values

 

-Cpx Select instruction set, see fpc -i for possible values

 

See what I mean, the -Op doesn't not make sense to be used from here, it
should be -Cp 

 

 

Ideally I want to place a check box to allow the user (me) to change it from
using -Op to -Cp  , both are valid commands coming from using -h on the
compiler.

 

As for the arm based board , I am using a NXP LPC 1343 Risc Processor. 

 

http://www.wvshare.com/product/Open1343-Standard.htm

 

 

that's the board in question

 

Kind Regards

 

 

Justin

 

 

From: Michael Schnell [mailto:mschn...@lumino.de] 
Sent: Wednesday, 16 July 2014 6:43 PM
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus] Compiler Options

 

On 07/15/2014 05:26 AM, Justin Smyyth wrote:

  Target selected as embedded

Is there an official description what this is supposed to mean ? 

Some years ago embedded in the Linux Kernel meant that the CPU does not
feature a Memory management Unit. 

Nowadays, ARM CPUs without MMU seem rather outdated, while a lot of the
newly designed embedded boxes (e.g. NAS devices) in fact do uses ARM CPUs
with MMU. 

Hence IMHO the therm embedded to select a feature of an ARCH should be
avoided.
A
-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Sven Barth
Am 16.07.2014 11:11 schrieb Michael Schnell mschn...@lumino.de:

 On 07/15/2014 05:26 AM, Justin Smyyth wrote:

   Target selected as embedded

 Is there an official description what this is supposed to mean ?

The official FPC description: No OS, bare hardware. In case of ARM this
also includes the possibility to load a controller file for certain boards
we already support.

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Sven Barth
Am 16.07.2014 11:31 schrieb Justin Smyth delph...@smythconsulting.net:

 If you compile using trunk fpc I need to use -Cparmv7m



 -Op is target cpu optimization



 And –cp is for choice of instruction set.





 The –Op seems wrong to be used in this case, project options are for
defining the cpu type not if optimizations are needed.


This was corrected yesterday in Lazarus.

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Marco van de Voort
On Wed, Jul 16, 2014 at 11:51:44AM +0200, Sven Barth wrote:
  Is there an official description what this is supposed to mean ?
 
 The official FPC description: No OS, bare hardware.

(and that results in only a barebone RTL)

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Michael Schnell

On 07/16/2014 11:51 AM, Sven Barth wrote:


The official FPC description: No OS, bare hardware. In case of ARM 
this also includes the possibility to load a controller file for 
certain boards we already support.


To me this wording seems just as misleading as the old-style Linux 
noMMU meaning, as nowadays many embedded systems do run a full blown 
OS (mostly Linux).


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Michael Schnell

On 07/16/2014 11:57 AM, Marco van de Voort wrote:

(and that results in only a barebone RTL)
I do like the term barebone a lot more than embedded for this option 
:-)


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Justin Smyth
Thanks

I am updating lazarus on my vm now. 


I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded )

I've also made a custom version of GDBMiServerDebugger which adds support
for connecting to EABI version of gdb using OpenOCD V8 


Also another question , when I am targeting arm based arch , when I start up
it complains it cant find classes.ppu - but the program compiles OK can this
be supressed if a target is chosen that doesn't use it ?

-Original Message-
From: Michael Schnell [mailto:mschn...@lumino.de] 
Sent: Wednesday, 16 July 2014 8:04 PM
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus] Compiler Options

On 07/16/2014 11:57 AM, Marco van de Voort wrote:
 (and that results in only a barebone RTL)
I do like the term barebone a lot more than embedded for this option 
:-)

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Mattias Gaertner
On Wed, 16 Jul 2014 21:45:55 +1000
Justin Smyth delph...@smythconsulting.net wrote:

 Thanks
 
 I am updating lazarus on my vm now. 
 
 
 I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded )
 
 I've also made a custom version of GDBMiServerDebugger which adds support
 for connecting to EABI version of gdb using OpenOCD V8 
 
 
 Also another question , when I am targeting arm based arch , when I start up
 it complains it cant find classes.ppu - but the program compiles OK can this
 be supressed if a target is chosen that doesn't use it ?

Is there really no classes.ppu for your arm target?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Justin Smyth
No Classes for Embedded ARM. 

If I goto my source dir for Trunk FPC and do a search in RTL I can't find
anything for classes.*


 Note I am using trunk FPC and not fixes_2_6 ( or what ever the lastest
version is) as trunk FPC only supports my lpc board, it doesn't work in
fixes_2_6 

Kind Regards


Justin

-Original Message-
From: Mattias Gaertner [mailto:nc-gaert...@netcologne.de] 
Sent: Wednesday, 16 July 2014 10:07 PM
To: lazarus@lists.lazarus.freepascal.org
Subject: Re: [Lazarus] Compiler Options

On Wed, 16 Jul 2014 21:45:55 +1000
Justin Smyth delph...@smythconsulting.net wrote:

 Thanks
 
 I am updating lazarus on my vm now. 
 
 
 I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded 
 )
 
 I've also made a custom version of GDBMiServerDebugger which adds 
 support for connecting to EABI version of gdb using OpenOCD V8
 
 
 Also another question , when I am targeting arm based arch , when I 
 start up it complains it cant find classes.ppu - but the program 
 compiles OK can this be supressed if a target is chosen that doesn't use
it ?

Is there really no classes.ppu for your arm target?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Sven Barth
Am 16.07.2014 14:08 schrieb Mattias Gaertner nc-gaert...@netcologne.de:

 On Wed, 16 Jul 2014 21:45:55 +1000
 Justin Smyth delph...@smythconsulting.net wrote:

  Thanks
 
  I am updating lazarus on my vm now.
 
 
  I am using trunk FPC 2.6.4 which has the mods for LPC 1343. ( embedded )
 
  I've also made a custom version of GDBMiServerDebugger which adds
support
  for connecting to EABI version of gdb using OpenOCD V8
 
 
  Also another question , when I am targeting arm based arch , when I
start up
  it complains it cant find classes.ppu - but the program compiles OK can
this
  be supressed if a target is chosen that doesn't use it ?

 Is there really no classes.ppu for your arm target?

That's rather likely as Classes is simply too fat...

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Mattias Gaertner
On Wed, 16 Jul 2014 15:14:01 +0200
Sven Barth pascaldra...@googlemail.com wrote:

[...]
  Is there really no classes.ppu for your arm target?
 
 That's rather likely as Classes is simply too fat...

On targets with classes the fat makes it a good indicator if fpc was
installed right.
For targets without Classes the test needs to be adapted.
What targets do not have a classes.ppu?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Michael Ring
arm-embedded does not have classes.ppu, same with mipsel-embedded (but 
this target is not yet fully visible in trunk)


arm and mipsel do have definitions in fpc/rtl/embedded/rtl.cfg :

#ifdef CPUARM
-SfSOFTFPU
-SfCLASSES

#ifdef CPUMIPSEL
-SfSOFTFPU
-SfCLASSES

but even with those settings active classes does not get built:

ppcrossarm -MObjFPC -Scghi -al -Ch1024 -Cs1024 -Tembedded -Parm $DEBUG 
-vewnhix -l -Cparmv7m -O-  -WpSTM32F100XC -XParm-none-eabi- 
-FD/usr/local/bin -a test.pas

Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.7.1 [2014/07/12] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Embedded
Compiling test.pas
test.pas(3,3) Fatal: Can't find unit classes used by test
Fatal: Compilation aborted

-

program test;
uses
  classes;

begin
end.

A find . -name classes* only shows me classes.ppu for the 'big' 
platforms i build from trunk, x86_64-darwin and i386-darwin, nothing for 
arm-embedded and mipsel-embedded


Michael

Am 16.07.14 15:28, schrieb Mattias Gaertner:

On Wed, 16 Jul 2014 15:14:01 +0200
Sven Barth pascaldra...@googlemail.com wrote:


[...]

Is there really no classes.ppu for your arm target?

That's rather likely as Classes is simply too fat...

On targets with classes the fat makes it a good indicator if fpc was
installed right.
For targets without Classes the test needs to be adapted.
What targets do not have a classes.ppu?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Sven Barth

On 16.07.2014 15:28, Mattias Gaertner wrote:

On Wed, 16 Jul 2014 15:14:01 +0200
Sven Barth pascaldra...@googlemail.com wrote:


[...]

Is there really no classes.ppu for your arm target?


That's rather likely as Classes is simply too fat...


On targets with classes the fat makes it a good indicator if fpc was
installed right.
For targets without Classes the test needs to be adapted.
What targets do not have a classes.ppu?


All targets that don't have a classes.pp in their corresponding RTL 
directory (e.g. rtl/embedded, rtl/macos, rtl/atari, rtl/emx). Note: Unix 
platforms like Linux, AIX, the BSDs etc. use the classes.pp in the unix 
directory.


It's likely better to rely on the system.ppu... :/

Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Mattias Gaertner
On Wed, 16 Jul 2014 21:25:49 +0200
Sven Barth pascaldra...@googlemail.com wrote:

[...]
 It's likely better to rely on the system.ppu... :/

Some users installed fpc with system.ppu and no
classes.ppu. That's why the test was added years ago.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options

2014-07-16 Thread Sven Barth

On 16.07.2014 22:00, Mattias Gaertner wrote:

On Wed, 16 Jul 2014 21:25:49 +0200
Sven Barth pascaldra...@googlemail.com wrote:


[...]
It's likely better to rely on the system.ppu... :/


Some users installed fpc with system.ppu and no
classes.ppu. That's why the test was added years ago.


How did they manage that?! O.o

Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options: Apply conventions

2012-09-08 Thread Mark Morgan Lloyd

patspiper wrote:
What exactly is Compiler Options: Apply conventions? It is not 
documented in 
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options.


Affects things like e.g. 'lib' being applied as a prefix to a unix 
shared library.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options: Apply conventions

2012-09-08 Thread Mattias Gaertner
On Sat, 08 Sep 2012 12:27:28 +0300
patspiper patspi...@gmail.com wrote:

 What exactly is Compiler Options: Apply conventions? It is not 
 documented in 
 http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options.

I added it:

http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Apply_Conventions

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options: Apply conventions

2012-09-08 Thread patspiper

On 08/09/12 12:58, Mattias Gaertner wrote:

On Sat, 08 Sep 2012 12:27:28 +0300
patspiper patspi...@gmail.com wrote:


What exactly is Compiler Options: Apply conventions? It is not
documented in
http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options.

I added it:

http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Apply_Conventions

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Thanks!

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler options

2012-05-07 Thread Mattias Gaertner
On Mon, 07 May 2012 22:12:57 +0930
SteveG ste...@nevets.com.au wrote:

 Project Options / Paths / Unit Output directory (-FU)
 
 Would anybody know if there exists a compiler substitution for the 
 current username (under Linux)
 I would like the output dir set to eg: /tmp/curruser/project/etc
 
 (multiple users on a shared system)

/tmp/$ENV(USER)/project/etc

or maybe you want this:

$ENV(HOME)/project/etc


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler options

2012-05-07 Thread SteveG

On 07/05/12 22:16, Mattias Gaertner wrote:

On Mon, 07 May 2012 22:12:57 +0930
SteveGste...@nevets.com.au  wrote:


Project Options / Paths / Unit Output directory (-FU)

Would anybody know if there exists a compiler substitution for the
current username (under Linux)
I would like the output dir set to eg: /tmp/curruser/project/etc

(multiple users on a shared system)

/tmp/$ENV(USER)/project/etc

or maybe you want this:

$ENV(HOME)/project/etc


Mattias


Thanks Mattias - exactly what I was after

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Compiler Options - Compiler Messages

2009-10-06 Thread dmitry boyarintsev
2009/10/6 Marcelo Borges de Paula mar...@terra.com.br:
 I know that if i check this option in Project-Compiler Options-Messages,
 the file is used only for current project.
Maybe the option should be in Environment - Desktop options.
The same place where IDE's interface language is selected.

 BTW, could someone tell me which tool is used to edit these files (*.msg)
 and confirm that the encoding to use with lazarus is UTF-8 ?

Starting from revision r22056, msg file should be encoded with Utf8
for Lazarus, no matter what the OS is.
I'm not sure if there's any special tool for editting .msg file, but
any texteditor (capable of saving plain text file) can be used.

thanks,
dmitry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus