Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Victor Campillo via fpc-pascal

On 22/3/22 11:09, Karoly Balogh via fpc-pascal wrote:

No, it isn't. -O parameters will _enable_ certain optimizations.
This means, -O3 -O1 will not switch the compiler "back" to -O1, just stay
at -O3, because at -O3 level, all -O1 optimizations are already enabled,
there is nothing to enable.

-O- however will disable all optimizations. So if you want to disable all
previously enabled optimizations, you indeed need to go to the -O- -O1
route. So it is actually useful.

(The above is quite easy to verify, see options.pas, line 2350 and below
in the compiler sources.)

Charlie


Good to know.

Now I am pretty sure that I copy that options from someone else, because 
with my knowledge I could not figure out that myself.


Thank you Charlie.

Best Regards.

--
Victor Campillo

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Karoly Balogh via fpc-pascal
Hi,

On Tue, 22 Mar 2022, Victor Campillo via fpc-pascal wrote:

> On 22/3/22 9:51, Mattias Gaertner via fpc-pascal wrote:
> > Is this paranoid or useful?
> > -O- -O1
> >
> Good point. My script have many years and I don't remember why I used this
> options or if I gathered them from someone else, but reviewing it now, it does
> not seems logical. I suppose -O1 overwrite -O-, so specify -O- is completely
> useless.

No, it isn't. -O parameters will _enable_ certain optimizations.
This means, -O3 -O1 will not switch the compiler "back" to -O1, just stay
at -O3, because at -O3 level, all -O1 optimizations are already enabled,
there is nothing to enable.

-O- however will disable all optimizations. So if you want to disable all
previously enabled optimizations, you indeed need to go to the -O- -O1
route. So it is actually useful.

(The above is quite easy to verify, see options.pas, line 2350 and below
in the compiler sources.)

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Victor Campillo via fpc-pascal

On 22/3/22 9:51, Mattias Gaertner via fpc-pascal wrote:

Is this paranoid or useful?
-O- -O1

Good point. My script have many years and I don't remember why I used 
this options or if I gathered them from someone else, but reviewing it 
now, it does not seems logical. I suppose -O1 overwrite -O-, so specify 
-O- is completely useless.


--
Victor Campillo

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Karoly Balogh via fpc-pascal
Hi,

On Tue, 22 Mar 2022, Marco van de Voort via fpc-pascal wrote:

>
> On 21-3-2022 22:45, Karoly Balogh via fpc-pascal wrote:
> > Hi,
> > I can reproduce this, or something very similar for the clean/distclean
> > targets, if I have no FPC installed on my machine, but I specify PP= as a
> > Makefile argument to a "bootstrap" compiler binary, and I use OS_TARGET=
> > as well, for crosscompiling.
>
> Try the same, but use FPC= instead of PP= . Let it point to the ppc binary.

It makes no difference.

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Marco van de Voort via fpc-pascal



On 21-3-2022 22:45, Karoly Balogh via fpc-pascal wrote:

Hi,
I can reproduce this, or something very similar for the clean/distclean
targets, if I have no FPC installed on my machine, but I specify PP= as a
Makefile argument to a "bootstrap" compiler binary, and I use OS_TARGET=
as well, for crosscompiling.


Try the same, but use FPC= instead of PP= . Let it point to the ppc binary.


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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Mattias Gaertner via fpc-pascal
On Tue, 22 Mar 2022 09:31:19 +0100
Victor Campillo via fpc-pascal  wrote:

>[...]
> OPT="-O- -O1 -gl" 

Is this paranoid or useful?
-O- -O1

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-22 Thread Victor Campillo via fpc-pascal

Hi,

Thank you very much to everyone for the quick answers.

If I specify the option PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64 to the 
command "make -j 9 clean all", the it works as expected. Probably until 
now, it worked just by pure lucky.


But just to make sure my script to build FPC is safer, is this is ok?

make -j 9 clean PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64

make -j 9 all install FPMAKEOPT="-T 9" 
INSTALL_PREFIX=.../fpclazarus/fpc/cmp/3.3.1 OPT="-O- -O1 -gl" 
PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64


It works, but I want to make sure that this is the right way to build FPC.

P.D. :Thank you very much to the FPC team for this great project.

Best Regards.

Victor Campillo

On 21/3/22 22:45, Karoly Balogh via fpc-pascal wrote:

Hi,

On Mon, 21 Mar 2022, Michael Van Canneyt via fpc-pascal wrote:


For years I have been using the same script to compile FPC, I have multiple
version of FPC installed in the same machine, mainly my script do:

make -j 9 clean all

make -j 9 all install FPMAKEOPT="-T 9"
INSTALL_PREFIX=.../fpclazarus/fpc/cmp/3.3.1 OPT="-O- -O1 -gl"
PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64

I have been a few months without compiling FPC trunk, but when I tried it
today, I got the next message after calling "make -j 9 clean all"


make: -iVSPTPSOTO: Command not found

This indicates that the PP variable is not valid ?

I run make clean all almost daily, I have not seen what you report here.

I can reproduce this, or something very similar for the clean/distclean
targets, if I have no FPC installed on my machine, but I specify PP= as a
Makefile argument to a "bootstrap" compiler binary, and I use OS_TARGET=
as well, for crosscompiling.

For example, if I try this on Linux/x86_64:
make clean OS_TARGET=aros PP=/path/to/bootstrap/ppcx86-3.2.2

I get a lot of messages like:

ake -C compiler distclean
make[1]: Entering directory '/home/charlie/Develop/fpc/source/compiler'
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
/bin/rm -f ppcrossx64 ppc ppc1 ppc2 ppc3 ./msg2inc pp1.wpo pp2.wpo

