binutils Newspaper
NOVEMBER 30, 2026
ld/aix — Proposed

ld/aix: remove unused is_64bit variable

Remove unused `is_64bit` variable from AIX linker emulation.

Simon Marchi proposes removing the is_64bit variable from the AIX linker emulation. This variable, introduced in 2001, has been unused and now causes build failures with recent Clang versions due to -Wunused-but-set-global. The linker logic for 32-bit and 64-bit modes is handled by other mechanisms.

In the Thread 1 participant
  1. Simon Marchi proposer

    Proposes removing the unused `is_64bit` variable from AIX linker emulation, which causes build errors.

    “Building ld with a recent clang fails with: eaix5ppc.c:128:12: error: variable 'is_64bit' set but not used [-Werror,-Wunused-but-set-global] The same happens for the other emulations generated from aix.em. The variable has been unused since it was added in commit 742aeb63e9f0 ("Pass argc and argv to ldemul_choose_target. Support -b64 in AIX", 2001-12-03). Remove it.”

In Details

This patch removes an unused global variable is_64bit from ld/emultempl/aix.em. This variable was intended to track whether a 64-bit link was being performed but has been obsolete since 2001. The logic for selecting 32-bit or 64-bit modes is handled by syscall_mask and symbol_mode_mask, making is_64bit redundant and a source of build warnings.

Filed Under: cleanupbuildlinkeraix