This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC] Convert gcc subdir to autoconf 2.5x, now!
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: neroden at twcny dot rr dot com (Nathanael Nerode)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 04 Dec 2003 13:50:14 -0800
- Subject: Re: [PATCH/RFC] Convert gcc subdir to autoconf 2.5x, now!
- References: <20031204202738.GA18148@twcny.rr.com>
neroden@twcny.rr.com (Nathanael Nerode) writes:
> This updates the GCC directory to use autoconf 2.57 (or 2.58 for that matter;
> I welcome advice as to the most appropriate prerequisite version).
I'm very glad to see this patch.
I am fine with this going into 3.4, especially since there are
bugfixes pending on it, but more testing would be a good idea.
I'd also like to suggest that you do one of your adjustments
differently:
> -[ cat > conftest.lit <<EOF
> +[ dnl # For autoconf 2.5x, must protect trailing spaces with @&t@.
> +cat > conftest.lit <<EOF
> 0000 10000000 00000000 017a0001 781a0004 .........z..x...
> 0010 01000000 12000000 18000000 00000000 ................
> - 0020 08000000 04080000 0044 .........D
> + 0020 08000000 04080000 0044 .........D @&t@
I don't like relying on trailing spaces. I think it would be better
to remove them, and strip the trailing space from the objdump output,
like this:
if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
| tail -3 | sed 's/[ ^I][ ^I]*$//' > conftest.got \
where the ^I-s are literal tab characters, of course. As long as
we're mucking with this it would probably be a good idea to introduce
another temporary file so that the && is looking at an interesting
exit status (the exit status of a pipeline is the exit status of the
last program in the pipeline, not anything cumulative):
if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .eh_frame conftest.o > conftest.raw 2>/dev/null \
&& tail -3 < conftest.raw | sed 's/[ ^I][ ^I]*$//' > conftest.got \
zw