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]
Other format: [Raw text]

RE: preprocessor/10743: Build error for CPP when building Cross compiler and host and target have diff character sets (i370)


Hello Neil,

I fetched the latest CVS (gcc_ss_20030519 I believe).. And there is still an
unresolved reference in cpplex.c when link editing cpp0 :

*** Compile log snippet : ****
gcc   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
-fno-common   -DHAVE_CONFIG_H -DGENERATOR_FILE  -o fix-header fix-header.o \
c-incpath.o cppdefault.o scan-decls.o prefix.o scan.o libcpp.a
../libiberty/libiberty.a
libcpp.a(cpplex.o)(.text+0x1e0d): In function `cpp_interpret_charconst':
/data/unsaved/ivan/gcc-3.4-cvs/i370-ibm-mvs/gcc/../../gcc/gcc/cpplex.c:1614:
undefined reference to `mvs_map_char'
collect2: ld returned 1 exit status
make[1]: *** [fix-header] Error 1
make[1]: Leaving directory `/data/unsaved/ivan/gcc-3.4-cvs/i370-ibm-mvs/gcc'
make: *** [all-gcc] Error 2
*** End of snipper ****

My local workaround is to add a local definition for mvs_map_char in a file
(which returns the parameter), which gets linkedited with cpp0 (but not with
cc1).. I know this is a VERY DIRTY hack, so it's nothing but a local
workaround (i.e. it's not a fix !)

Mapping of MAP_CHAR to mvs_map_char is needed in cpplex.c (but only during
the compile) otherwise constants are in the wrong page code during a compile
(for example '%' gets mapped to 0x25(ascii) instead of 0x61(ebcdic) in the
assembly.. But it's irrelevant during the cpp stage (which generates on the
"host" system anyway, not the target system)..

The fix may not be trivial (mainly because the code page used for cpp0
output is the same as the host system (if I understand how it works
correctly) while the code page used for cc1 output is the one of the target
system)...

I believe (but again, I am a complete newbie in terms of compilers) that
this could be a general issue when dealing with cross compiles which bear
completelly different character sets.. And when the character conversion
code is held by the target backend (I hope I'm using the term backend
properly ! LOL)..

Anyways.. Thanks for the support ! And let me know if you need any extra
information (because what I am trying to do may not be trivial at all..)

Cheers,

--Ivan

> -----Original Message-----
> From: neil@gcc.gnu.org [mailto:neil@gcc.gnu.org] 
> Sent: Monday, May 19, 2003 10:20 PM
> To: gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org; 
> ivan@vmfacility.fr; nobody@gcc.gnu.org
> Subject: Re: preprocessor/10743: Build error for CPP when 
> building Cross compiler and host and target have diff 
> character sets (i370)
> 
> 
> Synopsis: Build error for CPP when building Cross compiler 
> and host and target have diff character sets (i370)
> 
> State-Changed-From-To: open->closed
> State-Changed-By: neil
> State-Changed-When: Mon May 19 20:20:20 2003
> State-Changed-Why:
>     I believe this is fixed in 3.4.  If not, let me know and 
> I will reopen it.
> 
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=10743


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