[Top][All Lists]

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

[Bug binutils/25572] New: /dev/null should be excluded from 'files are t

From: masahiroy at kernel dot org
Subject: [Bug binutils/25572] New: /dev/null should be excluded from 'files are the same' check
Date: Tue, 18 Feb 2020 05:36:35 +0000


            Bug ID: 25572
           Summary: /dev/null should be excluded from 'files are the same'
           Product: binutils
           Version: 2.35 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: masahiroy at kernel dot org
  Target Milestone: ---


I think using /dev/null for both input and output
is useful, but the assembler emits this warning:

$ gcc -c -x assembler /dev/null -o /dev/null
Assembler messages:
Fatal error: The input '/dev/null' and output '/dev/null' files are the same

This is especially useful to check whether
a particular flag is supported or not.

$ gcc -Wa,<some-assembler-flag> -c -x assembler /dev/null -o /dev/null


$ as <some-assembler-flag> /dev/null -o /dev/null

Then, check the exit code.

This technique is widely used in the Linux kernel build system.

However, with the current binutils,
this always exits with 1 with the 'files are the same' warning.

We could work around it by using /dev/zero
as a data sink, but this looks a bit strange.

$ gcc -Wa,<some-assembler-flag> -c -x assembler /dev/null -o /dev/zero

This was reported here

I think device files should be excluded from the
same-file check.

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

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