+ compiler-read_once-fix-build-failure-with-some-older-gcc.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: compiler, READ_ONCE: Fix build failure with some older GCC
has been added to the -mm tree.  Its filename is
     compiler-read_once-fix-build-failure-with-some-older-gcc.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/compiler-read_once-fix-build-failure-with-some-older-gcc.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/compiler-read_once-fix-build-failure-with-some-older-gcc.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Subject: compiler, READ_ONCE: Fix build failure with some older GCC

Some old versions of GCC doesn't handle __alias (or maybe a combination
of 'static __always_inline __alias') right.

GCC creates outline and unused copy of __read_once_size_check()
function in the object file which references memcpy and causes
the build failure:
	arch/x86/entry/vdso/vclock_gettime.o: In function `__read_once_size_check':
	vclock_gettime.c:(.text+0x5f): undefined reference to `memcpy'
	arch/x86/entry/vdso/vgetcpu.o: In function `__read_once_size_check':
	vgetcpu.c:(.text+0x2f): undefined reference to `memcpy'

We could avoid using alias to work around this problem.

Signed-off-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/compiler.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff -puN include/linux/compiler.h~compiler-read_once-fix-build-failure-with-some-older-gcc include/linux/compiler.h
--- a/include/linux/compiler.h~compiler-read_once-fix-build-failure-with-some-older-gcc
+++ a/include/linux/compiler.h
@@ -231,8 +231,11 @@ void __read_once_size_nocheck(const vola
 	__READ_ONCE_SIZE;
 }
 #else
-static __always_inline __alias(__read_once_size_check)
-void __read_once_size_nocheck(const volatile void *p, void *res, int size);
+static __always_inline
+void __read_once_size_nocheck(const volatile void *p, void *res, int size)
+{
+	__READ_ONCE_SIZE;
+}
 #endif
 
 static __always_inline void __write_once_size(volatile void *p, void *res, int size)
_

Patches currently in -mm which might be from aryabinin@xxxxxxxxxxxxx are

compiler-read_once-fix-build-failure-with-some-older-gcc.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux