pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56163: Solaris 10 support for GNU ld, missing library path



>Number:         56163
>Category:       pkg
>Synopsis:       Solaris 10 support for GNU ld, missing library path
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 11 06:50:00 +0000 2021
>Originator:     Claes Nästén
>Release:        trunk 2021-05-11
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc

>Description:
Using GNU ld form pkgsrc on Solaris 10 x86_64 binaries fail to link due to gld not being able to find /lib/64/libaio.so.

Using the Solaris 10 (unpatched) linker can on the other hand fail with link issues like:

section [12].eh_frame: section type is SHT_PROGBITS: expected SHT_AMD64_UNWIND

Adding /lib/64 and /usr/lib/64 to the linker path resolves the issues making GNU ld an option. 
>How-To-Repeat:
Build GCC (my tests are with GCC 6.5) using the tools from binutils and not the Solaris provided tools.

The build will fail with linker issues. (And other issues, will hopefully be able to provide patches for that) 
>Fix:
diff --git a/devel/binutils/Makefile b/devel/binutils/Makefile
index 21d2fd74b41..04fcc4d675b 100644
--- a/devel/binutils/Makefile
+++ b/devel/binutils/Makefile
@@ -51,6 +51,17 @@ PLIST_VARS+= ctf gas gold gprof ld
 
 .include "../../mk/bsd.prefs.mk"
 
+# Solaris x86_64 libaries are located under /lib/64 and /usr/lib/64 and
+# must be available for 64bit applications to link
+.if ${OPSYS} == "SunOS"
+.if exists(/usr/lib/64)
+LIB_PATH:=             /usr/lib/64:${LIB_PATH}
+.endif
+.if exists(/lib/64)
+LIB_PATH:=             /lib/64:${LIB_PATH}
+.endif
+.endif
+
 #
 # libctf does not build on thes platforms at present.
 #


Home | Main Index | Thread Index | Old Index