This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH COMMITTED: Define class constants in sparc.cc


C++ technically requires a definition for a static const class member
even if the member is initialized in the class itself.  It turns out
that the g++ 4.1.2 on FC7 needs that definition when compiling
sparc.cc with -O0.

I committed this patch to add the required definitions.

Ian


2008-04-15  Ian Lance Taylor  <iant@google.com>

	* sparc.cc: Add definitions for Output_data_plt_sparc class
	constants.


Index: sparc.cc
===================================================================
RCS file: /cvs/src/src/gold/sparc.cc,v
retrieving revision 1.1
diff -u -r1.1 sparc.cc
--- sparc.cc	15 Apr 2008 05:16:51 -0000	1.1
+++ sparc.cc	15 Apr 2008 21:40:48 -0000
@@ -1078,6 +1078,25 @@
   unsigned int count_;
 };
 
+// Define the constants as required by C++ standard.
+
+template<int size, bool big_endian>
+const int Output_data_plt_sparc<size, big_endian>::base_plt_entry_size;
+
+template<int size, bool big_endian>
+const unsigned int
+Output_data_plt_sparc<size, big_endian>::plt_entries_per_block;
+
+template<int size, bool big_endian>
+const unsigned int Output_data_plt_sparc<size, big_endian>::plt_insn_chunk_size;
+
+template<int size, bool big_endian>
+const unsigned int
+Output_data_plt_sparc<size, big_endian>::plt_pointer_chunk_size;
+
+template<int size, bool big_endian>
+const unsigned int Output_data_plt_sparc<size, big_endian>::plt_block_size;
+
 // Create the PLT section.  The ordinary .got section is an argument,
 // since we need to refer to the start.
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]