linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] remove old GCC version implementation
@ 2018-10-31 11:14 Mathieu Malaterre
  2018-10-31 11:28 ` Miguel Ojeda
  2018-11-26 10:44 ` Mathieu Malaterre
  0 siblings, 2 replies; 5+ messages in thread
From: Mathieu Malaterre @ 2018-10-31 11:14 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Mathieu Malaterre, Michal Marek, linux-kbuild, linux-kernel

GCC 4.6 is the minimum supported now.

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 scripts/mod/file2alias.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 28a61665bb9c..4b59564d4706 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -83,11 +83,7 @@ extern struct devtable *__start___devtable[], *__stop___devtable[];
 #endif /* __MACH__ */
 
 #if !defined(__used)
-# if __GNUC__ == 3 && __GNUC_MINOR__ < 3
-#  define __used			__attribute__((__unused__))
-# else
-#  define __used			__attribute__((__used__))
-# endif
+#define __used			__attribute__((__used__))
 #endif
 
 /* Define a variable f that holds the value of field f of struct devid
-- 
2.11.0


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

* Re: [PATCH] remove old GCC version implementation
  2018-10-31 11:14 [PATCH] remove old GCC version implementation Mathieu Malaterre
@ 2018-10-31 11:28 ` Miguel Ojeda
  2018-10-31 16:13   ` Masahiro Yamada
  2018-11-26 10:44 ` Mathieu Malaterre
  1 sibling, 1 reply; 5+ messages in thread
From: Miguel Ojeda @ 2018-10-31 11:28 UTC (permalink / raw)
  To: malat; +Cc: Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel

On Wed, Oct 31, 2018 at 12:18 PM Mathieu Malaterre <malat@debian.org> wrote:
>
> GCC 4.6 is the minimum supported now.
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>  scripts/mod/file2alias.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 28a61665bb9c..4b59564d4706 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -83,11 +83,7 @@ extern struct devtable *__start___devtable[], *__stop___devtable[];
>  #endif /* __MACH__ */
>
>  #if !defined(__used)
> -# if __GNUC__ == 3 && __GNUC_MINOR__ < 3
> -#  define __used                       __attribute__((__unused__))
> -# else
> -#  define __used                       __attribute__((__used__))
> -# endif
> +#define __used                 __attribute__((__used__))
>  #endif
>

Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>

By the way, is it possible that scripts/ and similar stuff uses
directly include/linux/compiler_attributes.h (whenever it hits
mainline, see https://github.com/ojeda/linux/blob/compiler-attributes/include/linux/compiler_attributes.h
)? It is a header that does not depend on anything, so it could easily
be shared; and would avoid having to maintain two sets of attributes.
Let me know, I can take a look at it if you think it is a good idea.

Cheers,
Miguel

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

* Re: [PATCH] remove old GCC version implementation
  2018-10-31 11:28 ` Miguel Ojeda
@ 2018-10-31 16:13   ` Masahiro Yamada
  2018-11-17  8:00     ` Miguel Ojeda
  0 siblings, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2018-10-31 16:13 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Mathieu Malaterre, Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List

On Wed, Oct 31, 2018 at 8:28 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Wed, Oct 31, 2018 at 12:18 PM Mathieu Malaterre <malat@debian.org> wrote:
> >
> > GCC 4.6 is the minimum supported now.
> >
> > Signed-off-by: Mathieu Malaterre <malat@debian.org>
> > ---
> >  scripts/mod/file2alias.c | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> > index 28a61665bb9c..4b59564d4706 100644
> > --- a/scripts/mod/file2alias.c
> > +++ b/scripts/mod/file2alias.c
> > @@ -83,11 +83,7 @@ extern struct devtable *__start___devtable[], *__stop___devtable[];
> >  #endif /* __MACH__ */
> >
> >  #if !defined(__used)
> > -# if __GNUC__ == 3 && __GNUC_MINOR__ < 3
> > -#  define __used                       __attribute__((__unused__))
> > -# else
> > -#  define __used                       __attribute__((__used__))
> > -# endif
> > +#define __used                 __attribute__((__used__))
> >  #endif
> >
>
> Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
>
> By the way, is it possible that scripts/ and similar stuff uses
> directly include/linux/compiler_attributes.h (whenever it hits
> mainline, see https://github.com/ojeda/linux/blob/compiler-attributes/include/linux/compiler_attributes.h
> )? It is a header that does not depend on anything, so it could easily
> be shared; and would avoid having to maintain two sets of attributes.
> Let me know, I can take a look at it if you think it is a good idea.

No.
I want to share a header file between kernel and host-tools
only when we need to do so.


In this case, it is wrong to use the linker magic for the host tool
if you look at the so ugly #if defined(__MACH__) part.






> Cheers,
> Miguel



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH] remove old GCC version implementation
  2018-10-31 16:13   ` Masahiro Yamada
