summaryrefslogtreecommitdiff
path: root/libcc1
diff options
context:
space:
mode:
authorSergio Durigan Junior <sergiodj@redhat.com>2017-11-16 18:15:33 +0000
committerJeff Law <law@gcc.gnu.org>2017-11-16 11:15:33 -0700
commit9d99775c34864d030d97b6a5ea5987616ff37468 (patch)
tree2de8be5e2648fec8c4e0080f09145cb6a267409c /libcc1
parentdc03239c2d8607a0f5cdb13a220bcf0c7f8ed7cd (diff)
Makefile.am: Remove references to c-compiler-name.h and cp-compiler-name.h
* Makefile.am: Remove references to c-compiler-name.h and cp-compiler-name.h * Makefile.in: Regenerate. * compiler-name.hh: New file. * libcc1.cc: Don't include c-compiler-name.h. Include compiler-name.hh. * libcp1.cc: Don't include cp-compiler-name.h. Include compiler-name.hh. Co-Authored-By: Pedro Alves <palves@redhat.com> From-SVN: r254838
Diffstat (limited to 'libcc1')
-rw-r--r--libcc1/ChangeLog12
-rw-r--r--libcc1/Makefile.am18
-rw-r--r--libcc1/Makefile.in29
-rw-r--r--libcc1/compiler-name.hh29
-rw-r--r--libcc1/libcc1.cc2
-rw-r--r--libcc1/libcp1.cc2
6 files changed, 47 insertions, 45 deletions
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog
index 2194aa8a5a4..ba77d02902d 100644
--- a/libcc1/ChangeLog
+++ b/libcc1/ChangeLog
@@ -1,3 +1,15 @@
+2017-11-16 Sergio Durigan Junior <sergiodj@redhat.com>
+ Pedro Alves <palves@redhat.com>
+
+ * Makefile.am: Remove references to c-compiler-name.h and
+ cp-compiler-name.h
+ * Makefile.in: Regenerate.
+ * compiler-name.hh: New file.
+ * libcc1.cc: Don't include c-compiler-name.h. Include
+ compiler-name.hh.
+ * libcp1.cc: Don't include cp-compiler-name.h. Include
+ compiler-name.hh.
+
2017-11-01 Nathan Sidwell <nathan@acm.org>
* libcp1plugin.cc (plugin_build_decl): Use
diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
index 5e61a92a26b..cdba5a50b23 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
@@ -45,24 +45,6 @@ plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
cc1lib_LTLIBRARIES = libcc1.la
endif
-BUILT_SOURCES = c-compiler-name.h cp-compiler-name.h
-MOSTLYCLEANFILES = c-compiler-name.h cp-compiler-name.h
-
-# Put this in a header so we don't run sed for each compilation. This
-# is also simpler to debug as one can easily see the constant.
-# FIXME: compute it in configure.ac and output it in config.status, or
-# introduce timestamp files for some indirection to avoid rebuilding it
-# every time.
-c-compiler-name.h: Makefile
- -rm -f $@T
- echo "#define C_COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@T
- mv $@T $@ # $(SHELL) $(srcdir)/../move-if-change $@T $@
-
-cp-compiler-name.h: Makefile
- -rm -f $@T
- echo "#define CP_COMPILER_NAME \"`echo g++ | sed '$(transform)'`\"" > $@T
- mv $@T $@ # $(SHELL) $(srcdir)/../move-if-change $@T $@
-
shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
marshall.cc marshall.hh rpc.hh status.hh
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 54babb02a49..47be10025ad 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -307,8 +307,6 @@ plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
cc1libdir = $(libdir)/$(libsuffix)
@ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la
@ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
-BUILT_SOURCES = c-compiler-name.h cp-compiler-name.h
-MOSTLYCLEANFILES = c-compiler-name.h cp-compiler-name.h
shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \
marshall.cc marshall.hh rpc.hh status.hh
@@ -344,7 +342,7 @@ libcc1_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(libcc1_la_LDFLAGS) $(LTLDFLAGS) -o $@
-all: $(BUILT_SOURCES) cc1plugin-config.h
+all: cc1plugin-config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
@@ -567,15 +565,13 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
all-am: Makefile $(LTLIBRARIES) cc1plugin-config.h
installdirs:
for dir in "$(DESTDIR)$(cc1libdir)" "$(DESTDIR)$(plugindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -595,7 +591,6 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
- -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
@@ -606,7 +601,6 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-cc1libLTLIBRARIES clean-generic clean-libtool \
@@ -681,7 +675,7 @@ ps-am:
uninstall-am: uninstall-cc1libLTLIBRARIES uninstall-pluginLTLIBRARIES
-.MAKE: all check install install-am install-strip
+.MAKE: all install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-cc1libLTLIBRARIES clean-generic clean-libtool \
@@ -702,21 +696,6 @@ uninstall-am: uninstall-cc1libLTLIBRARIES uninstall-pluginLTLIBRARIES
override CXXFLAGS := $(filter-out -fsanitize=address,$(CXXFLAGS))
override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
-# Put this in a header so we don't run sed for each compilation. This
-# is also simpler to debug as one can easily see the constant.
-# FIXME: compute it in configure.ac and output it in config.status, or
-# introduce timestamp files for some indirection to avoid rebuilding it
-# every time.
-c-compiler-name.h: Makefile
- -rm -f $@T
- echo "#define C_COMPILER_NAME \"`echo gcc | sed '$(transform)'`\"" > $@T
- mv $@T $@ # $(SHELL) $(srcdir)/../move-if-change $@T $@
-
-cp-compiler-name.h: Makefile
- -rm -f $@T
- echo "#define CP_COMPILER_NAME \"`echo g++ | sed '$(transform)'`\"" > $@T
- mv $@T $@ # $(SHELL) $(srcdir)/../move-if-change $@T $@
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/libcc1/compiler-name.hh b/libcc1/compiler-name.hh
new file mode 100644
index 00000000000..30cdc41838b
--- /dev/null
+++ b/libcc1/compiler-name.hh
@@ -0,0 +1,29 @@
+/* The names of the compilers we use.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#ifndef COMPILER_NAME_H
+#define COMPILER_NAME_H
+
+// C compiler name.
+#define C_COMPILER_NAME "gcc"
+
+// C++ compiler name.
+#define CP_COMPILER_NAME "g++"
+
+#endif // ! COMPILER_NAME_H
diff --git a/libcc1/libcc1.cc b/libcc1/libcc1.cc
index 0ef6c112dae..1a20dd941a4 100644
--- a/libcc1/libcc1.cc
+++ b/libcc1/libcc1.cc
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "libiberty.h"
#include "xregex.h"
#include "findcomp.hh"
-#include "c-compiler-name.h"
+#include "compiler-name.hh"
#include "intl.h"
struct libcc1;
diff --git a/libcc1/libcp1.cc b/libcc1/libcp1.cc
index bbd8488af93..b4f9710e0e2 100644
--- a/libcc1/libcp1.cc
+++ b/libcc1/libcp1.cc
@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "libiberty.h"
#include "xregex.h"
#include "findcomp.hh"
-#include "cp-compiler-name.h"
+#include "compiler-name.hh"
#include "intl.h"
struct libcp1;