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

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

[Octave-bug-tracker] [bug #56505] setting CXX should affect mkoctfile li


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #56505] setting CXX should affect mkoctfile link stage as well
Date: Sun, 16 Jun 2019 14:07:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?56505>

                 Summary: setting CXX should affect mkoctfile link stage as
well
                 Project: GNU Octave
            Submitted by: mtmiller
            Submitted on: Sun 16 Jun 2019 11:07:39 AM PDT
                Category: Configuration and Build System
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The mkoctfile program uses a separate non-standard internal variable for the
name of the  linker program to call when building oct files, and a separate
one for the name of the linker to use when building standalone programs.

I think that setting the CXX variable should also override the name of the
linker. If we still want the user to be able to set both the compiler and
linker independently, we should use a more standard variable name, either
something like LD or CXXLD.

Example of current behavior


>> mkoctfile -v dummy.cc
g++ -c -fPIC -I… -pthread -fopenmp -g -O2 dummy.cc -o /tmp/oct-Cwseid.o
g++ -I… -pthread -fopenmp -g -O2 -shared -Wl,-Bsymbolic -o dummy.oct 
/tmp/oct-Cwseid.o
>> 
>> setenv CXX clang
>> mkoctfile -v dummy.cc
clang -c -fPIC -I… -pthread -fopenmp -g -O2 dummy.cc -o /tmp/oct-MCpC7P.o
g++ -I… -pthread -fopenmp -g -O2 -shared -Wl,-Bsymbolic -o dummy.oct 
/tmp/oct-MCpC7P.o


It would be more user friendly if the second command shown, the link stage,
also used clang by virtue of the user setting CXX. Currently the user has to
know about the special Octave environment variable 'DL_LD'.

As far as I can tell, 'DL_LD' is always set to the same thing as 'CXX' when
Octave is built. So is the 'LD_CXX' variable. These two linker variables look
redundant to me and I think we could combine them into one.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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