Bug 242941 - [exp-run] avoiding libssp_nonshared.a on amd64
Summary: [exp-run] avoiding libssp_nonshared.a on amd64
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: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-28 15:55 UTC by Ed Maste
Modified: 2020-02-05 20:09 UTC (History)
2 users (show)

See Also:


Attachments
only put libssp_nonshared.a in libc.so on i386 and power (900 bytes, patch)
2019-12-28 15:55 UTC, Ed Maste
no flags Details | Diff
only put libssp_nonshared.a in libc.so on i386 and power (1.11 KB, patch)
2019-12-28 19:25 UTC, Ed Maste
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2019-12-28 15:55:42 UTC
Created attachment 210286 [details]
only put libssp_nonshared.a in libc.so on i386 and power

I believe libssp_nonshared.a serves a purpose only on i386 and powerpc, and would like to request an exp-run with the attached patch, which should avoid linking it on amd64.

(The patch should have no effect on i386 and it can be omitted from the exp-run.)
Comment 1 Ed Maste freebsd_committer freebsd_triage 2019-12-28 16:42:17 UTC
Oops, I need to update the patch and will do so later today.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2019-12-28 19:25:54 UTC
Created attachment 210290 [details]
only put libssp_nonshared.a in libc.so on i386 and power

also adjust bsd.libnames.mk
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2019-12-29 10:03:05 UTC
I don't understand this request,  the failures pointed out in bug #229348 were happening on amd64
Comment 4 Ed Maste freebsd_committer freebsd_triage 2019-12-30 16:19:46 UTC
(In reply to Antoine Brodin from comment #3)

Yes, but bug #229348 left /usr/lib/libssp_nonshared.a in /usr/lib/libc.so. AFAIK GCC and Clang will not actually emit calls to the __stack_chk_fail_local symbol that appears in libssp_nonshared.a and it is just not required on amd64.
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2020-02-01 06:39:58 UTC
Exp-run looks fine (only tested on amd64)
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-02-05 20:09:02 UTC
A commit references this bug:

Author: emaste
Date: Wed Feb  5 20:08:01 UTC 2020
New revision: 357592
URL: https://svnweb.freebsd.org/changeset/base/357592

Log:
  libssp_nonshared: use only on i386 and ppc

  libssp_nonshared.a defines one symbol, __stack_chk_fail_local.  This
  is used only on i386 and powerpc; other archs emit calls directly to
  __stack_chk_fail.  Simplify linking on other archs by omitting it.

  PR:		242941 [exp-run]

Changes:
  head/lib/libc/Makefile
  head/share/mk/src.libnames.mk