Many thanks to dkl here... it is possible. I don't have the exact steps right now but generally --
First, I compiled (in an Ubuntu 32-bit VM) the 64-bit version of FB, which should be arriving soon I guess.
Then I compiled and got the c file via:
Code: Select all
fbc -v -R -Wl -rpath-link=. -arch 64 [filename]
Then I compiled with gcc under centos. With a filename tp.c/.o/.asm/.bas:
Code: Select all
gcc -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables "tp.c" -o "tp.asm"
as --64 --strip-local-absolute "tp.asm" -o "tp.o"
ld -m elf_x86_64 -o "tp" -dynamic-linker /lib64/ld-linux-x86-64.so.2 "/usr/local/bin/../lib/freebasic/x86_64-linux/fbextra.x" -s -L "/usr/local/bin/../lib/freebasic/x86_64-linux" -L "." -L "/usr/lib/gcc/i686-linux-gnu/4.6/64" "/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib64/crt1.o" "/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib64/crti.o" "/usr/lib/gcc/i686-linux-gnu/4.6/64/crtbegin.o" "/usr/local/bin/../lib/freebasic/x86_64-linux/fbrt0.o" "tp.o" "-(" -lmysqlclient -lfb -ltinfo -lm -ldl -lsupc++ -lpthread -lgcc -lgcc_eh -lc "-)" "/usr/lib/gcc/i686-linux-gnu/4.6/64/crtend.o" "/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib64/crtn.o" -rpath-link=.