directory separators in compiler generated assembly code

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

 



Hello all,

I'm having a problem with a C cross-compiler built on windows using
Cygwin. The cross-compiler runs on windows and will cross compile code
for a microprocessor. The system builds OK, with exe's generated for
the compiler, assembler, and linker.

The problem I'm having is the assembler code generated when using the
-S option on the compiler. The code is using a forward slash for
directory separators and is using relative file names. It generates
script like,

	.file 1 "testFiles/main.c"

and for the debug section..
	.ascii	"testFiles/main.c\000"
	.ascii	"/home/Comp_Owner/Test/gcc\000"

What I need for the assembly code is the backward slash, and I need to
have absolute path names, like this,

	.file 1 "C:\\cygwin\\home\\Comp_Owner\\Test\\gcc\\testFiles\\main.c"

and for the debug section..
	.ascii	"C:\\cygwin\\home\\Comp_Owner\\Test\\gcc\\testFiles\\main.c\000"
	.ascii	"C:\\cygwin\\home\\Comp_Owner\\Test\\gcc\000"

The debugger I'm using won't work unless the double backslash is used.

I tried setting options in the source code used to build the compiler.
I added defines shown below in the file 'xm-cygwin.h' in the directory
'src/gcc/config/i386,

#define HOST_EXECUTABLE_SUFFIX ".exe"
#define HAVE_DOS_BASED_FILE_SYSTEM
#define DIR_SEPARATOR_2 '\\'

but this didn't help (this may be the wrong file to add the defines).
I'm sure there's a simple option to set, but I couldn't find it
searching the GCC site. Anyone have any suggestions?

Thanks,
Joe

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux