blob: 4a7919ff5b65b18331e6aee0035fca8eae876f47 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 6c6aecba19b3e7947100623532a41b6f16734ace Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rosen?= <jeremy.rosen@smile.fr>
3Date: Mon, 22 Aug 2016 16:09:25 +0200
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08004Subject: [PATCH] locale: fix hard-coded reference to gcc -E
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6When new version of compilers are published, they may not be compatible with
7older versions of software. This is particularly common when software is built
8with -Werror.
9
10Autotools provides a way for a user to specify the name of his compiler using a
11set of variables ($CC $CXX $CPP etc.). Those variables are used correctly when
12compiling glibc but the script used to generate transliterations in the locale/
13subdirectory directly calls the gcc binary to get the output of the
14preprocessor instead of using the $CPP variable provided by the build
15environment.
16
17This patch replaces the hard-coded reference to the gcc binary with the proper
18environment variable, thus allowing a user to override it.
19
20Upstream-Status: Submitted [https://sourceware.org/ml/libc-alpha/2016-08/msg00746.html]
21---
22 locale/gen-translit.pl | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
26index 30d3f2f195..e97653017c 100644
27--- a/locale/gen-translit.pl
28+++ b/locale/gen-translit.pl
29@@ -1,5 +1,5 @@
30 #!/usr/bin/perl -w
31-open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file";
32+open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file";
33
34
35 sub cstrlen {