Results 1 to 4 of 4

Thread: Cross Compile Linux to FreeBSD

  1. #1

    Cross Compile Linux to FreeBSD

    Hi people

    this is a trickyl question. I have a nice little cgi application that wrosk fine under both windows and linux (I have both of thse opertating systems) but it appears not to work under FreeBSD :cry:

    I do know it is possibleto use Free Pascal to cross compile (using the -T option) but Iwas wondering if anyone has got this to work under linux :?: If so what do I need to do.

    Any ideas?

    Dean
    PS - As a side note I'm trying to install FreeBSD under qemu so I have a virtual pc with free bsd on it, but i'd rather just compile under linux if possible.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  2. #2

    Cross Compile Linux to FreeBSD

    Ok , the good news is I now have a FreeBSD image which has Free Pascal on it . And the compiled cgi app worked fine on my web server.

    To asnwer my own question, I downloaded the freebsd units and placed those in my free pascal units directory under i386-freebad. then you can compile using fpc <project> -Tfreebsd.

    It can't actually produce the exe as the link stage fails but it does compile all the units, so you know if you unit will compile user freebsd as well as win32, I assume you can do the same for linux aswell.

    Of course this doesn't mean you application will run under freebsd without testing but it goes along way to knowing if your code is portable
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  3. #3

    Cross Compile Linux to FreeBSD

    Try a dedicated IRC channel and ask the developers. They mostly know a lot.
    Marmin^.Style

  4. #4

    Cross Compile Linux to FreeBSD

    Quote Originally Posted by technomage
    Ok , the good news is I now have a FreeBSD image which has Free Pascal on it . And the compiled cgi app worked fine on my web server.

    To asnwer my own question, I downloaded the freebsd units and placed those in my free pascal units directory under i386-freebad. then you can compile using fpc <project> -Tfreebsd.
    See also www.stack.nl/~marcov/buildfaq.pdf for lots of background info.

    Make sure you have installed linux->freebsd crossbinutiils (an mostly correct script for that in install/ directory of the "fpcbuild" svn module) make sure they are renamed i386-freebsd-as and i386-freebsd-ld and i386-freebsd-ar and compile with -XPi386-freebsd- -TFreeBSD to generate bins.

    [quote]
    It can't actually produce the exe as the ]

    To windows or to linux/freebsd without using shared libs is easiest. To linux/freebsd while using shared libs is harder.

    To OS X requires more to set up, but is easier because there are fewer variants of the core libraries (about 3 in supported OS X versions 10.2-10.4)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL