Bug 6917 - locale/gen-translit.pl: move preprocessing to Makefile
Summary: locale/gen-translit.pl: move preprocessing to Makefile
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: locale (show other bugs)
Version: 2.8
: P2 normal
Target Milestone: ---
Assignee: GNU C Library Locale Maintainers
Depends on:
Reported: 2008-09-27 09:55 UTC by Jeroen Demeyer
Modified: 2015-08-27 21:56 UTC (History)
2 users (show)

See Also:
Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
Build: powerpc-unknown-linux-gnu
Last reconfirmed:
fweimer: security-

Proposed patch (581 bytes, patch)
2008-09-27 09:56 UTC, Jeroen Demeyer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Demeyer 2008-09-27 09:55:31 UTC
The first line of locale/gen-translit.pl is the following:

open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file"

There are two problems with this:
1) This does not detect any errors while the shell command "cat C-translit.h.in
| gcc -E -" is running.  Instead, you get some obscure errors later on when
C-translit.h is using to compile something.
2) $(CPP) should be used instead of gcc -E

So my proposal would be to move this preprocessing to the Makefile and replace
gcc -E by $(CPP).
Comment 1 Jeroen Demeyer 2008-09-27 09:56:06 UTC
Created attachment 2963 [details]
Proposed patch
Comment 2 Wei-Lun Chao 2013-09-02 07:35:15 UTC
maybe replace $(CPP) by $(CC) -E ?