So there's definitely something fishy with the bootstrap/PP compiler use,
if the build box has no FPC installed otherwise. Which to my
understanding, it shouldn't be needed, if PP is specified?

Interestingly, if I don't specify OS_TARGET, the problem doesn't occur.

Note that for a real build ("all" or "crossall" target), the specified PP
compiler still gets used as expected.

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

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Karoly Balogh via fpc-pascal
Hi,

On Mon, 21 Mar 2022, Michael Van Canneyt via fpc-pascal wrote:

> > For years I have been using the same script to compile FPC, I have multiple
> > version of FPC installed in the same machine, mainly my script do:
> >
> > make -j 9 clean all
> >
> > make -j 9 all install FPMAKEOPT="-T 9"
> > INSTALL_PREFIX=.../fpclazarus/fpc/cmp/3.3.1 OPT="-O- -O1 -gl"
> > PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64
> >
> > I have been a few months without compiling FPC trunk, but when I tried it
> > today, I got the next message after calling "make -j 9 clean all"
> >
> > > make: -iVSPTPSOTO: Command not found
>
> This indicates that the PP variable is not valid ?
>
> I run make clean all almost daily, I have not seen what you report here.

I can reproduce this, or something very similar for the clean/distclean
targets, if I have no FPC installed on my machine, but I specify PP= as a
Makefile argument to a "bootstrap" compiler binary, and I use OS_TARGET=
as well, for crosscompiling.

For example, if I try this on Linux/x86_64:
make clean OS_TARGET=aros PP=/path/to/bootstrap/ppcx86-3.2.2

I get a lot of messages like:

ake -C compiler distclean
make[1]: Entering directory '/home/charlie/Develop/fpc/source/compiler'
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
make[1]: -iTP: Command not found
/bin/rm -f ppcrossx64 ppc ppc1 ppc2 ppc3 ./msg2inc pp1.wpo pp2.wpo

So there's definitely something fishy with the bootstrap/PP compiler use,
if the build box has no FPC installed otherwise. Which to my
understanding, it shouldn't be needed, if PP is specified?

Interestingly, if I don't specify OS_TARGET, the problem doesn't occur.

Note that for a real build ("all" or "crossall" target), the specified PP
compiler still gets used as expected.

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Jonas Maebe via fpc-pascal

On 21/03/2022 22:17, Victor Campillo via fpc-pascal wrote:

make: -iVSPTPSOTO: Command not found
Makefile:235: *** The Makefile doesn't support target -, please run 
fpcmake first.  Stop.


I just run fpcmake before call "make clean all" and "make -j 9 all 
install", and everything works as expected.


I forgot to reply to this: as Michael mentioned, this does not mean 
fpcmake needs to be run. Even after running fpcmake, the target "-" 
would still not be supported.


The issue is probably that the ppc or fpc binary in the compiler 
subdirectory was in your path, and then got deleted by "make clean" 
while in parallel "make all" tried to use it for compilation.



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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Marco van de Voort via fpc-pascal


On 21-3-2022 22:17, Victor Campillo via fpc-pascal wrote:



make: -iVSPTPSOTO: Command not found
Makefile:235: *** The Makefile doesn't support target -, please run 
fpcmake first.  Stop.


Binary "fpc" not found. Maybe a different account or something else 
changed in your $PATH ?



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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Michael Van Canneyt via fpc-pascal




On Mon, 21 Mar 2022, Victor Campillo via fpc-pascal wrote:


Hi,

For years I have been using the same script to compile FPC, I have 
multiple version of FPC installed in the same machine, mainly my script do:


make -j 9 clean all

make -j 9 all install FPMAKEOPT="-T 9" 
INSTALL_PREFIX=.../fpclazarus/fpc/cmp/3.3.1 OPT="-O- -O1 -gl" 
PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64


I have been a few months without compiling FPC trunk, but when I tried 
it today, I got the next message after calling "make -j 9 clean all"



make: -iVSPTPSOTO: Command not found


This indicates that the PP variable is not valid ?

I run make clean all almost daily, I have not seen what you report here.

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


Re: [fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Jonas Maebe via fpc-pascal

On 21/03/2022 22:17, Victor Campillo via fpc-pascal wrote:
For years I have been using the same script to compile FPC, I have 
multiple version of FPC installed in the same machine, mainly my script do:


make -j 9 clean all


This is wrong. You cannot safely run "clean" and "all" in parallel. You 
have to run them separately.



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


[fpc-pascal] Just out of curiosity: Compiling FPC trunk and fpcmake

2022-03-21 Thread Victor Campillo via fpc-pascal

Hi,

For years I have been using the same script to compile FPC, I have 
multiple version of FPC installed in the same machine, mainly my script do:


make -j 9 clean all

make -j 9 all install FPMAKEOPT="-T 9" 
INSTALL_PREFIX=.../fpclazarus/fpc/cmp/3.3.1 OPT="-O- -O1 -gl" 
PP=.../fpclazarus/fpc/lib/3.2.2/ppcx64


I have been a few months without compiling FPC trunk, but when I tried 
it today, I got the next message after calling "make -j 9 clean all"



make: -iVSPTPSOTO: Command not found
Makefile:235: *** The Makefile doesn't support target -, please run 
fpcmake first.  Stop.


I just run fpcmake before call "make clean all" and "make -j 9 all 
install", and everything works as expected.


My question is, until now I have never needed to call fpcmake before 
compiling trunk, it is a requirement now to execute fpcmake or there is 
something wrong in my side?


My system is Xubuntu Linux x86_64.

Thanks.

Best Regards.

--
Victor Campillo

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