pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/41125: pkgsrc's bsd.lib.mk doesn't work on Solaris
>Number: 41125
>Category: pkg
>Synopsis: pkgsrc's bsd.lib.mk doesn't work on Solaris
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Apr 03 10:25:00 +0000 2009
>Originator: Aleksey Cheusov
>Release: Solaris
>Organization:
home
>Environment:
Solaris
>Description:
bsd.lib.mk from pkgtools/bootstrap-mk-files uses -X flag of ${LD}
unconditionally.
This breaks linking on Solaris because its ld doesn't have such flag.
Simon Gerraty's lib.mk solves this problem by implementing LD_X variable
which is set to -X on *BSD and Linux and unset on other platforms.
The following patch does the same.
>How-To-Repeat:
>Fix:
Index: files/bsd.lib.mk
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/bootstrap-mk-files/files/bsd.lib.mk,v
retrieving revision 1.2
diff -u -r1.2 bsd.lib.mk
--- files/bsd.lib.mk 10 Aug 2007 13:04:13 -0000 1.2
+++ files/bsd.lib.mk 3 Apr 2009 10:12:33 -0000
@@ -95,6 +95,9 @@
# CAPICFLAGS flags for {$CC} to compiling .[Ss] files
# (usually just ${CPPPICFLAGS} ${CPICFLAGS})
# APICFLAGS: flags for ${AS} to assemble .[sS] to .so objects.
+# LD_X: -X flag for ${LD}, if available
+
+LD_X ?= -x
.if ${MACHINE_ARCH} == "alpha"
# Alpha-specific shared library flags
@@ -171,7 +174,7 @@
.else
@echo ${COMPILE.c:Q} -pg ${.IMPSRC} -o ${.TARGET}
@${COMPILE.c} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @${LD} ${LD_X} -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
.endif
@@ -204,7 +207,7 @@
.else
@echo ${COMPILE.cc:Q} -pg ${.IMPSRC} -o ${.TARGET}
@${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o
- @${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ @${LD} ${LD_X} -r ${.TARGET}.o -o ${.TARGET}
@rm -f ${.TARGET}.o
.endif
Index: files/mods/OSF1.sys.mk
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/bootstrap-mk-files/files/mods/OSF1.sys.mk,v
retrieving revision 1.2
diff -u -r1.2 OSF1.sys.mk
--- files/mods/OSF1.sys.mk 16 Jan 2008 03:05:57 -0000 1.2
+++ files/mods/OSF1.sys.mk 3 Apr 2009 10:12:33 -0000
@@ -58,6 +58,7 @@
LD?= ld
LDFLAGS?=
+LD_X= # -X is not available OSF1's ld
LINT?= lint
LINTFLAGS?= -chapbxzF
Index: files/mods/SunOS.sys.mk
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/bootstrap-mk-files/files/mods/SunOS.sys.mk,v
retrieving revision 1.2
diff -u -r1.2 SunOS.sys.mk
--- files/mods/SunOS.sys.mk 11 Feb 2008 15:12:39 -0000 1.2
+++ files/mods/SunOS.sys.mk 3 Apr 2009 10:12:33 -0000
@@ -67,6 +67,7 @@
LD?= ld
LDFLAGS?=
+LD_X= # -X is not available in Solaris's ld
LINT?= lint
LINTFLAGS?= -chapbxzF
Index: files/mods/UnixWare.sys.mk
===================================================================
RCS file:
/cvsroot/pkgsrc/pkgtools/bootstrap-mk-files/files/mods/UnixWare.sys.mk,v
retrieving revision 1.2
diff -u -r1.2 UnixWare.sys.mk
--- files/mods/UnixWare.sys.mk 11 Nov 2006 18:24:52 -0000 1.2
+++ files/mods/UnixWare.sys.mk 3 Apr 2009 10:12:33 -0000
@@ -60,6 +60,7 @@
LD?= ld
LDFLAGS?=
+LD_X= # -X is not available UnixWare's ld
LINT?= lint
LINTFLAGS?= -chapbxzF
Home |
Main Index |
Thread Index |
Old Index