This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] locale: fix hard-coded reference to gcc -E




On 24/08/2016 19:39, Mike Frysinger wrote:
On 24 Aug 2016 09:57, Jérémy Rosen wrote:
[...]

diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
index 30d3f2f..7b287fa 100644
--- a/locale/gen-translit.pl
+++ b/locale/gen-translit.pl
@@ -1,5 +1,5 @@
  #!/usr/bin/perl -w
-open F, "cat C-translit.h.in | gcc -E - |" || die "Cannot preprocess input file";
+open F, 'cat C-translit.h.in | ${CPP:-gcc -E} - |' || die "Cannot preprocess input file";
should this go even further with:
   ${CPP:-${CC} -E}
-mike
I'm not sure this is a good idea... $CC and $CPP are normally both set by autotools, so the chance of CC being set and not CPP are pretty low. This happens if someone manually runs the script and explicitely sets $CC but not $CPP. A rare case since the script itself doesn't use $CC anywhere else.

moreover, if the script is run manually, the chances are high that $CC won't be set at all. An even more conservative

${CPP:-{CC:-gcc} -E}

would cover all bases, but I personally think it makes things unreadable for no real-world gain.

This is, of course, a matter of taste and I will gladly submit a V2 with this change if that is the recommanded way

Regards
Jeremy


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