This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remember configure's options for later recall
On Fri, Sep 29, 2000 at 10:04:53AM -0700, Richard Henderson wrote:
> On Fri, Sep 29, 2000 at 11:29:18AM -0400, Phil Edwards wrote:
> > This also gets rid of the duplicate --with's. Thanks for reminding me.
>
> Forgotten patch?
Nope, just waiting to see if there were any more comments.
2000-09-29 Phil Edwards <pme@sources.redhat.com>
* configure: Save configure arguments to gcc/configargs.c.
* gcc/Makefile.in (xgcc,cpp): Build that file.
* gcc/gcc.c (main): Use arguments in '-v' output.
Index: configure
===================================================================
RCS file: /cvs/gcc/egcs/configure,v
retrieving revision 1.28
diff -u -3 -r1.28 configure
--- configure 2000/08/14 18:08:42 1.28
+++ configure 2000/09/29 19:11:48
@@ -400,6 +400,14 @@
esac
done
+# Remember configure arguments for later.
+cat > gcc/configargs.c <<EOF
+/* Generated automatically. */
+extern const char * const configuration_arguments;
+const char * const configuration_arguments = "$0 $arguments";
+EOF
+
+
# process host and target
# Do some error checking and defaulting for the host and target type.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.516
diff -u -3 -r1.516 Makefile.in
--- Makefile.in 2000/09/25 22:34:53 1.516
+++ Makefile.in 2000/09/29 19:11:48
@@ -913,17 +913,17 @@
# to avoid confusion if the current directory is in the path
# and CC is `gcc'. It is renamed to `gcc' when it is installed.
xgcc$(exeext): gcc.o gccspec.o version.o intl.o prefix.o \
- version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
+ version.o configargs.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o gccspec.o intl.o \
- prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
+ prefix.o version.o configargs.o $(EXTRA_GCC_OBJS) $(LIBS)
# cpp is to cpp0 as gcc is to cc1.
# The only difference from xgcc is that it's linked with cppspec.o
# instead of gccspec.o.
cpp$(exeext): gcc.o cppspec.o version.o intl.o prefix.o \
- version.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
+ version.o configargs.o $(LIBDEPS) $(EXTRA_GCC_OBJS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ gcc.o cppspec.o intl.o \
- prefix.o version.o $(EXTRA_GCC_OBJS) $(LIBS)
+ prefix.o version.o configargs.o $(EXTRA_GCC_OBJS) $(LIBS)
# Dump a specs file to make -B./ read these specs over installed ones.
specs: xgcc$(exeext)
@@ -1204,6 +1204,8 @@
dumpvers: dumpvers.c
version.o: version.c version.h
+
+configargs.o: configargs.c
ggc-common.o: ggc-common.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
flags.h $(GGC_H) varray.h hash.h
Index: gcc/gcc.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gcc.c,v
retrieving revision 1.169
diff -u -3 -r1.169 gcc.c
--- gcc.c 2000/09/26 17:28:06 1.169
+++ gcc.c 2000/09/29 19:11:49
@@ -5496,7 +5496,10 @@
if (verbose_flag)
{
+ extern const char * const configuration_arguments;
int n;
+
+ notice ("Configured with: %s\n", configuration_arguments);
/* compiler_version is truncated at the first space when initialized
from version string, so truncate version_string at the first space