bugGNU Common Lisp - Bugs: bug #43772, Crosscompiling does not work

 
 

bug #43772: Crosscompiling does not work

Submitted by:  None
Submitted on:  Sun 07 Dec 2014 03:25:55 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 10 Dec 2014 05:30:22 PM UTC, comment #2:

Hi,

I do not know much about autoconf/automake, but why is the checking done instead of just using sizeof()?

So for the first problem: checking sizeof jmp_buf

You compile and (try to) run at test program, which writes the result of
sizeof(jmp_buf)
in a file (conftest1), then it reads that file and generates a

#define SIZEOF_JMP_BUF <value read from conftest1>
in the file "h/gclincl.h"

That value is then used in "h/frame.h":
char frs_jmpbuf[SIZEOF_JMP_BUF] _attribute_ ((_aligned_ (OBJ_ALIGNMENT*2)));

But you could just define the valute of sizeof(jmp_buf):
#define SIZEOF_JMP_BUF sizeof(jmp_buf)

(you may need to #include <setjmp.h> - as in the test program)

Or just write

char frs_jmpbuf[sizeof(jmp_buf)] _attribute_ ((_aligned_ (OBJ_ALIGNMENT*2)));
in "h/frame.h".

Shouldn't that be easier?

Best regards, Wolfgang

Anonymous
Tue 09 Dec 2014 09:12:36 PM UTC, comment #1:

Greetings, and thanks for your report!

So what is the canonical way to determine runtime compiler constants, say, when cross compiling? We need variable sizes, heap/stack locations and limits, etc.

Camm Maguire <camm>
Project Administrator
Sun 07 Dec 2014 03:25:55 PM UTC, original submission:

The "configure"-script tries to run binaries for tests, which is not possible, if one tries to crosscompile gcl, e.g.:

./configure --host=i686-w64-mingw32
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-w64-mingw32
host=i686-w64-mingw32
[...]
checking sizeof jmp_buf... configure: error: in `/tmp/gcl':
configure: error: cannot run test program while cross compiling
See `config.log' for more details

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by camm (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1