[fpc-devel] Problem with fpcmake when doing crossbuild

2013-05-28 Thread Michael Ring
I was having troubles today installing ppcrossarm from trunk, I have a 
workarround for the problem but I question myself how to really fix the 
problem:


SUBARCH=armv7m
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=$SUBARCH CROSSOPT=-godwarfsets -gw2 -O- 
BINUTILSPREFIX=arm-none-eabi-


works fine. But then installation goes wrong because fpcmake was not 
build, but it is needed for installation (Question is why it is 
necessary to invoke fpcmake at all;-)).


I can fix this by adding:

make  -C utils/fpcm bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc' 
OS_TARGET=darwin CPU_TARGET=i386


to my buildscript, but my guess is that this should better be added to 
the buildbase rule, there's an entry for that in the build rule


*ifdef CROSSCOMPILE
$(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)
endif*

I have added this rule to my makefile, seems to work. I have no idea if 
I break anything by adding this to the makefile


fpcmake is now created in directory utils/fpcm/fpcmake

Now installation nearly works, last problem is that FPCMAKE path gets 
defined wrong as:


make -C embedded all
/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p 
-Tarm-embedded Makefile.fpc
make[2]: /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: No 
such file or directory



I can fix this by defining FPCMAKENEW to the real position of fpcmake 
after the build:


sudo  make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=$SUBARCH CROSSOPT=-godwarfsets -gw2 -O- 
BINUTILSPREFIX=arm-none-eabi- 
FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmake


At this point I ask myself if this error exists because I did something 
wrong building fpcmake.


Any ideas?

TnX,

Michael







___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem with fpcmake when doing crossbuild

2013-05-28 Thread Michael Ring

In case my guesswork was right this would be the fix to Makefile.fpc:

Index: Makefile.fpc
===
--- Makefile.fpc(revision 24625)
+++ Makefile.fpc(working copy)
@@ -169,8 +169,12 @@

 # Always use newly created fpcmake
 ifndef FPCMAKENEW
+ifdef CROSSINSTALL
+FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT)
+else
 FPCMAKENEW=$(BASEDIR)/utils/fpcm/bin/$(SOURCESUFFIX)/fpcmake$(SRCEXEEXT)
 endif
+endif

 # Build/install options
 CLEANOPTS=FPC=$(PPNEW)
@@ -316,6 +320,11 @@
 base.$(BUILDSTAMP):
 # create new compiler
 $(MAKE) compiler_cycle RELEASE=1
+ifdef CROSSCOMPILE
+# Buld a new native fpcmake when cross-compiling.
+# Fresh native compiler and RTL are ready at this stage.
+$(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)
+endif
 # clean
 $(MAKE) rtl_clean $(CLEANOPTS)
 # build everything


Am 28.05.13 10:59, schrieb Michael Ring:
I was having troubles today installing ppcrossarm from trunk, I have a 
workarround for the problem but I question myself how to really fix 
the problem:


SUBARCH=armv7m
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm 
SUBARCH=$SUBARCH CROSSOPT=-godwarfsets -gw2 -O- 
BINUTILSPREFIX=arm-none-eabi-


works fine. But then installation goes wrong because fpcmake was not 
build, but it is needed for installation (Question is why it is 
necessary to invoke fpcmake at all;-)).


I can fix this by adding:

make  -C utils/fpcm bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc' 
OS_TARGET=darwin CPU_TARGET=i386


to my buildscript, but my guess is that this should better be added to 
the buildbase rule, there's an entry for that in the build rule


*ifdef CROSSCOMPILE
$(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)
endif*

I have added this rule to my makefile, seems to work. I have no idea 
if I break anything by adding this to the makefile


fpcmake is now created in directory utils/fpcm/fpcmake

Now installation nearly works, last problem is that FPCMAKE path gets 
defined wrong as:


make -C embedded all
/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p 
-Tarm-embedded Makefile.fpc
make[2]: /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: No 
such file or directory



I can fix this by defining FPCMAKENEW to the real position of fpcmake 
after the build:


sudo  make installbase CROSSINSTALL=1 OS_TARGET=embedded 
CPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT=-godwarfsets -gw2 -O- 
BINUTILSPREFIX=arm-none-eabi- 
FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmake


