Bug 214549 - [patch] devel/llvm39: enable shared libraries
Summary: [patch] devel/llvm39: enable shared libraries
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-11-15 22:17 UTC by Koop Mast
Modified: 2016-12-21 16:24 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)
kwm: maintainer-feedback?


Attachments
Enable shared libraries (2.65 KB, patch)
2016-11-15 22:17 UTC, Koop Mast
no flags Details | Diff
cleanup devel/llvm39 Makefile (3.28 KB, patch)
2016-11-15 23:40 UTC, Matthew Rezny
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Koop Mast freebsd_committer 2016-11-15 22:17:46 UTC
Created attachment 177038 [details]
Enable shared libraries

Enable shared libraries support in llvm39 for use in the Mesa ports. Lightly tested with Xorg and GNOME 3 desktop, with the dri llvm based software render driver. This might be applied to llvm38 but I'm planning on skipping that version in the Mesa ports and go straight to llvm39. So I don't really care about llvm38.

The patch is needed otherwise libLLVM-3.9.so is only 4k big and has no symbols. While here patch in DragonFly support too.

% glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 12.0.4
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.4
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
Comment 1 Koop Mast freebsd_committer 2016-11-15 22:24:19 UTC
Forgot to mention where I got my info from. The Cmake macro's are listed here: http://llvm.org/docs/CMake.html#llvm-specific-variables . Use of BUILD_SHARED_LIBS is not recommended.
Comment 2 commit-hook freebsd_committer 2016-11-15 23:28:34 UTC
A commit references this bug:

Author: brooks
Date: Tue Nov 15 23:28:23 UTC 2016
New revision: 426189
URL: https://svnweb.freebsd.org/changeset/ports/426189

Log:
  Build shared libraries.

  PR:		214549
  Submitted by:	kwm

Changes:
  head/devel/llvm39/Makefile
  head/devel/llvm39/files/patch-tools_llvm-shlib_CMakeLists.txt
  head/devel/llvm39/pkg-plist
Comment 3 Matthew Rezny freebsd_committer 2016-11-15 23:40:12 UTC
Created attachment 177040 [details]
cleanup devel/llvm39 Makefile

As I was also working on this issue at the same time, I accumulated some fixes to quiet most of portlint's complaints. This patch is just the cleanups:

correct placement of PKGNAMESUFFIX
convert spaces to tabs
remove blank lines
qwk -> ${AWK}
sed -> ${SED}
Comment 4 commit-hook freebsd_committer 2016-11-16 00:29:39 UTC
A commit references this bug:

Author: brooks
Date: Wed Nov 16 00:28:43 UTC 2016
New revision: 426194
URL: https://svnweb.freebsd.org/changeset/ports/426194

Log:
  portlint fixes:

  correct placement of PKGNAMESUFFIX
  convert spaces to tabs
  remove blank lines
  qwk -> ${AWK}
  sed -> ${SED}

  PR:		214549
  Submitted by:	matthew@reztek.cz

Changes:
  head/devel/llvm39/Makefile
Comment 5 Brooks Davis freebsd_committer 2016-11-16 00:35:03 UTC
Committed both diffs.  Thanks!
Comment 6 Dan Nelson 2016-11-17 03:25:03 UTC
Now that libLLVM.so works, another option to consider adding is -DLLVM_LINK_LLVM_DYLIB=ON . This will make all the binaries link against libLLVM.so instead of the static versions, and shrinks the install size by over 50%.
Comment 7 commit-hook freebsd_committer 2016-12-21 16:24:50 UTC
A commit references this bug:

Author: brooks
Date: Wed Dec 21 16:24:00 UTC 2016
New revision: 429104
URL: https://svnweb.freebsd.org/changeset/ports/429104

Log:
  Upgrade to 3.9.1.

  Link programs dynamicaly.  This reduces package size by over 400MB on
  amd64.

  PR:		214549

Changes:
  head/devel/llvm39/Makefile
  head/devel/llvm39/distinfo
  head/devel/llvm39/pkg-plist