@ 2018-11-17  8:00     ` Miguel Ojeda
  0 siblings, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2018-11-17  8:00 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: malat, Michal Marek, linux-kbuild, linux-kernel

On Wed, Oct 31, 2018 at 5:14 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Wed, Oct 31, 2018 at 8:28 PM Miguel Ojeda
> <miguel.ojeda.sandonis@gmail.com> wrote:
> >
> > By the way, is it possible that scripts/ and similar stuff uses
> > directly include/linux/compiler_attributes.h (whenever it hits
> > mainline, see https://github.com/ojeda/linux/blob/compiler-attributes/include/linux/compiler_attributes.h
> > )? It is a header that does not depend on anything, so it could easily
> > be shared; and would avoid having to maintain two sets of attributes.
> > Let me know, I can take a look at it if you think it is a good idea.

Landed a couple of weeks ago.

> No.
> I want to share a header file between kernel and host-tools
> only when we need to do so.
>
> In this case, it is wrong to use the linker magic for the host tool
> if you look at the so ugly #if defined(__MACH__) part.

Do you mean this line?

  #define SECTION(name)   __attribute__((section("__TEXT, " #name)))

I would say having exceptions is fine, i.e. the idea was to reduce
"duplicated" definitions. In this case, the #define has a different
name and style, so I would say it is clear.

Anyway, if the policy is not sharing headers at all, that is fine!

Cheers,
Miguel

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

* Re: [PATCH] remove old GCC version implementation
  2018-10-31 11:14 [PATCH] remove old GCC version implementation Mathieu Malaterre
  2018-10-31 11:28 ` Miguel Ojeda
@ 2018-11-26 10:44 ` Mathieu Malaterre
  1 sibling, 0 replies; 5+ messages in thread
From: Mathieu Malaterre @ 2018-11-26 10:44 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Michal Marek, linux-kbuild, LKML

On Wed, Oct 31, 2018 at 12:15 PM Mathieu Malaterre <malat@debian.org> wrote:
>
> GCC 4.6 is the minimum supported now.
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
> ---
>  scripts/mod/file2alias.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 28a61665bb9c..4b59564d4706 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -83,11 +83,7 @@ extern struct devtable *__start___devtable[], *__stop___devtable[];
>  #endif /* __MACH__ */
>
>  #if !defined(__used)
> -# if __GNUC__ == 3 && __GNUC_MINOR__ < 3
> -#  define __used                       __attribute__((__unused__))
> -# else
> -#  define __used                       __attribute__((__used__))
> -# endif
> +#define __used                 __attribute__((__used__))
>  #endif

Superseded by:

https://patchwork.kernel.org/patch/10693483/

>  /* Define a variable f that holds the value of field f of struct devid
> --
> 2.11.0
>

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

end of thread, other threads:[~2018-11-26 10:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-31 11:14 [PATCH] remove old GCC version implementation Mathieu Malaterre
2018-10-31 11:28 ` Miguel Ojeda
2018-10-31 16:13   ` Masahiro Yamada
2018-11-17  8:00     ` Miguel Ojeda
2018-11-26 10:44 ` Mathieu Malaterre

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 NNTP newsgroup(s).