At this point I ask myself if this error exists because I did 
something wrong building fpcmake.


Any ideas?

TnX,

Michael









___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem with fpcmake when doing crossbuild

2013-05-28 Thread Yury Sidorov

Fixed in r24626. Your guesswork is right :)

Yury.

- Original Message - 
From: Michael Ring

To: fpc-devel@lists.freepascal.org
Sent: Tuesday, May 28, 2013 1:24 PM
Subject: Re: [fpc-devel] Problem with fpcmake when doing crossbuild


In case my guesswork was right this would be the fix to Makefile.fpc:

Index: Makefile.fpc
===
--- Makefile.fpc(revision 24625)
+++ Makefile.fpc(working copy)
@@ -169,8 +169,12 @@

# Always use newly created fpcmake
ifndef FPCMAKENEW
+ifdef CROSSINSTALL
+FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT)
+else
FPCMAKENEW=$(BASEDIR)/utils/fpcm/bin/$(SOURCESUFFIX)/fpcmake$(SRCEXEEXT) endif+endif # 
Build/install options CLEANOPTS=FPC=$(PPNEW)@@ -316,6 +320,11 @@ base.$(BUILDSTAMP): # create new 
compiler $(MAKE) compiler_cycle RELEASE=1+ifdef CROSSCOMPILE+# Buld a new native fpcmake 
when cross-compiling.+# Fresh native compiler and RTL are ready at this stage.+$(MAKE) -C 
utils/fpcm bootstrap $(BUILDOPTS)+endif # clean $(MAKE) rtl_clean $(CLEANOPTS) # build 
everythingAm 28.05.13 10:59, schrieb Michael Ring:I was having troubles today installing ppcrossarm 
from trunk, I have aworkarround for the problem but I question myself how to really fixthe 
problem:SUBARCH=armv7mmake clean buildbase CROSSINSTALL=1 OS_TARGET=embedded 
CPU_TARGET=armSUBARCH=$SUBARCH CROSSOPT=-godwarfsets -gw2 
-O-BINUTILSPREFIX=arm-none-eabi-works fine. But then installation goes wrong because fpcmake 
was notbuild, but it is needed for installation (Question is why it isnecessary to invoke fpcmake 
at all;-)).I can fix this by adding:make  -C utils/fpcm bootstrap 
'FPC=/Users/ring/devel/fpc/compiler/ppc'OS_TARGET=darwin CPU_TARGET=i386to my buildscript, but my 
guess is that this should better be added tothe buildbase rule, there's an entry for that in the 
build ruleifdef CROSSCOMPILE$(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)endifI have added 
this rule to my makefile, seems to work. I have no ideaif I break anything by adding this to the 
makefilefpcmake is now created in directory utils/fpcm/fpcmakeNow installation nearly works, last 
problem is that FPCMAKE path getsdefined wrong as:make -C embedded 
all/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p -Tarm-embedded Makefile.fpcmake[2]: 
/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: Nosuch file or directoryI can fix this by 
defining FPCMAKENEW to the real position of fpcmakeafter the build:sudo  make installbase 
CROSSINSTALL=1 OS_TARGET=embeddedCPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT=-godwarfsets -gw2 
-O-BINUTILSPREFIX=arm-none-eabi-FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmakeAt this 
point I ask myself if this error exists because I didsomething wrong building fpcmake.Any 
ideas?TnX,Michael___fpc-devel maillist  -  
fpc-devel@lists.freepascal.orghttp://lists.freepascal.org/mailman/listinfo/fpc-devel___fpc-devel
 maillist  -  fpc-devel@lists.freepascal.orghttp://lists.freepascal.org/mailman/listinfo/fpc-devel
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Problem with fpcmake when doing crossbuild

2013-05-28 Thread Michael Ring

Thank you!

Michael

Am 28.05.13 14:56, schrieb Yury Sidorov:

Fixed in r24626. Your guesswork is right :)

Yury.

- Original Message - From: Michael Ring
To: fpc-devel@lists.freepascal.org
Sent: Tuesday, May 28, 2013 1:24 PM
Subject: Re: [fpc-devel] Problem with fpcmake when doing crossbuild


