Bug 242950 - [exp-run] replacing libssp with BSDL version
Summary: [exp-run] replacing libssp with BSDL version
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
Depends on:
Reported: 2019-12-29 03:46 UTC by Kyle Evans
Modified: 2020-01-05 16:43 UTC (History)
2 users (show)

See Also:
kevans: exp-run?

git(1) diff against base (12.57 KB, patch)
2019-12-29 03:46 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer 2019-12-29 03:46:42 UTC
Created attachment 210298 [details]
git(1) diff against base

Attached patch against base removes our dependency on gcclibs' libssp/libssp_nonshared and just builds it from our own libc implementation with some stubs for the parts that we don't support.
Comment 1 Antoine Brodin freebsd_committer 2019-12-29 07:04:45 UTC
I don't understand,  there are 3 different exp-run requests from 3 different people about libssp..
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-12-29 08:43:32 UTC
@Kyle If your patch is different from that in #bug 229348, please attach it there

*** This bug has been marked as a duplicate of bug 229348 ***
Comment 3 Antoine Brodin freebsd_committer 2019-12-29 10:04:06 UTC
Re-open,  this patch is not duplicate of bug #229348
Comment 4 Kyle Evans freebsd_committer 2019-12-29 13:41:00 UTC
(In reply to Antoine Brodin from comment #1)

The other two are trying to assess when/if it still needs to be linked into libssp, this one is attempting to determine if ours is an all-around suitable replacement.

I suspect emaste's supercedes pfg's, then this one's independent because we're both keeping libssp and libssp.so needs to be exercised, and we're swapping out the version linked into libc which could break i386.

While their effort could make part of this futile, we're still flexing additional bits that may break.
Comment 5 Antoine Brodin freebsd_committer 2020-01-04 16:51:01 UTC
There is 1 new failure on i386

Failure log:

Comment 6 Kyle Evans freebsd_committer 2020-01-04 20:02:33 UTC
(In reply to Antoine Brodin from comment #5)

Thanks! Looks like libssp_nonshared was missing an -fPIC in the build.

I re-tested that the build is fine locally following that change- since it appears to be a leaf port and the only one, I'm going to go ahead and close this and commit. Thanks again for the exp-run!
Comment 7 commit-hook freebsd_committer 2020-01-04 20:20:08 UTC
A commit references this bug:

Author: kevans
Date: Sat Jan  4 20:19:28 UTC 2020
New revision: 356356
URL: https://svnweb.freebsd.org/changeset/base/356356

  Provide libssp based on libc

  For libssp.so, rebuild stack_protector.c with FORTIFY_SOURCE stubs that just
  abort built into it.

  For libssp_nonshared.a, steal stack_protector_compat.c from
  ^/lib/libc/secure and massage it to maintain that __stack_chk_fail_local
  is a hidden symbol.

  libssp is now built unconditionally regardless of {WITH,WITHOUT}_SSP in the
  build environment, and the gcclibs version has been disconnected from the
  build in favor of this one.

  PR:		242950 (exp-run)
  Reviewed by:	kib, emaste, pfg, Oliver Pinter (earlier version)
  Also discussed with:	kan
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D22943

Comment 8 Ed Maste freebsd_committer 2020-01-05 16:43:21 UTC
(In reply to Antoine Brodin from comment #1)
My PR 242941 is trying to eliminate one of the SSP-related components that I believe is not used on most FreeBSD targets.