Fri Mar 4 21:25:47 2016 UTC ()
pass correct ABI via OBJECT_MODE environment variable on AIX

It turns out a handful of AIX binutil-like utilities are particular
about type of object files they should examine.  Instead of piping
through flags for each utility everywhere, it is easier to just export
'OBJECT_MODE=[32|64]' instead.

>From Eric N. Vander Weele.


(tnn)
diff -r1.40 -r1.41 pkgsrc/mk/platform/AIX.mk
diff -r1.95 -r1.96 pkgsrc/mk/wrapper/bsd.wrapper.mk
diff -r1.1 -r0 pkgsrc/mk/wrapper/cmd-sink-aix-ar

cvs diff -r1.40 -r1.41 pkgsrc/mk/platform/AIX.mk (expand / switch to context diff)
--- pkgsrc/mk/platform/AIX.mk 2013/04/28 12:53:56 1.40
+++ pkgsrc/mk/platform/AIX.mk 2016/03/04 21:25:47 1.41
@@ -1,4 +1,4 @@
-# $NetBSD: AIX.mk,v 1.40 2013/04/28 12:53:56 obache Exp $
+# $NetBSD: AIX.mk,v 1.41 2016/03/04 21:25:47 tnn Exp $
 #
 # Variable definitions for the AIX operating system.
 
@@ -66,3 +66,11 @@
 # to avoid a test required by the libtool script that takes forever.
 # FIXME: Adjust to work on this system and enable the lines below.
 #_OPSYS_MAX_CMDLEN_CMD=	/sbin/sysctl -n kern.argmax
+
+# On AIX, there are a handful of utilies (i.e., ar(1), ld(1), strip(1), etc)
+# that care about the type of object files they should examine via the various'
+# flags.  Alternatively, it is easier to export OBJECT_MODE with the
+# appropriate $ABI versus piping through flags for all related utilities.
+.if defined(ABI)
+ALL_ENV+=	OBJECT_MODE=${ABI}
+.endif

cvs diff -r1.95 -r1.96 pkgsrc/mk/wrapper/bsd.wrapper.mk (expand / switch to context diff)
--- pkgsrc/mk/wrapper/bsd.wrapper.mk 2016/03/04 01:38:39 1.95
+++ pkgsrc/mk/wrapper/bsd.wrapper.mk 2016/03/04 21:25:47 1.96
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.95 2016/03/04 01:38:39 tnn Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.96 2016/03/04 21:25:47 tnn Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -348,7 +348,6 @@
 .elif ${OPSYS} == "AIX"
 _WRAP_CMD_SINK.CC?=	${WRAPPER_TMPDIR}/cmd-sink-aix-cc
 _WRAP_CMD_SINK.CXX?=	${_WRAP_CMD_SINK.CC}
-_WRAP_CMD_SINK.AR=	${WRAPPER_TMPDIR}/cmd-sink-aix-ar
 _WRAP_CMD_SINK.LD=	${WRAPPER_TMPDIR}/cmd-sink-aix-ld
 _WRAP_CACHE_BODY.CC?=	${WRAPPER_TMPDIR}/cache-body-aix-cc
 _WRAP_CACHE_BODY.CC_R?=	${WRAPPER_TMPDIR}/cache-body-aix-cc
@@ -505,7 +504,6 @@
 	arg-pp-darwin-gcc \
 	arg-pp-mipspro-cc \
 	arg-pp-sunpro-cxx \
-	cmd-sink-aix-ar \
 	cmd-sink-aix-cc \
 	cmd-sink-aix-ld \
 	cmd-sink-aix-xlc \

File Deleted: pkgsrc/mk/wrapper/Attic/cmd-sink-aix-ar