[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #8919] Start of patch to enable visibility
From: |
Markus Mützel |
Subject: |
[Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system |
Date: |
Sat, 26 Dec 2020 14:53:15 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.66 |
Follow-up Comment #18, patch #8919 (project octave):
I tried to compile with visibility attributes for Windows using the attached
"part4".
But it looks like there is a compatibility issue with how we use (inline)
definitions in headers and the dllexport-dllimport mechanism used on Windows:
Symbols marked with the "dllimport" attribute cannot have definitions in the
same compilation unit. [1]
GCC fails with a very similar error in that case ("function X definition is
marked dllimport").
That means, we'd need to restrict us to *declarations* in headers we'd like to
use for symbol import.
We are probably using *definitions* in header file because we'd like to give
the compiler the opportunity to inline those functions.
But to be able to use mark symbols as dllimports, we'd need to *separate*
declaration and definition (or use separate headers for import?). However,
this might lead to the compiler producing less efficient instructions.
With the changes from "part5" compilation succeeds. But linking
liboctinterp-8.dll fails with a whole lot of errors similar to this one:
/home/osboxes/Documents/Repositories/Octave/mxe-octave/tmp-default-octave/octave-7.0.0/libinterp/octave-value/ov-bool.cc:200:
undefined reference to `double octave::read_value<double>(std::istream&)'
But that symbol *is* exported by liboctave-8.dll:
$ nm -C
./tmp-default-octave/octave-7.0.0/.build/liboctave/.libs/liboctave-8.dll |
grep "octave::read_value<double>"
000000006ceb0910 T double octave::read_value<double>(std::istream&)
I've currently no idea how to fix that.
(file #50572, file #50573)
_______________________________________________________
Additional Item Attachment:
File name: patch8919_part4_visibility_Windows.patch Size:2 KB
<https://file.savannah.gnu.org/file/patch8919_part4_visibility_Windows.patch?file_id=50572>
File name: patch8919_part5_visibility_Windows_fixes.patch Size:5 KB
<https://file.savannah.gnu.org/file/patch8919_part5_visibility_Windows_fixes.patch?file_id=50573>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?8919>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, (continued)
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/22
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, anonymous, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Philip Nienhuis, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, John W. Eaton, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Philip Nienhuis, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/23
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/26
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system,
Markus Mützel <=
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/30
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, John W. Eaton, 2020/12/30
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/30
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, John W. Eaton, 2020/12/30
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/31
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/31
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Rik, 2020/12/31
- [Octave-patch-tracker] [patch #8919] Start of patch to enable visibility attributes for GCC in build system, Markus Mützel, 2020/12/31