[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small change to pkg.m?
From: |
Thomas Treichl |
Subject: |
Small change to pkg.m? |
Date: |
Mon, 29 Oct 2007 16:49:54 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
Hi,
I already reported that fort77 works fine to compile Octave and all it's
dependencies but I had another problem that I'd like to address here. I cannot
pass all my CFLAGS through the fort77 script (because there are some
Apple-specific flags that cannot be handled by the fort77 script and I don't
want to create my own script). Eg.
CFLAGS='-arch ppc <other opt flags> <-I and so on>'
where I get an error from fort77 'rch is not valid' or something like that
because it misinterprets '-a' instead of '-arch'. Quoting and all these -Wc,
things and so on didn't help but my workaround was to move all architecture
dependent flags and all optimization flags directly to CC before calling
./configure. So my CC and CFLAGS now look like
CFLAGS='<-I and so on>'
CC='gcc -arch ppc <other opt flags>'
<...hours later after Octave.app is running> I'm trying to install any of the
packages from OF that need to call ./configure before installation - it fails
because of these lines in pkg.m (1023ff)
[status, output] = shell (strcat ("cd ", src, "; ./configure --prefix=\"",
desc.dir, "\"",
" CC=", octave_config_info ("CC"),
" CXX=", octave_config_info ("CXX"),
" AR=", octave_config_info ("AR"),
" RANLIB=", octave_config_info ("RANLIB")));
that do not allow spaces in CC and CXX. So I decided to change these lines in a
first step into this
[status, output] = shell (strcat ("cd ", src, "; ./configure --prefix=\"",
desc.dir, "\"",
" CC=\"", octave_config_info ("CC"), "\"",
" CXX=\"", octave_config_info ("CXX"), "\"",
" AR=\"", octave_config_info ("AR"), "\"",
" RANLIB=\"", octave_config_info ("RANLIB"), "\""));
This already worked but then I thought about it and found out that I modify the
CC flags in my local mkoctfile-2.9.15 file before building Octave.app (remove
the archictecture flags and other things that are not wanted because a PPC
machine does know that it is a PPC and the same for i386). My output in
Octave.app then looks like
octave-2.9.15:1> mkoctfile ("-p", "CC")
gcc <other opt flags>
octave-2.9.15:2> octave_config_info ("CC")
gcc -arch ppc <other opt flags>
So a better solution I was thinking about would be
[status, output] = shell (strcat ("cd ", src, "; ./configure --prefix=\"",
desc.dir, "\"",
" CC=\"", mkoctfile ("-p", "CC"), "\"",
" CXX=\"", mkoctfile ("-p", "CXX"), "\"",
" AR=\"", octave_config_info ("AR"), "\"",
" RANLIB=\"", octave_config_info ("RANLIB"), "\""));
Don't know if this is wanted or if this does break any other platform and that's
why I didn't sent a patch for this?
Thomas
- Small change to pkg.m?,
Thomas Treichl <=