Revision history for DevBootstrap


Revision [20781]

Last edited on 2016-03-12 12:48:05 by fxm [Formatting]

No Differences

Revision [19851]

Edited on 2016-01-24 09:41:50 by DkLwikki [Fix list formatting]
Additions:
%%fbc -e -m fbc src/compiler/*.bas -r -target <mytargetos> -arch <mytargetarch>
%%make rtlib gfxlib2%%
%%for i in src/compiler/*.asm; do
%%gcc -o fbc -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -fno-strict-aliasing -frounding-math lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.c -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread%%
%%# Get a directory with the fbc sources, e.g. "fbc"
%%cd ..
Deletions:
%%fbc -e -m fbc src/compiler/*.bas -r -target <mytargetos> -arch <mytargetarch>
%%make rtlib gfxlib2%%

%%for i in src/compiler/*.asm; do
%%gcc -o fbc -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -fno-strict-aliasing -frounding-math lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.c -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread%%
%%# Get a directory with the fbc sources, e.g. "fbc"
%%cd ..


Revision [17599]

Edited on 2015-04-11 16:39:49 by DkLwikki [Mention FB-source-bootstrap package]
Additions:
{{fbdoc item="section" value="Bootstrapping using the FreeBASIC-x.xx.x-source-bootstrap package (if available)"}}
The ""FreeBASIC-x.xx.x-source-bootstrap"" package contains the FB sources plus precompiled compiler sources, for multiple targets. After extracting, this can be built without requiring an existing fbc:
%%make bootstrap%%
(as long as the package contains the precompiled sources for the target system)
This package can be created by running:
%%make bootstrap-dist%%
Doing ##make bootstrap-dist##, taking the package to the target system, and then doing ##make bootstrap## can replace the manual steps below, as long as the target is already supported by these commands in the FB makefile.


Revision [17444]

Edited on 2015-02-16 09:00:42 by DkLwikki [Swap steps 1 and 2]
Additions:
1) Take the ##.asm## or ##.c## files (produced in the first step) to the target system, and use the target system's native tools to build the final fbc executable:
Deletions:
1) Take the produced ##.asm## or ##.c## files to the target system, and use the target system's native tools to build the final fbc executable:


Revision [17443]

Edited on 2015-02-16 08:59:07 by DkLwikki [Add more gcc options as used by -gen gcc]
Additions:
%%gcc -o fbc -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -fno-strict-aliasing -frounding-math lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.c -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread%%
Deletions:
%%gcc -o fbc lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.c -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread%%


Revision [17442]

Edited on 2015-02-15 16:46:03 by DkLwikki [typo]
Additions:
1) Take the produced ##.asm## or ##.c## files to the target system, and use the target system's native tools to build the final fbc executable:
Deletions:
1) Take the produced ##.asm## or ##.c## files to the target system, and use the target system's native tools build the final fbc executable:


Revision [17297]

Edited on 2014-10-01 13:17:38 by DkLwikki [Typo]
Additions:
This does not only work with ##gcc -m64## on 32bit, but also with ##gcc -m32## on 64bit. For cross-compiling the 32bit FB on a 64bit system, just exchange 32 and 64 in the example above. For example, you have to specify ##MULTILIB=32## instead of ##MULTILIB=64##.
Deletions:
This does not only work for ##gcc -m64## on 32bit, but also ##gcc -m32## on 64bit. For cross-compiling the 32bit FB on a 64bit system, just exchange 32 and 64 in the example above. For example, you have to specify ##MULTILIB=32## instead of ##MULTILIB=64##.


Revision [17176]

Edited on 2014-08-21 11:13:41 by TjFwikki [Minor adaption in the code blocks]
Additions:
gcc -o fbc lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.o -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread%%
%%gcc -o fbc lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.c -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread%%
%%cd ..
mkdir crosscompiled-fbc && cd crosscompiled-fbc
make -f ../fbc/makefile FBC='../fbc/bin/fbc -i ../fbc/inc' TARGET=<gcc-target-id>
Deletions:
gcc -o fbc lib/freebasic/fbrt0.o src/compiler/*.o -Llib/freebasic -lfb -lncurses -pthread%%
%%gcc -o fbc lib/freebasic/fbrt0.o src/compiler/*.c -Llib/freebasic -lfb -lncurses -pthread%%
%%mkdir crosscompiled-fbc && cd crosscompiled-fbc
make ../fbc/makefile FBC='../fbc/bin/fbc -i ../fbc/inc' TARGET=<gcc-target-id>


Revision [17169]

Edited on 2014-08-20 11:31:34 by DkLwikki [Fix FBC=... example]
Additions:
make ../fbc/makefile FBC='../fbc/bin/fbc -i ../fbc/inc' TARGET=<gcc-target-id>
Deletions:
make ../fbc/makefile FBC=../fbc/bin/fbc TARGET=<gcc-target-id>


Revision [17168]

Edited on 2014-08-20 11:29:50 by DkLwikki [Explain cross-compiling 64bit FB via gcc -m64]
Additions:
make -f ../fbc/makefile MULTILIB=64 FBC='../fbc/bin/fbc -i ../fbc/inc'
Deletions:
make MULTILIB=64 FBC='../fbc/bin/fbc -i ../fbc/inc'


Revision [17167]

Edited on 2014-08-20 11:28:46 by DkLwikki [Explain cross-compiling 64bit FB via gcc -m64]
Additions:
If you have a gcc multilib toolchain with ""-m64"" support on a 32bit system, you can use it to cross-compile the 64bit version of FB. For example, on 32bit Ubuntu (GNU/Linux), you can install the ##gcc-multilib## package to install the ##gcc -m64## support. The ""Win32"" gcc toolchains from the ""MinGW-w64"" project also have support for cross-compiling to 64bit via ##gcc -m64##.
Deletions:
If you have a gcc multilib toolchain with ""-m64"" support on a 32bit system, you can use it to cross-compile the 64bit version of FB. For example, on Ubuntu (GNU/Linux) you can install the ##gcc-multilib## package to install the ##gcc -m64## support. The ""Win32"" gcc toolchains from the ""MinGW-w64"" project also have support for cross-compiling to 64bit via ##gcc -m64##.


Revision [17166]

Edited on 2014-08-20 11:26:59 by DkLwikki [Explain cross-compiling 64bit FB via gcc -m64]
Additions:
{{fbdoc item="section" value="Cross-compiling the 64bit version on a 32bit system with gcc -m64"}}
If you have a gcc multilib toolchain with ""-m64"" support on a 32bit system, you can use it to cross-compile the 64bit version of FB. For example, on Ubuntu (GNU/Linux) you can install the ##gcc-multilib## package to install the ##gcc -m64## support. The ""Win32"" gcc toolchains from the ""MinGW-w64"" project also have support for cross-compiling to 64bit via ##gcc -m64##.
# Get FB sources into fbc/ (must be 0.91+ because earlier versions didn't support multilib/64bit at all),
# and build a native (32bit) FB first
# Then add the 64bit rtlib/gfxlib2 to that. Specifying MULTILIB=64 tells the FB makefile to use gcc -m64.
make rtlib gfxlib2 MULTILIB=64
# Now we have a new 32bit FB with 64bit libraries for cross-compiling.
# This can now be used to build a full 64bit FB:
mkdir fbc64
cd fbc64
make MULTILIB=64 FBC='../fbc/bin/fbc -i ../fbc/inc'
This does not only work for ##gcc -m64## on 32bit, but also ##gcc -m32## on 64bit. For cross-compiling the 32bit FB on a 64bit system, just exchange 32 and 64 in the example above. For example, you have to specify ##MULTILIB=32## instead of ##MULTILIB=64##.


Revision [17149]

Edited on 2014-08-07 02:51:45 by DkLwikki [Add back links]
Additions:
{{fbdoc item="back" value="DevToc|FreeBASIC Developer Information"}}
{{fbdoc item="back" value="DocToc|Table of Contents"}}


Revision [17148]

Edited on 2014-08-07 02:50:53 by DkLwikki [Fix formatting]

No Differences

Revision [17147]

Edited on 2014-08-05 10:28:23 by DkLwikki [Fix mkdir/cds]
Additions:
cd ..
%%mkdir crosscompiled-fbc && cd crosscompiled-fbc
Deletions:
%%mkdir crosscompiled-fbc


Revision [17146]

The oldest known version of this page was created on 2014-08-05 10:23:39 by DkLwikki [Fix mkdir/cds]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode