help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkoctfile and OpenMP


From: Jordi Gutiérrez Hermoso
Subject: Re: mkoctfile and OpenMP
Date: Mon, 16 Apr 2012 11:30:49 -0400

2012/4/16 José Luis García Pallero <address@hidden>:
> El día 16 de abril de 2012 16:39, Jordi Gutiérrez Hermoso
> <address@hidden> escribió:
>> 2012/4/16 José Luis García Pallero <address@hidden>:
>>> I'm trying to compile an *.oct file containing some OpenMP issues but
>>> mkoctfile does not recognices the -fopenmp option for activate OpenMP
>>> in gcc:
>>
>> Sigh, people keep trying to pass compiler options to mkoctfile. We
>> really should figure out a good interface to do this without breaking
>> current mkoctfile use. What do you suggest? That we pass all
>> unrecognised options? To what? To the compiler or to the linker?
>
> Mmmm..., if -Wall and other warning flags, -I, -L, -l and -D are
> recognized by mkocfile, why not -f options and -O options?

-Wall is recognised only because of a bug in mkoctfile. It's not
really recognised. Look at the help docstring for mkoctfile for -W,
and you'll see that it's actually supposed to be for passing options
to the compiler, but due to a bug, it passes -Wall instead, and there
is no way to pass options to the compiler this way. The other flags
are all handled specially, and there's specific code to handle those.
We just don't have enough cases to check for all possible flags that
you can pass to mkoctfile.

>> Right now, you can use the environment variables CFLAGS, CXXFLAGS, and
>> LDFLAGS to pass options to the C compiler, C++ compiler, or linker,
>> respectively.
>
> OK, I didn't know that mkoctfile recognizes CFLAGS, CXXFLAGS nor
> LDFLAGS. I will use them. Should I suppose that when I use pkg()
> function from Octave this CFLAGS, CXXFLAGS and LDFLAGS are recognized
> and used too?

Yes, I don't know of any other way to pass options that works right
now. I don't know how to fix mkoctfile. It would be helpful if we got
this fixed once and for all, because everyone seems to think that
mkoctfile accepts the same arguments as gcc, and frankly, it probably
should.

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]