In case my guesswork was right this would be the fix to Makefile.fpc:

Index: Makefile.fpc
===
--- Makefile.fpc(revision 24625)
+++ Makefile.fpc(working copy)
@@ -169,8 +169,12 @@

# Always use newly created fpcmake
ifndef FPCMAKENEW
+ifdef CROSSINSTALL
+FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT)
+else
FPCMAKENEW=$(BASEDIR)/utils/fpcm/bin/$(SOURCESUFFIX)/fpcmake$(SRCEXEEXT) 
endif+endif # Build/install options CLEANOPTS=FPC=$(PPNEW)@@ -316,6 
+320,11 @@ base.$(BUILDSTAMP): # create new compiler $(MAKE) 
compiler_cycle RELEASE=1+ifdef CROSSCOMPILE+# Buld a new native 
fpcmake when cross-compiling.+# Fresh native compiler and RTL are 
ready at this stage.+ $(MAKE) -C utils/fpcm bootstrap 
$(BUILDOPTS)+endif # clean $(MAKE) rtl_clean $(CLEANOPTS) # build 
everythingAm 28.05.13 10:59, schrieb Michael Ring:I was having 
troubles today installing ppcrossarm from trunk, I have aworkarround 
for the problem but I question myself how to really fixthe 
problem:SUBARCH=armv7mmake clean buildbase CROSSINSTALL=1 
OS_TARGET=embedded CPU_TARGET=armSUBARCH=$SUBARCH 
CROSSOPT=-godwarfsets -gw2 -O-BINUTILSPREFIX=arm-none-eabi-works 
fine. But then installation goes wrong because fpcmake was notbuild, 
but it is needed for installation (Question is why it isnecessary to 
invoke fpcmake at all;-)).I can fix this by adding:make  -C utils/fpcm 
bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc'OS_TARGET=darwin 
CPU_TARGET=i386to my buildscript, but my guess is that this should 
better be added tothe buildbase rule, there's an entry for that in the 
build ruleifdef CROSSCOMPILE$(MAKE) -C utils/fpcm bootstrap 
$(BUILDOPTS)endifI have added this rule to my makefile, seems to work. 
I have no ideaif I break anything by adding this to the 
makefilefpcmake is now created in directory utils/fpcm/fpcmakeNow 
installation nearly works, last problem is that FPCMAKE path 
getsdefined wrong as:make -C embedded 
all/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p 
-Tarm-embedded Makefile.fpcmake[2]: 
/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: Nosuch file 
or directoryI can fix this by defining FPCMAKENEW to the real position 
of fpcmakeafter the build:sudo  make installbase CROSSINSTALL=1 
OS_TARGET=embeddedCPU_TARGET=arm SUBARCH=$SUBARCH 
CROSSOPT=-godwarfsets -gw2 
-O-BINUTILSPREFIX=arm-none-eabi-FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmakeAt 
this point I ask myself if this error exists because I didsomething 
wrong building fpcmake.Any 
ideas?TnX,Michael___fpc-devel 
maillist  - 
fpc-devel@lists.freepascal.orghttp://lists.freepascal.org/mailman/listinfo/fpc-devel___fpc-devel 
maillist  - 
fpc-devel@lists.freepascal.orghttp://lists.freepascal.org/mailman/listinfo/fpc-devel

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Some Opcodes missing in internal assembler for mips32r2

2013-05-28 Thread Michael Ring
I am currently writing/porting startup code for the pic32 chips, the 
inline assembler of fpc seems to lack support for some opcodes, any idea 
how I can workarround this?


With grep I found for example mtc1 in opcode.inc, but mtc0 is missing, 
this opcode is important for the initialization of the pic32 chips.


Is it easy to implement those missing op-codes in the internal 
assembler, if yes, could some fpc-crack give me a hint on what to change 
where?


Those are the missing opcodes:

beqz
ehb
ext
ins
mfc0
mtc0
sdbbp
wrpgpr


Thank you in advance,

Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Crash while compiling fpc 2.7.1 on ARM

