public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include
@ 2012-08-08 20:19 Roland McGrath
  2012-08-08 20:34 ` Joseph S. Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Roland McGrath @ 2012-08-08 20:19 UTC (permalink / raw)
  To: libc-ports

I'm doing a cross-build for arm-linux-gnueabi with trunk GCC.
There's an early error from a missing definition of GLRO.
I don't know how the build could be working for anybody without
this fix, but maybe there is some indirect difference caused by
the compiler.

Ok to commit (i.e. merge roland/arm-irel-ldsodefs)?


Thanks,
Roland

ports/ChangeLog.arm
	* sysdeps/arm/dl-irel.h: Include <ldsodefs.h>.

diff --git a/ports/sysdeps/arm/dl-irel.h b/ports/sysdeps/arm/dl-irel.h
index 5b1964e..292bc1a 100644
--- a/ports/sysdeps/arm/dl-irel.h
+++ b/ports/sysdeps/arm/dl-irel.h
@@ -1,6 +1,6 @@
 /* Machine-dependent ELF indirect relocation inline functions.
    ARM version.
-   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2009-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@
 
 #include <stdio.h>
 #include <unistd.h>
+#include <ldsodefs.h>
 
 #define ELF_MACHINE_IREL	1
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include
  2012-08-08 20:19 [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include Roland McGrath
@ 2012-08-08 20:34 ` Joseph S. Myers
  2012-08-08 20:57   ` Roland McGrath
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph S. Myers @ 2012-08-08 20:34 UTC (permalink / raw)
  To: Roland McGrath; +Cc: libc-ports

On Wed, 8 Aug 2012, Roland McGrath wrote:

> I'm doing a cross-build for arm-linux-gnueabi with trunk GCC.
> There's an early error from a missing definition of GLRO.
> I don't know how the build could be working for anybody without
> this fix, but maybe there is some indirect difference caused by
> the compiler.
> 
> Ok to commit (i.e. merge roland/arm-irel-ldsodefs)?

It's OK and adding missing #includes is one of the types of changes 
documented at <http://sourceware.org/glibc/wiki/Consensus> as not needing 
review, but what source file are you building to get this error and what 
header include order do you see when that file is built?  It looks like 
(as indicated e.g. by the ordering in the .d files) all the files that end 
up including dl-irel.h get ldsodefs.h included first for me.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include
  2012-08-08 20:34 ` Joseph S. Myers
@ 2012-08-08 20:57   ` Roland McGrath
  2012-08-08 21:06     ` Joseph S. Myers
  0 siblings, 1 reply; 5+ messages in thread
From: Roland McGrath @ 2012-08-08 20:57 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: libc-ports

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 992 bytes --]

> It's OK and adding missing #includes is one of the types of changes 
> documented at <http://sourceware.org/glibc/wiki/Consensus> as not needing 
> review, but what source file are you building to get this error and what 
> header include order do you see when that file is built?  It looks like 
> (as indicated e.g. by the ordering in the .d files) all the files that end 
> up including dl-irel.h get ldsodefs.h included first for me.

I know it's in the "obvious" category but I wanted to ping you just in case
this was uncovering some subtle problem in my build and you thought it
shouldn't be required.  I'll put it in now since on basic "include what you
use" principles dl-irel.h ought to have the #include.  But it may be
worthwhile to investigate it anyway.

The error hits csu/elf-init.c first, and I think it hit some other files
later.  I've attached elf-init.i from my failing compile in case you want
to puzzle out how its include order differs from yours.

Thanks,
Roland



[-- Attachment #2: elf-init.i.bz2 --]
[-- Type: application/octet-stream, Size: 34575 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include
  2012-08-08 20:57   ` Roland McGrath
@ 2012-08-08 21:06     ` Joseph S. Myers
  2012-08-08 21:11       ` Roland McGrath
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph S. Myers @ 2012-08-08 21:06 UTC (permalink / raw)
  To: Roland McGrath; +Cc: libc-ports

On Wed, 8 Aug 2012, Roland McGrath wrote:

> The error hits csu/elf-init.c first, and I think it hit some other files
> later.  I've attached elf-init.i from my failing compile in case you want
> to puzzle out how its include order differs from yours.

It looks like the issue with that file is specific to multi-arch-enabled 
builds, which include extra headers in that file - and since there are no 
multiarch/ sysdeps directories for ARM, multiarch is disabled by default 
(there's not much point in enabling it without code in glibc to use it, 
and the IFUNC support will still work for user shared libraries).

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include
  2012-08-08 21:06     ` Joseph S. Myers
@ 2012-08-08 21:11       ` Roland McGrath
  0 siblings, 0 replies; 5+ messages in thread
From: Roland McGrath @ 2012-08-08 21:11 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: libc-ports

> It looks like the issue with that file is specific to multi-arch-enabled 
> builds, which include extra headers in that file - and since there are no 
> multiarch/ sysdeps directories for ARM, multiarch is disabled by default 

I see.  I had --enable-multi-arch in my canonical generic set of configure
switches established for x86 and from when it was never the default.
Since it now defaults to on when it's useful, I'll change my configure lines.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-08 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 20:19 [PATCH roland/arm-irel-ldsodefs] ARM: add missing #include Roland McGrath
2012-08-08 20:34 ` Joseph S. Myers
2012-08-08 20:57   ` Roland McGrath
2012-08-08 21:06     ` Joseph S. Myers
2012-08-08 21:11       ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).