Do --enable-single-host and --enable-gcc-opts affect the compilation of the compiler, or the compiler in itself? IE if I compile using both options and package a binary, will hosts with low amount of ram that install my binary have difficulty using them?
/Joel
Afficher les réponses par date
On 29-Feb-08, at 5:24 AM, Joel Borggrén-Franck wrote:
Do --enable-single-host and --enable-gcc-opts affect the compilation of the compiler, or the compiler in itself? IE if I compile using both options and package a binary, will hosts with low amount of ram that install my binary have difficulty using them?
Yes.
If you want different options to be used for generating object files on the target platform you need to change the file bin/gsc-cc-o.bat . Either you do this manually, or you do a "./configure;make" with none of the configure options and copy the file bin/gsc-cc-o.bat in a safe place before doing the "./configure --enable-single-host --enable-gcc- opts;make".
Marc
Hallo,
On Fri, Feb 29, 2008 at 10:29 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
If you want different options to be used for generating object files on the target platform you need to change the file bin/gsc-cc-o.bat . Either you do this manually, or you do a "./configure;make" with none of the configure options and copy the file bin/gsc-cc-o.bat in a safe place before doing the "./configure --enable-single-host --enable-gcc- opts;make".
So the output of gsc will be the same whether it was compiled with these options or not? The only thing it changes is the compilation by GCC, right? Besides, if I have a program foo which was compiled using these switches, will it use more RAM during runtime than a version of foo that was compiled without them?
Cheers,
On Fri, Feb 29, 2008 at 2:36 PM, Alex Queiroz asandroq@gmail.com wrote:
So the output of gsc will be the same whether it was compiled
with these options or not? The only thing it changes is the compilation by GCC, right?
From the wiki:
"--enable-single-host compile each Scheme module as a single C function"
to me this implies that the difference is in how gsc generates c-code from scheme.
Besides, if I have a program foo which was compiled using these
switches, will it use more RAM during runtime than a version of foo that was compiled without them?
If I understand this correctly executing foo will not require more memory and it will be faster, but making the executable "foo" from the scheme file "foo.scm", IE "gsc foo.scm" and "gcc foo.c" will require more memory, and will also be slower.
But there is the possibility that I confuse things :) please correct me if I'm wrong.
/Joel
On Feb 29, 2008, at 8:51 AM, Joel Borggrén-Franck wrote:
On Fri, Feb 29, 2008 at 2:36 PM, Alex Queiroz asandroq@gmail.com wrote:
So the output of gsc will be the same whether it was compiled
with these options or not? The only thing it changes is the compilation by GCC, right?
From the wiki:
"--enable-single-host compile each Scheme module as a single C function"
to me this implies that the difference is in how gsc generates c-code from scheme.
The C code that gsc generates is the same either way; if you look at the .c file then you'll see that it's all C macros. These C macros are expanded differently depending on whether ___SINGLE_HOST is defined when gcc compiles the .c file (which, in turn, is determined by --enable-single-host).
To see the difference in macro expansion, add -save-temps to the compile line in gsc-cc-o and look at the .i file.
Brad