2013-05-28 Thread Michel Catudal
My platform is odroid U2 with funtoo Linux, desktop is mate. Processor is a 4 
core arm processor from Samsung, running at 1.7Ghz with 2G of RAM, OS runs on a 
32G SD Card. I also have an Ubuntu system also on a 32G SD card, haven't tested 
fpc compile on it yet.

A few weeks ago I was able to compile fpc with hard float support on odroid U2. 
I still have it along with lazarus. I have created a few graphic programs, they 
work like a champ so far, no crash.

For the past few weeks fpc no longer compiles. It works until it is time to 
compile the RTL.

Here is part of the log :


/bin/mv -f ppcarm ppc1
make 
'FPC=/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compiler/ppc1' 
'OLDFPC=' next CYC
make[3] : on entre dans le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/com
make rtlclean rtl
make[4] : on entre dans le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/com
make -C /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl clean
make[5] : on entre dans le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl
/bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res
/bin/rm -f *.s *_ppas.sh
make -C linux clean
make[6] : on entre dans le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl
/bin/rm -f 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/prt0.o
 /var/
/bin/rm -f 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/system.ppu
 /
/bin/rm -f 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/system.o
 /va
/bin/rm -f 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/math.rst
 /va
/bin/rm -f fpcmade.arm-linux Package.fpc ./ppas.sh script.res link.res 
/bin/rm -f *.s *_ppas.sh
make[6] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/lin
make[5] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl »
make -C /var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl 
'OPT=-dFPC_ARMHF  ' all
make[5] : on entre dans le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl
make -C linux all
make[6] : on entre dans le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl
as  -o 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/prt0.o
 arm/prt0.
as   -o 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/dllprt0.o
 arm/d
as  -o 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/cprt0.o
 arm/cprt
as  -o 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/gprt0.o
 arm/gprt
as  -o 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/units/arm-linux/ucprt0.o
 arm/ucp
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compiler/ppc1 -Ur 
-Ur -O2 -n -Fi../inc -Fi.
text.inc(2082,14) Warning: Implicit string type conversion from AnsiString to 
UnicodeString
text.inc(2301,53) Warning: Implicit string type conversion with potential data 
loss from UnicodeString
An unhandled exception occurred at $923C:
EAccessViolation: Access violation
  $923C

An unhandled exception occurred at $923C:
EAccessViolation: Access violation
  $923C

make[6]: *** [system.ppu] Erreur 217
make[6] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl/lin
make[5]: *** [linux_all] Erreur 2
make[5] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/rtl »
make[4]: *** [rtl] Erreur 2
make[4] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile
make[3]: *** [next] Erreur 2
make[3] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile
make[2]: *** [ppc2] Erreur 2
make[2] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile
make[1]: *** [cycle] Erreur 2
make[1] : on quitte le répertoire « 
/var/tmp/portage/dev-lang/fpc-2.7.1-r2/work/fpcbuild/fpcsrc/compile
make: *** [compiler_cycle] Erreur 2
 [[31;01m*[[0m ERROR: dev-lang/fpc-2.7.1-r2 failed (compile phase):
 [[31;01m*[[0m   emake failed


This is done using the snapshot from today may 28th ==

HOMEPAGE=http://www.freepascal.org/;
DESCRIPTION=Free Pascal Compiler
SRC_URI=ftp://ftp.freepascal.org/pub/fpc/snapshot/trunk/source/fpcbuild.zip;


Michel Catudal

-- 
For Linux Software visit
http://home.comcast.net/~mcatudal

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Crash while compiling fpc 2.7.1 on ARM

2013-05-28 Thread Paul Ishenin

29.05.2013 10:09, Michel Catudal пишет:

My platform is odroid U2 with funtoo Linux, desktop is mate. Processor is a 4 
core arm processor from Samsung, running at 1.7Ghz with 2G of RAM, OS runs on a 
32G SD Card. I also have an Ubuntu system also on a 32G SD card, haven't tested 
fpc compile on it yet.

A few weeks ago I was able to compile fpc with hard float support on odroid U2. 
I still have it along with lazarus. I have created a few graphic programs, they 
work like a champ so far, no crash.

For the past few weeks fpc no longer compiles. It works until it is time to 
compile the RTL.


What starting compiler do you use?

Best regards,
Paul Ishenin


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel