From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23644 invoked by alias); 20 May 2003 10:12:20 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23989 invoked by uid 71); 20 May 2003 09:56:00 -0000 Date: Tue, 20 May 2003 10:12:00 -0000 Message-ID: <20030520095600.23988.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Ivan Warren" Subject: RE: preprocessor/10743: Build error for CPP when building Cross compiler and host and target have diff character sets (i370) Reply-To: "Ivan Warren" X-SW-Source: 2003-05/txt/msg02157.txt.bz2 List-Id: The following reply was made to PR preprocessor/10743; it has been noted by GNATS. From: "Ivan Warren" To: , , , , , Cc: Subject: RE: preprocessor/10743: Build error for CPP when building Cross compiler and host and target have diff character sets (i370) Date: Tue, 20 May 2003 11:29:10 +0200 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:16= 14: 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]=20 > Sent: Monday, May 19, 2003 10:20 PM > To: gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org;=20 > ivan@vmfacility.fr; nobody@gcc.gnu.org > Subject: Re: preprocessor/10743: Build error for CPP when=20 > building Cross compiler and host and target have diff=20 > character sets (i370) >=20 >=20 > Synopsis: Build error for CPP when building Cross compiler=20 > and host and target have diff character sets (i370) >=20 > 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=20 > I will reopen it. >=20 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=3Dview%20audit-trail&database=3D= gcc&p r=3D10743