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

Re: Unofficial sparc64 porterboxes? (For problem unreproducible in Qemu)



On 05/16/2016 09:58 AM, Christian Seiler wrote:
> My problem is that under qemu-system-sparc64 [2] I simply cannot
> reproduce this problem, the test suite of mksh passes when compiled
> against dietlibc. (The other bugs that I could reproduce, see e.g.
> the problems in the sid version [3], I was able to fix in dietlibc
> in experimental.)

Btw, I spotted a potential problem in dietlibc as it tests for sparc64
with "#if defined(__sparc64__)" which never works since __sparc64__
is not defined on sparc64.

Instead, gcc defines __arch64__ on top of __sparc__. Could you have
a look at dietlibc if this might cause any problems?

Here the proof:

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:~#

and:

glaubitz@deb4g:~/debian$ cat test.c
#include <stdio.h>

int main () {

#if defined(__sparc__) && defined(__arch64__)
  printf("I'm on sparc64\n");
#endif

  return 0;
}

glaubitz@deb4g:~/debian$ gcc -o test test.c
glaubitz@deb4g:~/debian$ ./test
I'm on sparc64
glaubitz@deb4g:~/debian$

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: