]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
plugin.texi (Building GCC plugins): Update to C++.
authorJoey Ye <joey.ye@arm.com>
Tue, 14 Jan 2014 07:29:25 +0000 (07:29 +0000)
committerJoey Ye <jye2@gcc.gnu.org>
Tue, 14 Jan 2014 07:29:25 +0000 (07:29 +0000)
2014-01-14  Joey Ye  <joey.ye@arm.com>

        * doc/plugin.texi (Building GCC plugins): Update to C++.

From-SVN: r206597

gcc/ChangeLog
gcc/doc/plugins.texi

index 53428a637e9004ba0535aa01909432d411056c9d..3a832d0e898c1e423e00a9f621076525009676ed 100644 (file)
@@ -1,3 +1,7 @@
+2014-01-14  Joey Ye  <joey.ye@arm.com>
+
+       * doc/plugin.texi (Building GCC plugins): Update to C++.
+
 2014-01-14  Kirill Yukhin  <kirill.yukhin@intel.com>
 
        * config/i386/avx512erintrin.h (_mm_rcp28_round_sd): New.
index f1983808b06d2877e5e4f9eaac10294af15b0792..a283a7162aa60d2ca52ae6b87387dc805165c16b 100644 (file)
@@ -465,18 +465,18 @@ integer numbers, so a plugin could ensure it is built for GCC 4.7 with
 The following GNU Makefile excerpt shows how to build a simple plugin:
 
 @smallexample
-GCC=gcc
-PLUGIN_SOURCE_FILES= plugin1.c plugin2.c
-PLUGIN_OBJECT_FILES= $(patsubst %.c,%.o,$(PLUGIN_SOURCE_FILES))
-GCCPLUGINS_DIR:= $(shell $(GCC) -print-file-name=plugin)
-CFLAGS+= -I$(GCCPLUGINS_DIR)/include -fPIC -O2
-
-plugin.so: $(PLUGIN_OBJECT_FILES)
-   $(GCC) -shared $^ -o $@@
+HOST_GCC=g++
+TARGET_GCC=gcc
+PLUGIN_SOURCE_FILES= plugin1.c plugin2.cc
+GCCPLUGINS_DIR:= $(shell $(TARGET_GCC) -print-file-name=plugin)
+CXXFLAGS+= -I$(GCCPLUGINS_DIR)/include -fPIC -fno-rtti -O2
+
+plugin.so: $(PLUGIN_SOURCE_FILES)
+   $(HOST_GCC) -shared $(CXXFLAGS) $^ -o $@@
 @end smallexample
 
-A single source file plugin may be built with @code{gcc -I`gcc
--print-file-name=plugin`/include -fPIC -shared -O2 plugin.c -o
+A single source file plugin may be built with @code{g++ -I`gcc
+-print-file-name=plugin`/include -fPIC -shared -fno-rtti -O2 plugin.c -o
 plugin.so}, using backquote shell syntax to query the @file{plugin}
 directory.