This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Help needed: File reading problems in gas?
- From: Nick Clifton <nickc at redhat dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>, Binutils Development <binutils at sourceware dot org>
- Date: Thu, 8 Jun 2017 13:20:19 +0100
- Subject: Re: Help needed: File reading problems in gas?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0F0B08049F
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0F0B08049F
- References: <0564ba26-d3e1-07c5-d8be-47be53403f25@gjlay.de>
Hi Johann,
> conftest.s: Assembler messages:
> conftest.s: Error: can't open for reading: No such file or directory
>
> It works if
>
> - remove the "&& ld..." part of ac_try
> - the content of ac_try is executed directly (without eval)
> Any ideas?
This appears to be a weird shell scripting problem. The error message
is happening because gas is being passed a command line that includes a
single space as an argument. I added this patch to as.c:
diff --git a/gas/as.c b/gas/as.c
index 83a572b..80a8a01 100644
--- a/gas/as.c
+++ b/gas/as.c
@@ -1168,6 +1168,7 @@ perform_an_assembly_pass (int argc, char ** argv)
{ /* Is it a file-name argument? */
PROGRESS (1);
saw_a_file++;
+ fprintf (stderr, "ARG %d ARGV %p *ARGV %s %d\n", argc + 1, argv, * argv, ** argv);
/* argv->"" if stdin desired, else->filename. */
read_a_source_file (*argv);
}
and the output shows:
ARG 2 ARGV 0x122b8c8 *ARGV conftest.s 99
ARG 1 ARGV 0x122b8d0 *ARGV 32
So this is not an assembler problem. Poor old gas is being asked to assemble a
non-existent file.
Cheers
Nick