bugzilla-daemon at mindrot.org
2025-Apr-02 17:11 UTC
[Bug 3806] New: "make tests" fails if LDFLAGS has multiple occurrences of -pie
https://bugzilla.mindrot.org/show_bug.cgi?id=3806
Bug ID: 3806
Summary: "make tests" fails if LDFLAGS has multiple
occurrences
of -pie
Product: Portable OpenSSH
Version: 9.9p2
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: Regression tests
Assignee: unassigned-bugs at mindrot.org
Reporter: alarrosa at suse.com
Created attachment 3867
--> https://bugzilla.mindrot.org/attachment.cgi?id=3867&action=edit
Remove all occurrences of -pie
Running `make tests` on openSUSE Tumbleweed failed because the
LDFLAGS_NOPIE variable in Makefile _did_ include a -pie flag:
LDFLAGS=-L. -Lopenbsd-compat/ -pie -Wl,--as-needed -Wl,-z,relro
-Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -pie
LDFLAGS_NOPIE=-L. -Lopenbsd-compat/ -pie -Wl,--as-needed -Wl,-z,relro
-Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong
This resulted in a failure to build sk-dummy.so since gcc was expecting
a main function.
The problem comes from LDFLAGS having -pie twice but the sed expression
that removes the flag only removes the one match. Also, LDFLAGS starts
with "-pie ..." so that one isn't even caught by the "s/
-pie//" regex.
I've attached a patch that I tested that fixes this issue.
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2025-Apr-02 17:18 UTC
[Bug 3806] "make tests" fails if LDFLAGS has multiple occurrences of -pie
https://bugzilla.mindrot.org/show_bug.cgi?id=3806
Antonio Larrosa <alarrosa at suse.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3867|0 |1
is obsolete| |
--- Comment #1 from Antonio Larrosa <alarrosa at suse.com> ---
Created attachment 3868
--> https://bugzilla.mindrot.org/attachment.cgi?id=3868&action=edit
Remove all occurrences of -pie
This is the correct complete patch
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2025-Apr-02 22:11 UTC
[Bug 3806] "make tests" fails if LDFLAGS has multiple occurrences of -pie
https://bugzilla.mindrot.org/show_bug.cgi?id=3806
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
Blocks| |3740
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Damien Miller <djm at mindrot.org> ---
Applied - thanks!
Referenced Bugs:
https://bugzilla.mindrot.org/show_bug.cgi?id=3740
[Bug 3740] Tracking bug for OpenSSH 10.0
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.