help-octave
[Top][All Lists]
Advanced

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

Re: Using the mkoctfile -W and -Wl options


From: Richard Crozier
Subject: Re: Using the mkoctfile -W and -Wl options
Date: Thu, 25 Jun 2015 17:40:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0



On 25/06/15 17:27, JohnD wrote:


Message: 1
Date: Thu, 25 Jun 2015 14:38:44 +0100
From: Richard Crozier <address@hidden>
To: address@hidden
Subject: Using the mkoctfile -W and -Wl options
Message-ID: <address@hidden>
Content-Type: text/plain; charset=utf-8; format=flowed

Hello,

Could someone possibly provide an example of using the -W and -Wl
arguments
for mkoctfile?

"
       '-Wl,...'
            Pass flags though the linker like "-Wl,-rpath=...".  The
            quotes are needed since commas are interpreted as command
            separators.

       '-W...'
            Pass flags though the compiler like "-Wa,OPTION".

"

For example, I tried building the provided helloworld example from the
octave
manual and passing the -v parameter like so:

  >> mkoctfile helloworld.c "-Wv"
gcc: error: unrecognized command line option ?-Wv?
warning: mkoctfile exited with failure status
warning: called from
      mkoctfile at line 171 column 5
  >> mkoctfile helloworld.c "-W,-v"
gcc: error: unrecognized command line option ?-W,-v?
warning: mkoctfile exited with failure status
warning: called from
      mkoctfile at line 171 column 5
  >> mkoctfile helloworld.c -Wv
gcc: error: unrecognized command line option ?-Wv?
warning: mkoctfile exited with failure status
warning: called from
      mkoctfile at line 171 column 5


obviously in reality I want to do more than pass this parameter, can
someone
explain the right way to do these please, or point me to a more detailed
resource on this?

Thanks,
Richard


The resource would be the documentation for gcc - you are passing gcc -W
commands to gcc at that point.



ok, I see, so is the '-W' flag only for passing gcc options that start with '-W', i.e. the warning flags?

The octave manual implies the W option is for passing any parameters to the compiler, but it's probably obvious to someone experienced that it's only referring to warning options.

How would I then, as an example, pass the '-O2' parameter to gcc via mkoctfile? Or how exactly should I call mkoctfile and pass it the '-v' option etc?

Richard


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




reply via email to

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