[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
masahiroy at kernel dot org
[Bug binutils/25572] New: /dev/null should be excluded from 'files are the same' check
Tue, 18 Feb 2020 05:36:35 +0000
Bug ID: 25572
Summary: /dev/null should be excluded from 'files are the same'
Version: 2.35 (HEAD)
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
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
You are receiving this mail because:
You are on the CC list for the bug.
|[Prev in Thread]
||[Next in Thread]|
- [Bug binutils/25572] New: /dev/null should be excluded from 'files are the same' check,
masahiroy at kernel dot org <=