* [PATCH] Don't use ./tmp0 for site.exp generation
@ 2011-04-19 14:17 Richard Guenther
2011-04-19 14:22 ` Rainer Orth
0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2011-04-19 14:17 UTC (permalink / raw)
To: gcc-patches
This patch sits in all my development trees because delta uses
tmp? named directories for storing intermediate files. This causes
a make check to fail.
Maybe there is an even better way to create a truly temporary file
name (that is even portable), but the following patch simply avoids
using tmp0 in favor of tmpDG.
Bootstrap and regtest running on x86_64-unknown-linux-gnu (not that
I expect any problems).
Ok for trunk?
Thanks,
Richard.
2011-04-19 Richard Guenther <rguenther@suse.de>
* Makefile.in (site.exp): Do not use tmp0 but tmpDG as temporary
file name.
Index: gcc/Makefile.in
===================================================================
--- gcc/Makefile.in (revision 172709)
+++ gcc/Makefile.in (working copy)
@@ -4837,39 +4837,39 @@ target_subdir = @target_subdir@
site.exp: ./config.status Makefile
@echo "Making a new config file..."
- -@rm -f ./tmp?
+ -@rm -f ./tmpDG
@$(STAMP) site.exp
-@mv site.exp site.bak
- @echo "## these variables are automatically generated by make ##" > ./tmp0
- @echo "# Do not edit here. If you wish to override these values" >> ./tmp0
- @echo "# add them to the last section" >> ./tmp0
- @echo "set rootme \"`${PWD_COMMAND}`\"" >> ./tmp0
- @echo "set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> ./tmp0
- @echo "set host_triplet $(host)" >> ./tmp0
- @echo "set build_triplet $(build)" >> ./tmp0
- @echo "set target_triplet $(target)" >> ./tmp0
- @echo "set target_alias $(target_noncanonical)" >> ./tmp0
- @echo "set libiconv \"$(LIBICONV)\"" >> ./tmp0
+ @echo "## these variables are automatically generated by make ##" > ./tmpDG
+ @echo "# Do not edit here. If you wish to override these values" >> ./tmpDG
+ @echo "# add them to the last section" >> ./tmpDG
+ @echo "set rootme \"`${PWD_COMMAND}`\"" >> ./tmpDG
+ @echo "set srcdir \"`cd ${srcdir}; ${PWD_COMMAND}`\"" >> ./tmpDG
+ @echo "set host_triplet $(host)" >> ./tmpDG
+ @echo "set build_triplet $(build)" >> ./tmpDG
+ @echo "set target_triplet $(target)" >> ./tmpDG
+ @echo "set target_alias $(target_noncanonical)" >> ./tmpDG
+ @echo "set libiconv \"$(LIBICONV)\"" >> ./tmpDG
# CFLAGS is set even though it's empty to show we reserve the right to set it.
- @echo "set CFLAGS \"\"" >> ./tmp0
- @echo "set CXXFLAGS \"\"" >> ./tmp0
- @echo "set HOSTCC \"$(CC)\"" >> ./tmp0
- @echo "set HOSTCFLAGS \"$(CFLAGS)\"" >> ./tmp0
+ @echo "set CFLAGS \"\"" >> ./tmpDG
+ @echo "set CXXFLAGS \"\"" >> ./tmpDG
+ @echo "set HOSTCC \"$(CC)\"" >> ./tmpDG
+ @echo "set HOSTCFLAGS \"$(CFLAGS)\"" >> ./tmpDG
# When running the tests we set GCC_EXEC_PREFIX to the install tree so that
# files that have already been installed there will be found. The -B option
# overrides it, so use of GCC_EXEC_PREFIX will not result in using GCC files
# from the install tree.
- @echo "set TEST_GCC_EXEC_PREFIX \"$(libdir)/gcc/\"" >> ./tmp0
- @echo "set TESTING_IN_BUILD_TREE 1" >> ./tmp0
- @echo "set HAVE_LIBSTDCXX_V3 1" >> ./tmp0
+ @echo "set TEST_GCC_EXEC_PREFIX \"$(libdir)/gcc/\"" >> ./tmpDG
+ @echo "set TESTING_IN_BUILD_TREE 1" >> ./tmpDG
+ @echo "set HAVE_LIBSTDCXX_V3 1" >> ./tmpDG
@if test "@enable_plugin@" = "yes" ; then \
- echo "set ENABLE_PLUGIN 1" >> ./tmp0; \
- echo "set PLUGINCC \"$(PLUGINCC)\"" >> ./tmp0; \
- echo "set PLUGINCFLAGS \"$(PLUGINCFLAGS)\"" >> ./tmp0; \
- echo "set GMPINC \"$(GMPINC)\"" >> ./tmp0; \
+ echo "set ENABLE_PLUGIN 1" >> ./tmpDG; \
+ echo "set PLUGINCC \"$(PLUGINCC)\"" >> ./tmpDG; \
+ echo "set PLUGINCFLAGS \"$(PLUGINCFLAGS)\"" >> ./tmpDG; \
+ echo "set GMPINC \"$(GMPINC)\"" >> ./tmpDG; \
fi
@if test "@enable_lto@" = "yes" ; then \
- echo "set ENABLE_LTO 1" >> ./tmp0; \
+ echo "set ENABLE_LTO 1" >> ./tmpDG; \
fi
# If newlib has been configured, we need to pass -B to gcc so it can find
# newlib's crt0.o if it exists. This will cause a "path prefix not used"
@@ -4882,36 +4882,36 @@ site.exp: ./config.status Makefile
# We also need to pass -L ../ld so that the linker can find ldscripts.
@if [ -d $(objdir)/../$(target_subdir)/newlib ] \
&& [ "${host}" != "${target}" ]; then \
- echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)/newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmp0; \
- echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)/newlib/\"" >> ./tmp0; \
- echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
- echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmp0; \
- echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmp0; \
+ echo "set newlib_cflags \"-I$(objdir)/../$(target_subdir)/newlib/targ-include -I\$$srcdir/../newlib/libc/include\"" >> ./tmpDG; \
+ echo "set newlib_ldflags \"-B$(objdir)/../$(target_subdir)/newlib/\"" >> ./tmpDG; \
+ echo "append CFLAGS \" \$$newlib_cflags\"" >> ./tmpDG; \
+ echo "append CXXFLAGS \" \$$newlib_cflags\"" >> ./tmpDG; \
+ echo "append LDFLAGS \" \$$newlib_ldflags\"" >> ./tmpDG; \
else true; \
fi
@if [ -d $(objdir)/../ld ] ; then \
- echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmp0; \
+ echo "append LDFLAGS \" -L$(objdir)/../ld\"" >> ./tmpDG; \
else true; \
fi
- echo "set tmpdir $(objdir)/testsuite" >> ./tmp0
- @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmp0
+ echo "set tmpdir $(objdir)/testsuite" >> ./tmpDG
+ @echo "set srcdir \"\$${srcdir}/testsuite\"" >> ./tmpDG
@if [ "X$(ALT_CC_UNDER_TEST)" != "X" ] ; then \
- echo "set ALT_CC_UNDER_TEST \"$(ALT_CC_UNDER_TEST)\"" >> ./tmp0; \
+ echo "set ALT_CC_UNDER_TEST \"$(ALT_CC_UNDER_TEST)\"" >> ./tmpDG; \
else true; \
fi
@if [ "X$(ALT_CXX_UNDER_TEST)" != "X" ] ; then \
- echo "set ALT_CXX_UNDER_TEST \"$(ALT_CXX_UNDER_TEST)\"" >> ./tmp0; \
+ echo "set ALT_CXX_UNDER_TEST \"$(ALT_CXX_UNDER_TEST)\"" >> ./tmpDG; \
else true; \
fi
@if [ "X$(COMPAT_OPTIONS)" != "X" ] ; then \
- echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./tmp0; \
+ echo "set COMPAT_OPTIONS \"$(COMPAT_OPTIONS)\"" >> ./tmpDG; \
else true; \
fi
- @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
- @cat ./tmp0 > site.exp
+ @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmpDG
+ @cat ./tmpDG > site.exp
@cat site.bak | sed \
-e '1,/^## All variables above are.*##/ d' >> site.exp
- -@rm -f ./tmp?
+ -@rm -f ./tmpDG
CHECK_TARGETS = check-gcc @check_languages@
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Don't use ./tmp0 for site.exp generation
2011-04-19 14:17 [PATCH] Don't use ./tmp0 for site.exp generation Richard Guenther
@ 2011-04-19 14:22 ` Rainer Orth
2011-04-19 14:50 ` Richard Guenther
0 siblings, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2011-04-19 14:22 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches, Ralf Wildenhues
Richard Guenther <rguenther@suse.de> writes:
> This patch sits in all my development trees because delta uses
> tmp? named directories for storing intermediate files. This causes
> a make check to fail.
>
> Maybe there is an even better way to create a truly temporary file
> name (that is even portable), but the following patch simply avoids
> using tmp0 in favor of tmpDG.
Perhaps it would be better to use site.tmp to match current git
automake?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Don't use ./tmp0 for site.exp generation
2011-04-19 14:22 ` Rainer Orth
@ 2011-04-19 14:50 ` Richard Guenther
2011-04-21 14:02 ` Rainer Orth
0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2011-04-19 14:50 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Ralf Wildenhues
On Tue, 19 Apr 2011, Rainer Orth wrote:
> Richard Guenther <rguenther@suse.de> writes:
>
> > This patch sits in all my development trees because delta uses
> > tmp? named directories for storing intermediate files. This causes
> > a make check to fail.
> >
> > Maybe there is an even better way to create a truly temporary file
> > name (that is even portable), but the following patch simply avoids
> > using tmp0 in favor of tmpDG.
>
> Perhaps it would be better to use site.tmp to match current git
> automake?
I can certainly use any other temporary name, just the tmp0 use
is annoying ;) It's a matter of a single search-and-replace.
Richard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Don't use ./tmp0 for site.exp generation
2011-04-19 14:50 ` Richard Guenther
@ 2011-04-21 14:02 ` Rainer Orth
2011-04-21 14:06 ` Richard Guenther
0 siblings, 1 reply; 5+ messages in thread
From: Rainer Orth @ 2011-04-21 14:02 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches, Ralf Wildenhues
Richard Guenther <rguenther@suse.de> writes:
>> Perhaps it would be better to use site.tmp to match current git
>> automake?
>
> I can certainly use any other temporary name, just the tmp0 use
> is annoying ;) It's a matter of a single search-and-replace.
Although this isn't exactly part of the testsuite itself, given that
site.tmp is used in all automake-generated Makefile.in's, I'd say go
ahead. gcc/Makefile.in seems to be the only (hand-written) Makefile.in
that uses something else.
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Don't use ./tmp0 for site.exp generation
2011-04-21 14:02 ` Rainer Orth
@ 2011-04-21 14:06 ` Richard Guenther
0 siblings, 0 replies; 5+ messages in thread
From: Richard Guenther @ 2011-04-21 14:06 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Ralf Wildenhues
On Thu, 21 Apr 2011, Rainer Orth wrote:
> Richard Guenther <rguenther@suse.de> writes:
>
> >> Perhaps it would be better to use site.tmp to match current git
> >> automake?
> >
> > I can certainly use any other temporary name, just the tmp0 use
> > is annoying ;) It's a matter of a single search-and-replace.
>
> Although this isn't exactly part of the testsuite itself, given that
> site.tmp is used in all automake-generated Makefile.in's, I'd say go
> ahead. gcc/Makefile.in seems to be the only (hand-written) Makefile.in
> that uses something else.
Committed using site.tmp.
Richard.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-21 13:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19 14:17 [PATCH] Don't use ./tmp0 for site.exp generation Richard Guenther
2011-04-19 14:22 ` Rainer Orth
2011-04-19 14:50 ` Richard Guenther
2011-04-21 14:02 ` Rainer Orth
2011-04-21 14:06 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).