This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: Fix locale/weight.h with GCC 3.5


On Wednesday 08 September 2004 06:57, Andreas Jaeger wrote:
> On Tuesday 07 September 2004 23:26, Roland McGrath wrote:
> > Can't you just make that #ifndef RESOLVE?
>
> Yeah!  That seems to work.  I'll do now some more tests and send a proper
> patch.

Here's a patch - it has been tested with GCC 3.3.  Testing with 3.4 is still 
in progress - and it works with 3.5 as far as I get (I run into an ICE in 
gcc).  All tests were done on AMD64.

Ok to commit?

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SUSE Linux AG, Maxfeldstr. 5, 90409 NÃrnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
2004-09-07  Andreas Jaeger  <aj@suse.de>


	* sysdeps/x86_64/dl-machine.h (elf_machine_rela_relative): Remove
	static, add always_inline attribute.
	(elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.

	* elf/dynamic-link.h (elf_get_dynamic_info): Make static
	dependend on !RESOLVE so that it's not defined in local
	scope.

	* locale/weight.h (findidx): Remove static, it's not supported
	anymore with GCC 3.5 in a block scope.
	* locale/weightwc.h (findidx): Likewise.
	* posix/regcomp.c (seek_collating_symbol_entry): Likewise.
	(lookup_collation_sequence_value): Likewise.
	(build_range_exp): Likewise.
	(build_collating_symbol): Likewise.
	* iconv/iconvconfig.c (write_output): Likewise.
	* elf/do-rel.h (elf_dynamic_do_rel): Likewise.

============================================================
Index: sysdeps/x86_64/dl-machine.h
--- sysdeps/x86_64/dl-machine.h	5 Mar 2004 10:14:47 -0000	1.25
+++ sysdeps/x86_64/dl-machine.h	8 Sep 2004 05:35:58 -0000
@@ -355,7 +386,8 @@ elf_machine_plt_value (struct link_map *
 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
    MAP is the object containing the reloc.  */
 
-static inline void
+inline void
+__attribute ((always_inline))
 elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
 		  const Elf64_Sym *sym, const struct r_found_version *version,
 		  void *const reloc_addr_arg)
@@ -520,7 +552,8 @@ elf_machine_rela (struct link_map *map, 
     }
 }
 
-static inline void
+inline void
+__attribute ((always_inline))
 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
 			   void *const reloc_addr_arg)
 {
@@ -529,7 +562,8 @@ elf_machine_rela_relative (Elf64_Addr l_
   *reloc_addr = l_addr + reloc->r_addend;
 }
 
-static inline void
+inline void
+__attribute ((always_inline))
 elf_machine_lazy_rel (struct link_map *map,
 		      Elf64_Addr l_addr, const Elf64_Rela *reloc)
 {
============================================================
Index: locale/weightwc.h
--- locale/weightwc.h	13 Jun 2003 20:44:58 -0000	1.9
+++ locale/weightwc.h	8 Sep 2004 05:35:58 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2001,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper, <drepper@cygnus.com>.
 
@@ -18,7 +18,7 @@
    02111-1307 USA.  */
 
 /* Find index of weight.  */
-static inline int32_t
+inline int32_t
 __attribute ((always_inline))
 findidx (const wint_t **cpp)
 {
============================================================
Index: locale/weight.h
--- locale/weight.h	11 Jun 2003 21:52:12 -0000	1.19
+++ locale/weight.h	8 Sep 2004 05:35:58 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper, <drepper@cygnus.com>.
 
@@ -18,7 +18,7 @@
    02111-1307 USA.  */
 
 /* Find index of weight.  */
-static inline int32_t
+inline int32_t
 __attribute ((always_inline))
 findidx (const unsigned char **cpp)
 {
============================================================
Index: elf/dynamic-link.h
--- elf/dynamic-link.h	6 Mar 2004 09:47:17 -0000	1.50
+++ elf/dynamic-link.h	8 Sep 2004 05:35:58 -0000
@@ -64,8 +64,10 @@ elf_machine_lazy_rel (struct link_map *m
 
 
 /* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */
-
-static inline void __attribute__ ((unused, always_inline))
+#ifndef RESOLVE
+static
+#endif
+inline void __attribute__ ((unused, always_inline))
 elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
 {
   ElfW(Dyn) *dyn = l->l_ld;
============================================================
Index: elf/do-rel.h
--- elf/do-rel.h	30 Jan 2003 17:36:34 -0000	1.32
+++ elf/do-rel.h	8 Sep 2004 05:35:59 -0000
@@ -49,7 +49,7 @@
    relocations; they should be set up to call _dl_runtime_resolve, rather
    than fully resolved now.  */
 
-static inline void __attribute__ ((always_inline))
+inline void __attribute__ ((always_inline))
 elf_dynamic_do_rel (struct link_map *map,
 		    ElfW(Addr) reladdr, ElfW(Addr) relsize,
 		    int lazy)
============================================================
Index: posix/regcomp.c
--- posix/regcomp.c	5 Mar 2004 10:43:54 -0000	1.80
+++ posix/regcomp.c	8 Sep 2004 05:36:00 -0000
@@ -2682,7 +2682,7 @@ parse_bracket_exp (regexp, dfa, token, s
      Seek the collating symbol entry correspondings to NAME.
      Return the index of the symbol in the SYMB_TABLE.  */
 
-  static inline int32_t
+  inline int32_t
   __attribute ((always_inline))
   seek_collating_symbol_entry (name, name_len)
 	 const unsigned char *name;
@@ -2715,7 +2715,7 @@ parse_bracket_exp (regexp, dfa, token, s
      Look up the collation sequence value of BR_ELEM.
      Return the value if succeeded, UINT_MAX otherwise.  */
 
-  static inline unsigned int
+  inline unsigned int
   __attribute ((always_inline))
   lookup_collation_sequence_value (br_elem)
 	 bracket_elem_t *br_elem;
@@ -2783,7 +2783,7 @@ parse_bracket_exp (regexp, dfa, token, s
      mbcset->range_ends, is a pointer argument sinse we may
      update it.  */
 
-  static inline reg_errcode_t
+  inline reg_errcode_t
   __attribute ((always_inline))
   build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
 	 re_charset_t *mbcset;
@@ -2866,7 +2866,7 @@ parse_bracket_exp (regexp, dfa, token, s
      COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
      pointer argument sinse we may update it.  */
 
-  static inline reg_errcode_t
+  inline reg_errcode_t
   __attribute ((always_inline))
   build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
 	 re_charset_t *mbcset;

Attachment: pgp00000.pgp
Description: PGP signature


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