octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS o


From: Rik
Subject: [Octave-bug-tracker] [bug #59173] "mkoctfile -p" returns wrong LDFLAGS on Windows
Date: Mon, 28 Sep 2020 14:01:31 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36

Follow-up Comment #11, bug #59173 (project octave):

So at least for LDFLAGS, Octave probably needs some special case logic.  On
Linux, gcc seems to automatically add or find the correct libraries.

I tried


g++ -c  -fPIC -I/usr/local/include/octave-5.2.0/octave/..
-I/usr/local/include/octave-5.2.0/octave -I/usr/local/include  -pthread
-fopenmp -O2 -pipe    helloworld.cc -o /tmp/oct-7r1PK2.o
g++ -I/usr/local/include/octave-5.2.0/octave/..
-I/usr/local/include/octave-5.2.0/octave -I/usr/local/include  -pthread
-fopenmp -O2 -pipe -shared -Wl,-Bsymbolic   -o helloworld.oct 
/tmp/oct-7r1PK2.o    -L/usr/local/lib   


Note how gcc adds "-L/usr/local/lib" for the link stage.

The motivating reason for getting rid of LFLAGS is that this variable is
actually supposed to be used for passing flags to lex compilations, not C++
compilations.  And the the user should always be able to make the final
determination.  If they want to override LDFLAGS they should be able to.  It
is possible that something like this would work


vars["LDFLAGS"] = get_variable ("LDFLAGS", DEFAULT_LDFLAGS);


with the same logic to set DEFAULT_LDFLAGS as before.  In this case, the
default would be taken not from Octave's build configuration, but from the
variable inside mkoctfile.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59173>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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