[Libreoffice] [PATCH] fixing some errors when building with clang on linux
Stephan Bergmann
sbergman at redhat.com
Tue Jan 3 03:18:56 PST 2012
On 01/02/2012 08:11 PM, August Sodora wrote:
> For the past couple of weeks I've been trying to build LO with clang
> on linux and have hit a couple of obstacles. I can't get the internal
> nss to build and I didn't even try to enable mozilla because it fails
> to build on ubuntu anyway. The -Qunused-arguments is really to silence
> warnings from clang that -ggdb2 and other options are not recognized.
> Ultimately, I can complete make with
Sounds great. My attempts always failed due to
<http://llvm.org/bugs/show_bug.cgi?id=11250> "no code emitted for
virtual inline function inherited indirectly from class template".
Interesting that that does not hit you, too -- or do you somehow disable
hidden visibility?
From my past attempts (unxlngx6) I still have a patch file around that
is attached. Maybe it is useful (I always intended to follow up, but
somehow never found the time). It does contain a fix for nss (assembler
comments needing to start with "#" instead of "/").
> The first patch attached fixes an error related to implicitly
> converting constants to a type that should be too small to hold the
> constant. I've added static_casts to make the situation a lot more
> explicit which also suppresses the error, I'm just not sure that this
> is a real solution.
The literal 0x80000000 that is used to initialize sal_Int32
SvxMSDffHandle.nRangeYMin at
svx/source/customshapes/EnhancedCustomShapeGeometry.cxx:164 etc. is
probably better replaced with SAL_MIN_INT32. Checking all the various
places, what the best fix would be (change the relevant var. from
sal_Int32 to sal_uInt32, etc.) would surely be tedious...
> The second and third patches simply fix warnings that flood the screen
> so often that it makes it difficult to diagnose other problems.
Also see my attached patch. (I prefer removing names of unused
parameters, instead of adding "(void)x;" lines; also, additional patches
should go to the end of PATCH_FILES, as "dmake create_patch" creates
them against all previous patches already applied.)
Stephan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-fixes.patch
Type: text/x-patch
Size: 18640 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120103/c474f383/attachment-0001.bin>
More information about the LibreOffice
mailing list