This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/701: cross-compiler doesn't assemble



>Number:         701
>Category:       c
>Synopsis:       cross-compiler doesn't assemble
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 27 15:26:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Dean Copsey
>Release:        gcc version 2.95.2 19991024 (release)
>Organization:
>Environment:
i686 running cygwin (dll 1.1.4) under Win2K; compiler build is cross compiler for powerpc-elf
>Description:
gcc produces assembly but doesn't pass the assembly file to as.  My guess is that a <CR> is getting in the way:

Reading specs from /usr/local/lib/gcc-lib/ppc-elf/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/local/lib/gcc-lib/ppc-elf/2.95.2/cpp.exe -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -DPPC -Dunix -D__svr4__ -D__PPC__ -D__unix__ -D__svr4__ -D__PPC -D__unix -Asystem(unix) -Asystem(svr4) -Acpu(powerpc) -Amachine(powerpc) -D__CHAR_UNSIGNED__ hello.c hello.i
GNU CPP version 2.95.2 19991024 (release) (PowerPC System V.4)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc-lib/ppc-elf/2.95.2/include
 /usr/local/lib/gcc-lib/ppc-elf/2.95.2/../../../../ppc-elf/sys-include
 /usr/local/lib/gcc-lib/ppc-elf/2.95.2/../../../../ppc-elf/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/local/lib/gcc-lib/ppc-elf/2.95.2/../../../../include/g++-3
End of omitted list.
 /usr/local/lib/gcc-lib/ppc-elf/2.95.2/cc1.exe hello.i -quiet -dumpbase hello.c -version -o hello.s
GNU C version 2.95.2 19991024 (release) (ppc-elf) compiled by GNU C version 2.95.2 19991024 (release-2).
 /usr/local/ppc-elf/bin/as.exe 

Assembler messages:
Error: Can't open ^M for reading.
^M: No such file or directory

>How-To-Repeat:
Build binutils-2.10: ../binutils-2.10/configure --target=ppc-elf --program-prefix=ppc-elf- --with-newlib --with-headers=/usr/include --enable-languages=c,c++ 

Build gcc-2.95.2: ../gcc-2.95.2/configure <same options>

Start building newlib-1.8.2 (same options).  The first compile (.../newlib-1.8.2/newlib/libc/stdlib/__adjust.c) will fail with "Assembler messages" like above.
>Fix:
I'm assuming that the fix is to ensure the script (?) doesn't have a '\r' before '\n'.  This is default windows behaviour, and needs to be explicitly disabled by opening files as binary using fopen(output_file, wb) or _setmode(output_file, _O_BINARY).  The problem is, I don't know what generates the script, or alternatively, who reads it.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="hello.c"
Content-Disposition: inline; filename="hello.c"

#include <stdio.h>

main() {
	printf("Hello World!\n");
	return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]