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 unified 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,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: AIX.mk,v 1.40 2013/04/28 12:53:56 obache Exp $ 1# $NetBSD: AIX.mk,v 1.41 2016/03/04 21:25:47 tnn Exp $
2# 2#
3# Variable definitions for the AIX operating system. 3# Variable definitions for the AIX operating system.
4 4
5CPP?= ${LOCALBASE}/bin/cpp 5CPP?= ${LOCALBASE}/bin/cpp
6ECHO_N?= ${ECHO} -n 6ECHO_N?= ${ECHO} -n
7IMAKE_MAKE?= ${MAKE} # program which gets invoked by imake 7IMAKE_MAKE?= ${MAKE} # program which gets invoked by imake
8PKGLOCALEDIR?= share 8PKGLOCALEDIR?= share
9PS?= /bin/ps 9PS?= /bin/ps
10# XXX: default from defaults/mk.conf. Verify/correct for this platform 10# XXX: default from defaults/mk.conf. Verify/correct for this platform
11# and remove this comment. 11# and remove this comment.
12# AIX strip fails too easily. Use a wrapper script instead 12# AIX strip fails too easily. Use a wrapper script instead
13.if exists(${LOCALBASE}/bin/strip) 13.if exists(${LOCALBASE}/bin/strip)
14STRIP?= ${LOCALBASE}/bin/strip 14STRIP?= ${LOCALBASE}/bin/strip
@@ -56,13 +56,21 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-w @@ -56,13 +56,21 @@ _OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-w
56_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip 56_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip
57_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip 57_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip
58 58
59DEFAULT_SERIAL_DEVICE?= /dev/tty0 59DEFAULT_SERIAL_DEVICE?= /dev/tty0
60SERIAL_DEVICES?= /dev/tty0 \ 60SERIAL_DEVICES?= /dev/tty0 \
61 /dev/tty 61 /dev/tty
62 62
63_OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk 63_OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk
64 64
65# check for maximum command line length and set it in configure's environment, 65# check for maximum command line length and set it in configure's environment,
66# to avoid a test required by the libtool script that takes forever. 66# to avoid a test required by the libtool script that takes forever.
67# FIXME: Adjust to work on this system and enable the lines below. 67# FIXME: Adjust to work on this system and enable the lines below.
68#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax 68#_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
 69
 70# On AIX, there are a handful of utilies (i.e., ar(1), ld(1), strip(1), etc)
 71# that care about the type of object files they should examine via the various'
 72# flags. Alternatively, it is easier to export OBJECT_MODE with the
 73# appropriate $ABI versus piping through flags for all related utilities.
 74.if defined(ABI)
 75ALL_ENV+= OBJECT_MODE=${ABI}
 76.endif

