diff mbox series

[RFC,23/34] elf: Stop including tls.h in ldsodefs.h

Message ID 20230319151017.531737-24-bugaevc@gmail.com
State New
Headers show
Series The rest of the x86_64-gnu port | expand

Commit Message

Sergey Bugaev March 19, 2023, 3:10 p.m. UTC
Nothing in there needs tls.h

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
---
 sysdeps/generic/ldsodefs.h | 1 -
 1 file changed, 1 deletion(-)

Comments

Samuel Thibault April 2, 2023, 11:20 p.m. UTC | #1
Sergey Bugaev, le dim. 19 mars 2023 18:10:06 +0300, a ecrit:
> Nothing in there needs tls.h

Ok but includers might be erroneously relying on it. Did you try to
build various configurations, to make sure that this isn't breaking any?

> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/generic/ldsodefs.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
> index c99dad77..5f21bc63 100644
> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
> @@ -38,7 +38,6 @@
>  #include <dl-fixup-attribute.h>
>  #include <libc-lock.h>
>  #include <hp-timing.h>
> -#include <tls.h>
>  #include <list_t.h>
>  
>  __BEGIN_DECLS
> -- 
> 2.39.2
>
Sergey Bugaev April 3, 2023, 9:26 a.m. UTC | #2
On Mon, Apr 3, 2023 at 2:20 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Sergey Bugaev, le dim. 19 mars 2023 18:10:06 +0300, a ecrit:
> > Nothing in there needs tls.h
>
> Ok but includers might be erroneously relying on it. Did you try to
> build various configurations, to make sure that this isn't breaking any?

There (unfortunately) still are multiple other ways that <ldsodefs.h>
ends up including <tls.h> (in particular through <link.h>), so this
change should not immediately break anything. See the cover letter for
some more details about this.

That being said, it sounds like glibc would benefit from a run of
https://include-what-you-use.org/ over the code base. This would both
trim the extraneous includes (such as this #include <tls.h>) and add
the ones that are required, but (as you're saying, erroneously) not
explicitly mentioned.

Sergey
Samuel Thibault April 10, 2023, 9:26 p.m. UTC | #3
Applied, thanks!

Sergey Bugaev, le dim. 19 mars 2023 18:10:06 +0300, a ecrit:
> Nothing in there needs tls.h
> 
> Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
> ---
>  sysdeps/generic/ldsodefs.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
> index c99dad77..5f21bc63 100644
> --- a/sysdeps/generic/ldsodefs.h
> +++ b/sysdeps/generic/ldsodefs.h
> @@ -38,7 +38,6 @@
>  #include <dl-fixup-attribute.h>
>  #include <libc-lock.h>
>  #include <hp-timing.h>
> -#include <tls.h>
>  #include <list_t.h>
>  
>  __BEGIN_DECLS
> -- 
> 2.39.2
>
diff mbox series

Patch

diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index c99dad77..5f21bc63 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -38,7 +38,6 @@ 
 #include <dl-fixup-attribute.h>
 #include <libc-lock.h>
 #include <hp-timing.h>
-#include <tls.h>
 #include <list_t.h>
 
 __BEGIN_DECLS