bfd/epiphany: remove unused epiphany_relaxed variable
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Test passed
|
Commit Message
Building bfd with a recent clang fails with:
/home/smarchi/src/binutils-gdb/bfd/elf32-epiphany.c:45:13: error: variable 'epiphany_relaxed' set but not used [-Werror,-Wunused-but-set-global]
The variable has been unused since the epiphany port was added in commit
cfb8c0921c8a (2011-10-25). Remove it.
Cc: Joern Rennecke <joern.rennecke@embecosm.com>
---
bfd/elf32-epiphany.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
base-commit: 5ffe4ba215c0bc186b91c85739350a67a8f61a0f
Comments
On Fri, Oct 30, 2026 at 10:53:58AM -0400, Simon Marchi wrote:
> Building bfd with a recent clang fails with:
>
> /home/smarchi/src/binutils-gdb/bfd/elf32-epiphany.c:45:13: error: variable 'epiphany_relaxed' set but not used [-Werror,-Wunused-but-set-global]
>
> The variable has been unused since the epiphany port was added in commit
> cfb8c0921c8a (2011-10-25). Remove it.
OK.
On 11/9/26 11:50 PM, Alan Modra wrote:
> On Fri, Oct 30, 2026 at 10:53:58AM -0400, Simon Marchi wrote:
>> Building bfd with a recent clang fails with:
>>
>> /home/smarchi/src/binutils-gdb/bfd/elf32-epiphany.c:45:13: error: variable 'epiphany_relaxed' set but not used [-Werror,-Wunused-but-set-global]
>>
>> The variable has been unused since the epiphany port was added in commit
>> cfb8c0921c8a (2011-10-25). Remove it.
>
> OK.
>
> --
> Alan Modra
Thanks, pushed.
Simon
@@ -42,8 +42,6 @@ struct epiphany_opcode
unsigned short mask;
};
-static bool epiphany_relaxed = false;
-
/* Relocation tables. */
static reloc_howto_type epiphany_elf_howto_table [] =
{
@@ -198,10 +196,7 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec,
*again = false;
if (first_section == NULL)
- {
- epiphany_relaxed = true;
- first_section = sec;
- }
+ first_section = sec;
if (first_section == sec)
{