Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697554 - sys-libs/glibc-2.28-r6 : pthread_mutex_getprioceiling.c: In function ‘pthread_mutex_getprioceiling’: ../include/atomic.h:672:4: error: read-only variable ‘__atg100_val’ used as ‘asm’ output
Summary: sys-libs/glibc-2.28-r6 : pthread_mutex_getprioceiling.c: In function ‘pthread...
Status: RESOLVED DUPLICATE of bug 682008
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-12 12:36 UTC by Joakim Tjernlund
Modified: 2019-10-13 09:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2019-10-12 12:36:13 UTC
Building glibc-2.28-r6 on ppc I get this error:
In file included from ../sysdeps/nptl/lowlevellock.h:22:0,
                 from ../sysdeps/unix/sysv/linux/powerpc/lowlevellock.h:22,
                 from ../nptl/descr.h:29,
                 from ../sysdeps/powerpc/nptl/tls.h:50,
                 from ../include/errno.h:25,
                 from pthread_mutex_getprioceiling.c:20:
pthread_mutex_getprioceiling.c: In function ‘pthread_mutex_getprioceiling’:
../include/atomic.h:672:4: error: read-only variable ‘__atg100_val’ used as ‘asm’ output
    __asm ("" : "=r" (__atg100_val) : "0" (*(mem)));         \
    ^
pthread_mutex_getprioceiling.c:29:26: note: in expansion of macro ‘atomic_load_relaxed’
   if (__builtin_expect ((atomic_load_relaxed (&(mutex->__data.__kind))
                          ^
../o-iterator.mk:9: recipe for target '/var/tmp/portage/sys-libs/glibc-2.28-r6/work/build-ppc-powerpc-unknown-linux-gnu-nptl/nptl/pthread_mutex_getprioceiling.o' failed
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-10-12 12:54:52 UTC
1) Please attach the entire build log to this bug report.

2) Please post your `emerge --info` output in a comment.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-10-12 13:13:08 UTC
Sounds similar to https://bugs.gentoo.org/682008.
Comment 3 Joakim Tjernlund 2019-10-12 15:34:51 UTC
(In reply to Sergei Trofimovich from comment #2)
> Sounds similar to https://bugs.gentoo.org/682008.

That is exactly it, I too am building with gcc 4.9
Would be nice if this error could be worked around
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-10-12 18:59:33 UTC
There a re a few options:
1. Using newer compiler should just work.
2. Backporting a fix to an old compiler gcc. Might take a while (if feasible at all)/
3. Check if glibc was able to fix it in past history and we could backport something.

So far it's not clear why [1.] does not just work for you. Using pieces of toolchain from wildly different times is full of problems like this.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-10-13 09:31:22 UTC

*** This bug has been marked as a duplicate of bug 682008 ***