Bug 208201

Summary: [maintainer update][patch] devel/dyncall: build with -fPIC
Product: Ports & Packages Reporter: Tassilo Philipp <tphilipp>
Component: Individual Port(s)Assignee: Thomas Zander <riggs>
Status: Closed FIXED    
Severity: Affects Some People CC: riggs
Priority: --- Keywords: easy, needs-qa, patch
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch adding -fPIC tphilipp: maintainer-approval+

Description Tassilo Philipp 2016-03-22 13:33:52 UTC
Created attachment 168493 [details]
patch adding -fPIC

Added needed CFLAGS+= -fPIC, bumped PORTREVISION
Comment 1 Thomas Zander freebsd_committer freebsd_triage 2016-03-25 07:16:30 UTC
What problem does it solve? And is it required on every ARCH?
Comment 2 Tassilo Philipp 2016-03-25 10:34:38 UTC
dyncall is often used in scripting language extensions, which are shared libraries. Without fPIC, building those would fail.

dyncall's configure step actually adds -fPIC for all FreeBSD builds, *if* CFLAGS isn't already set by the user. Since the ports tree sets it, the result is that fPIC isn't used.

This simply adds it back for FreeBSD builds.

I *think* this would be required for all the platforms, as dyncall itself would set it for all FreeBSD builds, I wouldn't see why dynamic linking logic would work on arm differently than x86? Maybe I'm missing something?
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-03-30 17:31:46 UTC
A commit references this bug:

Author: riggs
Date: Wed Mar 30 17:30:47 UTC 2016
New revision: 412177
URL: https://svnweb.freebsd.org/changeset/ports/412177

Log:
  Add -fPIC to CFLAGS; bump PORTREVISION

  PIC is required for this port to work properly. However, the
  port's own build system only adds it if CFLAGS is not set in MAKE_ENV.
  This adds -fPIC to the pre-defined set of CFLAGS to ensure the port
  is properly built.

  PR:		208201
  Submitted by:	tphilipp@potion-studios.com (maintainer)

Changes:
  head/devel/dyncall/Makefile
Comment 4 Thomas Zander freebsd_committer freebsd_triage 2016-03-30 17:33:19 UTC
(In reply to Tassilo Philipp from comment #2)

No worries, you are not missing anything. I just wanted to make sure that I fully understand the intention of this patch. Committed, thank you!