diff options
author | Jacek Caban <jacek@codeweavers.com> | 2013-09-13 18:06:41 +0000 |
---|---|---|
committer | Kai Tietz <ktietz@gcc.gnu.org> | 2013-09-13 20:06:41 +0200 |
commit | 88b0e79e45b76cece89ee1ac4a2feca4524a9b55 (patch) | |
tree | c9142db87feb2cf94393c30e427ed094ad2e503d /gcc/config | |
parent | a1e51df97b9d2a61cb4a2c8c7a3f2caca6be1f89 (diff) | |
download | gcc-88b0e79e45b76cece89ee1ac4a2feca4524a9b55.zip gcc-88b0e79e45b76cece89ee1ac4a2feca4524a9b55.tar.gz gcc-88b0e79e45b76cece89ee1ac4a2feca4524a9b55.tar.bz2 |
c-target.def: New hook
2013-09-13 Jacek Caban <jacek@codeweavers.com>
* c-target.def: New hook
gcc/ChangeLog:
2013-09-13 Jacek Caban <jacek@codeweavers.com>
* config.gcc: Use new winnt-c.c target hooks
* config/t-winnt: New file
* config/winnt-c.c: New file
* doc/tm.texi.in: Document new hook
* doc/tm.texi: Regenerated
gcc/cp/Changelog:
2013-09-13 Jacek Caban <jacek@codeweavers.com>
* decl.c: Use new cxx_implicit_extern_c hook
gcc/testsuite/ChangeLog:
2013-09-13 Jacek Caban <jacek@codeweavers.com>
* g++.dg/abi/main.C: Added implicit C linkage tests
From-SVN: r202573
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/t-winnt | 22 | ||||
-rw-r--r-- | gcc/config/winnt-c.c | 39 |
2 files changed, 61 insertions, 0 deletions
diff --git a/gcc/config/t-winnt b/gcc/config/t-winnt new file mode 100644 index 0000000..1751622 --- /dev/null +++ b/gcc/config/t-winnt @@ -0,0 +1,22 @@ +# Copyright (C) 2013 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/>. + +winnt-c.o: config/winnt-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ + $(C_TARGET_H) $(C_TARGET_DEF_H) + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ + $< $(OUTPUT_OPTION) diff --git a/gcc/config/winnt-c.c b/gcc/config/winnt-c.c new file mode 100644 index 0000000..d52db62 --- /dev/null +++ b/gcc/config/winnt-c.c @@ -0,0 +1,39 @@ +/* Default C-family target hooks initializer. + Copyright (C) 2013 + 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/>. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "c-family/c-target.h" +#include "c-family/c-target-def.h" + +static bool +winnt_implicit_extern_c (const char *ident) +{ + return !strcmp(ident, "wmain") + || !strcmp(ident, "DllMain") + || !strcmp(ident, "WinMain") + || !strcmp(ident, "wWinMain"); +} + +#undef TARGET_CXX_IMPLICIT_EXTERN_C +#define TARGET_CXX_IMPLICIT_EXTERN_C winnt_implicit_extern_c + +struct gcc_targetcm targetcm = TARGETCM_INITIALIZER; |