libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] AIX: Do not rely on OBJECT_MODE env var being set.


From: Michael Haubenwallner
Subject: Re: [PATCH 2/4] AIX: Do not rely on OBJECT_MODE env var being set.
Date: Tue, 15 Mar 2016 16:59:54 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/10/2016 10:01 AM, Michael Haubenwallner wrote:
> To compile 64-bit, AIX toolchain provides support to set the environment
> variable OBJECT_MODE=64, to avoid the need for changing anything else in
> the build environment. However, gcc ignores OBJECT_MODE, and does not
> set it while building gcc itself during its multi-lib build either.
> Also, CC may be some wrapper to operate in 64-bit mode. So we cannot
> rely on OBJECT_MODE being set to properly support 64-bit builds.
> 
> Instead, we better identify the object mode in use by looking at the
> file type of an object file generated by CC, to properly set the
> commandline flags for additional tools used within libtool. While there
> is similar code for LD in _LT_ENABLE_LOCK, this is too late for NM.
> 
> * m4/libtool.m4 (_LT_CACHE_CHECK_OBJECT_FILE_TYPE): New. Provides object
> file type identified using /usr/bin/file.
> (_LT_PREPARE_TOOLS_ABI_FLAGS): New. Defines func_set_tool_abi_flag.
> Define AIX specific ABI flags for LD, AR, NM, STRIP, RANLIB.
> Set AIX_OBJECT_MODE as well.
> (_LT_SET_TOOL_ABI_FLAG): New. Uses func_set_tool_abi_flag to set host
> specific ABI flags into tool commands.
> (_LT_PROG_AR): Use _LT_SET_TOOL_ABI_FLAG.
> (LT_PATH_LD): Ditto.
> (LT_PATH_NM): Ditto.
> (_LT_CMD_OLD_ARCHIVE): Use _LT_SET_TOOL_ABI_FLAG for STRIP, RANLIB.
> (_LT_LINKER_SHLIBS): Use AIX_OBJECT_MODE.
> (_LT_LANG_CXX_CONFIG): Ditto.
> * m4/ltoptions.m4 (_LT_WITH_AIX_SONAME): Ditto.

Unfortunately, this patch does not work as expected (as in not requiring
OBJECT_MODE=64 environment variable being set for 64 bits any more), as
gnulib does early run AM_PROG_AR. Unsure if I fooled my tests last year,
or something else has changed since.

Anyway: I'm proposing these two simpler patches now, one as gnulib patch,
which the libtool patch depends on.

Thoughts?

Thanks!
/haubi/

Attachment: gnulib.0001-early-detect-AIX-object-mode-for-toolchain-search.patch
Description: Text Data

Attachment: 0001-AIX-use-X32_64-flag-in-search-for-toolchain.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]