cvs diff -r1.95 -r1.96 pkgsrc/mk/wrapper/bsd.wrapper.mk (expand / switch to unified 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,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.wrapper.mk,v 1.95 2016/03/04 01:38:39 tnn Exp $ 1# $NetBSD: bsd.wrapper.mk,v 1.96 2016/03/04 21:25:47 tnn Exp $
2# 2#
3# Copyright (c) 2005 The NetBSD Foundation, Inc. 3# Copyright (c) 2005 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -338,27 +338,26 @@ _WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC} @@ -338,27 +338,26 @@ _WRAP_CMD_SINK.LD= ${_WRAP_CMD_SINK.CC}
338_WRAP_EXTRA_ARGS.CC+= -D_POSIX_PII_SOCKET 338_WRAP_EXTRA_ARGS.CC+= -D_POSIX_PII_SOCKET
339_WRAP_EXTRA_ARGS.CXX+= -D_POSIX_PII_SOCKET -D__USE_STD_IOSTREAM 339_WRAP_EXTRA_ARGS.CXX+= -D_POSIX_PII_SOCKET -D__USE_STD_IOSTREAM
340_WRAP_EXTRA_ARGS.CPP+= -D_POSIX_PII_SOCKET 340_WRAP_EXTRA_ARGS.CPP+= -D_POSIX_PII_SOCKET
341_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc 341_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-osf1-cc
342_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} 342_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
343_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-osf1-ld 343_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-osf1-ld
344.elif ${OPSYS} == "HPUX" 344.elif ${OPSYS} == "HPUX"
345_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-hpux-cc 345_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-hpux-cc
346_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} 346_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
347_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-hpux-ld 347_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-hpux-ld
348.elif ${OPSYS} == "AIX" 348.elif ${OPSYS} == "AIX"
349_WRAP_CMD_SINK.CC?= ${WRAPPER_TMPDIR}/cmd-sink-aix-cc 349_WRAP_CMD_SINK.CC?= ${WRAPPER_TMPDIR}/cmd-sink-aix-cc
350_WRAP_CMD_SINK.CXX?= ${_WRAP_CMD_SINK.CC} 350_WRAP_CMD_SINK.CXX?= ${_WRAP_CMD_SINK.CC}
351_WRAP_CMD_SINK.AR= ${WRAPPER_TMPDIR}/cmd-sink-aix-ar 
352_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-aix-ld 351_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-aix-ld
353_WRAP_CACHE_BODY.CC?= ${WRAPPER_TMPDIR}/cache-body-aix-cc 352_WRAP_CACHE_BODY.CC?= ${WRAPPER_TMPDIR}/cache-body-aix-cc
354_WRAP_CACHE_BODY.CC_R?= ${WRAPPER_TMPDIR}/cache-body-aix-cc 353_WRAP_CACHE_BODY.CC_R?= ${WRAPPER_TMPDIR}/cache-body-aix-cc
355_WRAP_TRANSFORM.CC?= ${WRAPPER_TMPDIR}/transform-aix-cc 354_WRAP_TRANSFORM.CC?= ${WRAPPER_TMPDIR}/transform-aix-cc
356_WRAP_TRANSFORM.CC_R?= ${WRAPPER_TMPDIR}/transform-aix-cc 355_WRAP_TRANSFORM.CC_R?= ${WRAPPER_TMPDIR}/transform-aix-cc
357_WRAP_CACHE_BODY.CXX?= ${_WRAP_CACHE_BODY.CC} 356_WRAP_CACHE_BODY.CXX?= ${_WRAP_CACHE_BODY.CC}
358_WRAP_TRANSFORM.CXX?= ${_WRAP_TRANSFORM.CC} 357_WRAP_TRANSFORM.CXX?= ${_WRAP_TRANSFORM.CC}
359.elif ${OPSYS} == "IRIX" 358.elif ${OPSYS} == "IRIX"
360_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-irix-cc 359_WRAP_CMD_SINK.CC= ${WRAPPER_TMPDIR}/cmd-sink-irix-cc
361_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC} 360_WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
362_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-irix-ld 361_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-irix-ld
363.endif 362.endif
364 363
@@ -495,27 +494,26 @@ ${_alias_}: ${_WRAP_COOKIE.${_wrappee_}} @@ -495,27 +494,26 @@ ${_alias_}: ${_WRAP_COOKIE.${_wrappee_}}
495 fi 494 fi
496. endif 495. endif
497. endfor 496. endfor
498.endfor # _WRAPPEES_UNIQUE 497.endfor # _WRAPPEES_UNIQUE
499 498
500.for _target_ in ${WRAPPER_TARGETS} 499.for _target_ in ${WRAPPER_TARGETS}
501generate-wrappers: ${_target_} 500generate-wrappers: ${_target_}
502.endfor 501.endfor
503 502
504.for w in \ 503.for w in \
505 arg-pp-darwin-gcc \ 504 arg-pp-darwin-gcc \
506 arg-pp-mipspro-cc \ 505 arg-pp-mipspro-cc \
507 arg-pp-sunpro-cxx \ 506 arg-pp-sunpro-cxx \
508 cmd-sink-aix-ar \ 
509 cmd-sink-aix-cc \ 507 cmd-sink-aix-cc \
510 cmd-sink-aix-ld \ 508 cmd-sink-aix-ld \
511 cmd-sink-aix-xlc \ 509 cmd-sink-aix-xlc \
512 cmd-sink-darwin-xlc \ 510 cmd-sink-darwin-xlc \
513 cmd-sink-icc-cc \ 511 cmd-sink-icc-cc \
514 cmd-sink-icc81-cc \ 512 cmd-sink-icc81-cc \
515 cmd-sink-irix-cc \ 513 cmd-sink-irix-cc \
516 cmd-sink-irix-ld \ 514 cmd-sink-irix-ld \
517 cmd-sink-interix-gcc \ 515 cmd-sink-interix-gcc \
518 cmd-sink-ld \ 516 cmd-sink-ld \
519 cmd-sink-osf1-cc \ 517 cmd-sink-osf1-cc \
520 cmd-sink-osf1-ld \ 518 cmd-sink-osf1-ld \
521 cmd-sink-hpux-cc \ 519 cmd-sink-hpux-cc \

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