Created attachment 123794 [details] [review] [PATCH] pulsecore: Fix incorrect architecture mapping on sparc64. Hello! While debugging build problems of Firefox on sparc64 in Debian [1], I discovered that one of the reasons the build is failing is an incorrect detection of the architecture due to the wrong assumption that gcc defines __sparc64__ on sparc64. However, this is not correct as can be easily verified: root@landau:~# echo | gcc -E -dM - |grep __sparc64__ root@landau:~# echo | gcc -E -dM - |grep __sparc__ #define __sparc__ 1 root@landau:~# echo | gcc -E -dM - |grep __arch64__ #define __arch64__ 1 root@landau:~# uname -m sparc64 root@landau:~# dpkg --print-architecture sparc64 root@landau:~# I have discovered the same problem in systemd, too, and have already opened a pull request to fix the problem [2]. The attached patch fixes the bug for pulseaudio. This particular bug might the reason why pulseaudio's testsuite fails on sparc64 with [3]: FAIL: once-test =============== Running suite(s): Once 0%: Checks: 1, Failures: 1, Errors: 0 tests/once-test.c:74:F:once:once_test:0: Assertion 'pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) == 0' failed FAIL once-test (exit status: 1) Cheers, Adrian > [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824449 > [2] https://github.com/systemd/systemd/pull/3274 > [3] https://buildd.debian.org/status/fetch.php?pkg=pulseaudio&arch=sparc64&ver=8.0-3&stamp=1461452303
Comment on attachment 123794 [details] [review] [PATCH] pulsecore: Fix incorrect architecture mapping on sparc64. Review of attachment 123794 [details] [review]: ----------------------------------------------------------------- ::: src/pulsecore/atomic.h @@ +201,4 @@ > > return (v); > } > +#elif defined(__sparc__) && defined(__arch64__) I'm wondering if we might break some other/older compiler with this change. Any way to verify this?
CC'ing Brian Cameron Brian, not sure if you're still involved in any of this -- comments?
(In reply to Arun Raghavan from comment #1) > I'm wondering if we might break some other/older compiler with this change. > Any way to verify this? Very unlikely. According to David Miller, the definition "sparc64" was never valid [1]. For reference, David Miller has been the primary person behind the SPARC port of the Linux kernel since the 90ies [2]. Cheers, Adrian > [1] http://marc.info/?l=linux-sparc&m=146341133910751&w=2 > [2] https://en.wikipedia.org/wiki/David_S._Miller
Oh, and we fixed the same issue already in systemd [1]. Adrian > [1] https://github.com/systemd/systemd/commit/cd042078df2151d7824abf91107a0d4a8716e54f
Fair enough, I've pushed this out to next now (so it'll be in PA 10.0).
(In reply to Arun Raghavan from comment #5) > Fair enough, I've pushed this out to next now (so it'll be in PA 10.0). Thank you :).
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.