[llvm-commits] [dragonegg] r114800 - in /dragonegg/trunk: llvm-abi-default.cpp llvm-backend.cpp llvm-convert.cpp llvm-debug.cpp llvm-types.cpp x86/llvm-target.cpp
Duncan Sands
baldrick at free.fr
Sun Sep 26 00:47:46 PDT 2010
Author: baldrick
Date: Sun Sep 26 02:47:46 2010
New Revision: 114800
URL: http://llvm.org/viewvc/llvm-project?rev=114800&view=rev
Log:
Some versions of gcc give a compile error when building with -pedantic
because system headers define getopt with 'throw()', while gcc headers
define getopt without the exception specification. Work around this by
turning off gcc's declaration. Part of PR8229.
Modified:
dragonegg/trunk/llvm-abi-default.cpp
dragonegg/trunk/llvm-backend.cpp
dragonegg/trunk/llvm-convert.cpp
dragonegg/trunk/llvm-debug.cpp
dragonegg/trunk/llvm-types.cpp
dragonegg/trunk/x86/llvm-target.cpp
Modified: dragonegg/trunk/llvm-abi-default.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-abi-default.cpp?rev=114800&r1=114799&r2=114800&view=diff
==============================================================================
--- dragonegg/trunk/llvm-abi-default.cpp (original)
+++ dragonegg/trunk/llvm-abi-default.cpp Sun Sep 26 02:47:46 2010
@@ -7,6 +7,8 @@
// GCC headers
extern "C" {
#include "config.h"
+// Stop GCC declaring 'getopt' as it can clash with the system's declaration.
+#undef HAVE_DECL_GETOPT
#include "system.h"
#include "coretypes.h"
#include "target.h"
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=114800&r1=114799&r2=114800&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Sun Sep 26 02:47:46 2010
@@ -66,6 +66,8 @@
// GCC headers
extern "C" {
#include "config.h"
+// Stop GCC declaring 'getopt' as it can clash with the system's declaration.
+#undef HAVE_DECL_GETOPT
#include "system.h"
#include "coretypes.h"
#include "target.h"
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=114800&r1=114799&r2=114800&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Sun Sep 26 02:47:46 2010
@@ -58,6 +58,8 @@
// GCC headers
extern "C" {
#include "config.h"
+// Stop GCC declaring 'getopt' as it can clash with the system's declaration.
+#undef HAVE_DECL_GETOPT
#include "system.h"
#include "coretypes.h"
#include "target.h"
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=114800&r1=114799&r2=114800&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sun Sep 26 02:47:46 2010
@@ -46,6 +46,8 @@
// GCC headers
extern "C" {
#include "config.h"
+// Stop GCC declaring 'getopt' as it can clash with the system's declaration.
+#undef HAVE_DECL_GETOPT
#include "system.h"
#include "coretypes.h"
#include "target.h"
Modified: dragonegg/trunk/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-types.cpp?rev=114800&r1=114799&r2=114800&view=diff
==============================================================================
--- dragonegg/trunk/llvm-types.cpp (original)
+++ dragonegg/trunk/llvm-types.cpp Sun Sep 26 02:47:46 2010
@@ -50,6 +50,8 @@
// GCC headers
extern "C" {
#include "config.h"
+// Stop GCC declaring 'getopt' as it can clash with the system's declaration.
+#undef HAVE_DECL_GETOPT
#include "system.h"
#include "coretypes.h"
#include "target.h"
Modified: dragonegg/trunk/x86/llvm-target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/x86/llvm-target.cpp?rev=114800&r1=114799&r2=114800&view=diff
==============================================================================
--- dragonegg/trunk/x86/llvm-target.cpp (original)
+++ dragonegg/trunk/x86/llvm-target.cpp Sun Sep 26 02:47:46 2010
@@ -41,6 +41,8 @@
// GCC headers
extern "C" {
#include "config.h"
+// Stop GCC declaring 'getopt' as it can clash with the system's declaration.
+#undef HAVE_DECL_GETOPT
#include "system.h"
#include "coretypes.h"
#include "target.h"
More information about the llvm-commits
mailing list