mkoctfile and compiler options

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

mkoctfile and compiler options

john.2.tomlinson
mkoctfile and compiler options

All

Is there anyway I can stop mkoctfile from using the -O2 optimiser flag?

I have tried re-building octave without the flag set in the CFLAGS environment variable. I have tried setting CFLAGS. Still mkoctfile insists on inserting the -O2 flag

octave:3> mkoctfile -p CFLAGS
-ggdb
octave:4> mkoctfile -v fred.cpp
g++ -c -fPIC -I/usr/local/include/octave-3.0.2 -I/usr/local/include/octave-3.0.2/octave -I/usr/local/include -mieee-fp -g -O2 fred.cpp -o fred.o

g++ -shared -Wl,-Bsymbolic -o fred.oct fred.o -L/usr/local/lib/octave-3.0.2 -L/usr/local/lib -loctinterp -loctave -lcruft -lfftw3 -lreadline -lncurses -ldl -lz -lm -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3 -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/lib -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../.. -lz -lfrtbegin -lg2c -lm


John Tomlinson
Wireless Networks
BT Design.
Ipswich, UK


_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile and compiler options

Thomas Weber-8
Am Mittwoch, den 03.09.2008, 13:57 +0100 schrieb
[hidden email]:
> All
>
> Is there anyway I can stop mkoctfile from using the -O2 optimiser
> flag?
>
> I have tried re-building octave without the flag set in the CFLAGS
> environment variable. I have tried setting CFLAGS.

There's still CXXFLAGS and FFLAGS ...

        Thomas

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile and compiler options

Michael Goffioul
In reply to this post by john.2.tomlinson
Did you try to change CXXFLAGS instead?

Michael.


On Wed, Sep 3, 2008 at 2:57 PM,  <[hidden email]> wrote:

> All
>
> Is there anyway I can stop mkoctfile from using the -O2 optimiser flag?
>
> I have tried re-building octave without the flag set in the CFLAGS
> environment variable. I have tried setting CFLAGS. Still mkoctfile insists
> on inserting the -O2 flag
>
> octave:3> mkoctfile -p CFLAGS
> -ggdb
> octave:4> mkoctfile -v fred.cpp
> g++ -c -fPIC -I/usr/local/include/octave-3.0.2
> -I/usr/local/include/octave-3.0.2/octave -I/usr/local/include -mieee-fp -g
> -O2 fred.cpp -o fred.o
>
> g++ -shared -Wl,-Bsymbolic -o fred.oct fred.o -L/usr/local/lib/octave-3.0.2
> -L/usr/local/lib -loctinterp -loctave -lcruft -lfftw3 -lreadline -lncurses
> -ldl -lz -lm -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3
> -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/lib
> -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../.. -lz -lfrtbegin -lg2c -lm
>
> John Tomlinson
> Wireless Networks
> BT Design.
> Ipswich, UK
>
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: mkoctfile and compiler options

wim van hoydonck
In reply to this post by john.2.tomlinson
On 9/3/08, [hidden email] <[hidden email]> wrote:

>
>
>
> All
>
> Is there anyway I can stop mkoctfile from using the -O2 optimiser flag?
>
> I have tried re-building octave without the flag set in the CFLAGS
> environment variable. I have tried setting CFLAGS. Still mkoctfile insists
> on inserting the -O2 flag

You could edit mkoctfile and remove the -O2 from the FFLAGS, CXXFLAGS
AND CFLAGS variables there, as that is a shell script.

But I do not know if that is the preferred or best way.

regards,

Wim
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

RE: mkoctfile and compiler options

john.2.tomlinson
In reply to this post by Michael Goffioul
Michael

>Did you try to change CXXFLAGS instead?

That's the Badger! The code I am modifying is written in a 'C' style so
I keep forgetting I am actually writing C++.

Thanks very much, I can now debug the code in gdb without getting lost
in the changes made by the optimiser.

John Tomlinson
Wireless Networks
BT Design.
Ipswich, UK


-----Original Message-----
From: Michael Goffioul [mailto:[hidden email]]
Sent: 03 September 2008 15:02
To: Tomlinson,J,John,DMJ R
Cc: [hidden email]
Subject: Re: mkoctfile and compiler options

Did you try to change CXXFLAGS instead?

Michael.


On Wed, Sep 3, 2008 at 2:57 PM,  <[hidden email]> wrote:
> All
>
> Is there anyway I can stop mkoctfile from using the -O2 optimiser
flag?

>
> I have tried re-building octave without the flag set in the CFLAGS
> environment variable. I have tried setting CFLAGS. Still mkoctfile
> insists on inserting the -O2 flag
>
> octave:3> mkoctfile -p CFLAGS
> -ggdb
> octave:4> mkoctfile -v fred.cpp
> g++ -c -fPIC -I/usr/local/include/octave-3.0.2
> -I/usr/local/include/octave-3.0.2/octave -I/usr/local/include
> -mieee-fp -g
> -O2 fred.cpp -o fred.o
>
> g++ -shared -Wl,-Bsymbolic -o fred.oct fred.o
> g++ -L/usr/local/lib/octave-3.0.2
> -L/usr/local/lib -loctinterp -loctave -lcruft -lfftw3 -lreadline
> -lncurses -ldl -lz -lm -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3
> -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../../../i586-suse-linux/l
> ib -L/usr/lib/gcc-lib/i586-suse-linux/3.3.3/../../.. -lz -lfrtbegin
> -lg2c -lm
>
> John Tomlinson
> Wireless Networks
> BT Design.
> Ipswich, UK
>
> _______________________________________________
> Help-octave mailing list
> [hidden email]
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
>

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave