mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: [PATCH v2] add powerpc64 port
Date: Fri, 15 Apr 2016 22:38:33 +0200	[thread overview]
Message-ID: <20160415203832.GH22574@port70.net> (raw)
In-Reply-To: <20160414134213.GG22574@port70.net>

[-- Attachment #1: Type: text/plain, Size: 857 bytes --]

* Szabolcs Nagy <nsz@port70.net> [2016-04-14 15:42:13 +0200]:
> * Bobby Bingham <koorogi@koorogi.info> [2016-04-14 03:01:38 -0500]:
> > 
> > How important is it to match glibc here?
> > 
> 
> i think we don't care about abi compat
> (but it might be interesting to check how much abi
> difference there is between glibc and musl, i can
> do this if i can build a musl+glibc toolchain)
> 

attached some c++ abi comparisions

(the comparision was not entirely clean, it involved
various manual hacks, but most types and functions
should be compared correctly glibc vs musl)

two interesting gcc warnings:

powerpc64 elf_vrreg_t (both musl and glibc):
note: the ABI of passing aggregates with 16-byte alignment has changed in GCC 5

x86_64 struct inotify_event (musl only):
note: the ABI of passing struct with a flexible array member has changed in GCC 4.4


[-- Attachment #2: abi_type.powerpc64le.diff --]
[-- Type: text/x-diff, Size: 5984 bytes --]

--- abi_type.powerpc64le.glibc	2016-04-15 21:00:27.432246225 +0100
+++ abi_type.powerpc64le.musl	2016-04-15 20:57:39.000149371 +0100
@@ -1 +0,0 @@
-std::piecewise_construct
@@ -3 +2 @@
-CODE: _code, _code*, size (*) [16], align (*) [8]
+CODE: CODE, CODE*, size (*) [16], align (*) [8]
@@ -69 +68 @@
-__jmp_buf: long*, long (*) [64], size (*) [512], align (*) [16]
+__jmp_buf: unsigned long long*, unsigned long long (*) [66], size (*) [528], align (*) [8]
@@ -90,2 +89,2 @@
-elf_vrreg_t: __vector128, __vector128*, size (*) [16], align (*) [16]
-elf_vrregset_t: __vector128*, __vector128 (*) [34], size (*) [544], align (*) [16]
+elf_vrreg_t: elf_vrreg_t, elf_vrreg_t*, size (*) [16], align (*) [16]
+elf_vrregset_t: elf_vrreg_t*, elf_vrreg_t (*) [34], size (*) [544], align (*) [16]
@@ -94 +93 @@
-fd_mask: long, long*, size (*) [8], align (*) [8]
+fd_mask: unsigned long, unsigned long*, size (*) [8], align (*) [8]
@@ -97 +96 @@
-fexcept_t: unsigned int, unsigned int*, size (*) [4], align (*) [4]
+fexcept_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
@@ -100,2 +99,2 @@
-fpos_t: _G_fpos_t, _G_fpos_t*, size (*) [16], align (*) [8]
-fpregset_t: double*, double (*) [33], size (*) [264], align (*) [8]
+fpos_t: _G_fpos64_t, _G_fpos64_t*, size (*) [16], align (*) [8]
+fpregset_t: fpregset_t, fpregset_t*, size (*) [264], align (*) [8]
@@ -106,0 +106 @@
+greg_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
@@ -120,2 +120,2 @@
-int_fast16_t: long, long*, size (*) [8], align (*) [8]
-int_fast32_t: long, long*, size (*) [8], align (*) [8]
+int_fast16_t: int, int*, size (*) [4], align (*) [4]
+int_fast32_t: int, int*, size (*) [4], align (*) [4]
@@ -130 +130 @@
-jmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [656], align (*) [16]
+jmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [664], align (*) [8]
@@ -141 +141 @@
-mcontext_t: mcontext_t, mcontext_t*, size (*) [1272], align (*) [8]
+mcontext_t: sigcontext, sigcontext*, size (*) [1528], align (*) [8]
@@ -183,2 +183,2 @@
-pthread_rwlockattr_t: pthread_rwlockattr_t, pthread_rwlockattr_t*, size (*) [8], align (*) [8]
-pthread_spinlock_t: int, int volatile*, size (*) [4], align (*) [4]
+pthread_rwlockattr_t: pthread_rwlockattr_t, pthread_rwlockattr_t*, size (*) [8], align (*) [4]
+pthread_spinlock_t: int, int*, size (*) [4], align (*) [4]
@@ -187 +187 @@
-quad_t: long, long*, size (*) [8], align (*) [8]
+quad_t: long long, long long*, size (*) [8], align (*) [8]
@@ -190,2 +190,2 @@
-regmatch_t: regmatch_t, regmatch_t*, size (*) [8], align (*) [4]
-regoff_t: int, int*, size (*) [4], align (*) [4]
+regmatch_t: regmatch_t, regmatch_t*, size (*) [16], align (*) [8]
+regoff_t: long, long*, size (*) [8], align (*) [8]
@@ -193 +193 @@
-rlim_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
+rlim_t: unsigned long long, unsigned long long*, size (*) [8], align (*) [8]
@@ -195 +195 @@
-sem_t: sem_t, sem_t*, size (*) [32], align (*) [8]
+sem_t: sem_t, sem_t*, size (*) [32], align (*) [4]
@@ -205 +205 @@
-sigjmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [656], align (*) [16]
+sigjmp_buf: __jmp_buf_tag*, __jmp_buf_tag (*) [1], size (*) [664], align (*) [8]
@@ -213 +213 @@
-__jmp_buf_tag: __jmp_buf_tag, __jmp_buf_tag*, size (*) [656], align (*) [16]
+__jmp_buf_tag: __jmp_buf_tag, __jmp_buf_tag*, size (*) [664], align (*) [8]
@@ -229,2 +229,2 @@
-cmsghdr: cmsghdr, cmsghdr*, size (*) [16], align (*) [8]
-crypt_data: crypt_data, crypt_data*, size (*) [131232], align (*) [8]
+cmsghdr: cmsghdr, cmsghdr*, size (*) [16], align (*) [4]
+crypt_data: crypt_data, crypt_data*, size (*) [260], align (*) [4]
@@ -242,2 +242,2 @@
-ether_header: ether_header, ether_header*, size (*) [14], align (*) [1]
-ethhdr: ethhdr, ethhdr*, size (*) [14], align (*) [1]
+ether_header: ether_header, ether_header*, size (*) [14], align (*) [2]
+ethhdr: ethhdr, ethhdr*, size (*) [14], align (*) [2]
@@ -299 +299 @@
-lastlog: lastlog, lastlog*, size (*) [292], align (*) [4]
+lastlog: lastlog, lastlog*, size (*) [296], align (*) [8]
@@ -330 +330 @@
-ntptimeval: ntptimeval, ntptimeval*, size (*) [72], align (*) [8]
+ntptimeval: ntptimeval, ntptimeval*, size (*) [32], align (*) [8]
@@ -334,0 +335 @@
+prctl_mm_map: prctl_mm_map, prctl_mm_map*, size (*) [104], align (*) [8]
@@ -346,2 +347,2 @@
-rusage: rusage, rusage*, size (*) [144], align (*) [8]
-sched_param: sched_param, sched_param*, size (*) [4], align (*) [4]
+rusage: rusage, rusage*, size (*) [272], align (*) [8]
+sched_param: sched_param, sched_param*, size (*) [48], align (*) [8]
@@ -382,2 +383,2 @@
-sysinfo: sysinfo, sysinfo*, size (*) [112], align (*) [8]
-tcp_info: tcp_info, tcp_info*, size (*) [104], align (*) [4]
+sysinfo: sysinfo, sysinfo*, size (*) [368], align (*) [8]
+tcp_info: tcp_info, tcp_info*, size (*) [144], align (*) [8]
@@ -386,2 +387,2 @@
-termios: termios, termios*, size (*) [60], align (*) [4]
-tftphdr: tftphdr, tftphdr*, size (*) [5], align (*) [1]
+termios: termios, termios*, size (*) [44], align (*) [4]
+tftphdr: tftphdr, tftphdr*, size (*) [6], align (*) [2]
@@ -400 +401 @@
-utmpx: utmpx, utmpx*, size (*) [384], align (*) [4]
+utmpx: utmpx, utmpx*, size (*) [400], align (*) [8]
@@ -414 +415 @@
-u_quad_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
+u_quad_t: unsigned long long, unsigned long long*, size (*) [8], align (*) [8]
@@ -416 +417 @@
-ucontext_t: ucontext, ucontext*, size (*) [1440], align (*) [8]
+ucontext_t: ucontext, ucontext*, size (*) [1696], align (*) [8]
@@ -423,2 +424,2 @@
-uint_fast16_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
-uint_fast32_t: unsigned long, unsigned long*, size (*) [8], align (*) [8]
+uint_fast16_t: unsigned int, unsigned int*, size (*) [4], align (*) [4]
+uint_fast32_t: unsigned int, unsigned int*, size (*) [4], align (*) [4]
@@ -440 +441 @@
-vrregset_t: _libc_vrstate, _libc_vrstate*, size (*) [544], align (*) [16]
+vrregset_t: vrregset_t, vrregset_t*, size (*) [544], align (*) [8]

[-- Attachment #3: abi_func.powerpc64le.diff --]
[-- Type: text/x-diff, Size: 5518 bytes --]

--- abi_func.powerpc64le.glibc	2016-04-15 20:53:34.364008400 +0100
+++ abi_func.powerpc64le.musl	2016-04-15 20:11:08.522531385 +0100
@@ -1 +0,0 @@
-std::piecewise_construct
@@ -3 +2 @@
-void __assert_fail(char const*, char const*, unsigned int, char const*)
+void __assert_fail(char const*, char const*, int, char const*)
@@ -7,0 +7 @@
+int __flt_rounds()
@@ -12 +12 @@
-void __fpurge(_IO_FILE*)
+int __fpurge(_IO_FILE*)
@@ -13,0 +14 @@
+unsigned long __freadahead(_IO_FILE*)
@@ -14,0 +16,3 @@
+char const* __freadptr(_IO_FILE*, unsigned long*)
+void __freadptrinc(_IO_FILE*, unsigned long)
+void __fseterr(_IO_FILE*)
@@ -26,0 +31 @@
+int _flush_cache(void*, int, int)
@@ -28,0 +34,2 @@
+void _pthread_cleanup_pop(__ptcb*, int)
+void _pthread_cleanup_push(__ptcb*, void (*)(void*), void*)
@@ -96,0 +104,2 @@
+int cachectl(void*, int, int)
+int cacheflush(void*, int, int)
@@ -102,0 +112 @@
+void call_once(int*, void (*)())
@@ -166,0 +177,6 @@
+int cnd_broadcast(cnd_t*)
+void cnd_destroy(cnd_t*)
+int cnd_init(cnd_t*)
+int cnd_signal(cnd_t*)
+int cnd_timedwait(cnd_t*, mtx_t*, timespec const*)
+int cnd_wait(cnd_t*, mtx_t*)
@@ -300 +316 @@
-int fanotify_mark(int, unsigned int, unsigned long, int, char const*)
+int fanotify_mark(int, unsigned int, unsigned long long, int, char const*)
@@ -317 +333 @@
-int fegetexceptflag(unsigned int*, int)
+int fegetexceptflag(unsigned long*, int)
@@ -326 +342 @@
-int fesetexceptflag(unsigned int const*, int)
+int fesetexceptflag(unsigned long const*, int)
@@ -339 +355,2 @@
-int fgetpos(_IO_FILE*, _G_fpos_t*)
+char* fgetln(_IO_FILE*, unsigned long*)
+int fgetpos(_IO_FILE*, _G_fpos64_t*)
@@ -397 +414 @@
-int fsetpos(_IO_FILE*, _G_fpos_t const*)
+int fsetpos(_IO_FILE*, _G_fpos64_t const*)
@@ -436,0 +454 @@
+int getdents(int, dirent*, unsigned long)
@@ -493,0 +512 @@
+char* gets(char*)
@@ -506 +525 @@
-int gettimeofday(timeval*, timezone*)
+int gettimeofday(timeval*, void*)
@@ -509,3 +528,3 @@
-utmp* getutent()
-utmp* getutid(utmp const*)
-utmp* getutline(utmp const*)
+utmpx* getutent()
+utmpx* getutid(utmpx const*)
+utmpx* getutline(utmpx const*)
@@ -549,0 +569 @@
+char* index(char const*, int)
@@ -566 +586,3 @@
-int ioctl(int, unsigned long, ...)
+int ioctl(int, int, ...)
+int ioperm(unsigned long, unsigned long, int)
+int iopl(int)
@@ -587,0 +610 @@
+int issetugid()
@@ -650 +673 @@
-int lio_listio(int, aiocb* const*, int, sigevent*)
+int lio_listio(int, aiocb* const restrict*, int, sigevent*)
@@ -711,0 +735 @@
+void* memchr(void const*, int, unsigned long)
@@ -716,0 +741 @@
+void* memrchr(void const*, int, unsigned long)
@@ -756,0 +782,6 @@
+void mtx_destroy(mtx_t*)
+int mtx_init(mtx_t*, int)
+int mtx_lock(mtx_t*)
+int mtx_timedlock(mtx_t*, timespec const*)
+int mtx_trylock(mtx_t*)
+int mtx_unlock(mtx_t*)
@@ -804,0 +836 @@
+int posix_close(int, int)
@@ -842 +874 @@
-int prlimit(int, __rlimit_resource, rlimit const*, rlimit*)
+int prlimit(int, int, rlimit const*, rlimit*)
@@ -945,5 +977,5 @@
-int pthread_spin_destroy(int volatile*)
-int pthread_spin_init(int volatile*, int)
-int pthread_spin_lock(int volatile*)
-int pthread_spin_trylock(int volatile*)
-int pthread_spin_unlock(int volatile*)
+int pthread_spin_destroy(int*)
+int pthread_spin_init(int*, int)
+int pthread_spin_lock(int*)
+int pthread_spin_trylock(int*)
+int pthread_spin_unlock(int*)
@@ -951 +983 @@
-long ptrace(__ptrace_request, ...)
+long ptrace(int, ...)
@@ -963 +995 @@
-utmp* pututline(utmp const*)
+utmpx* pututline(utmpx const*)
@@ -989 +1021 @@
-int recvmmsg(int, mmsghdr*, unsigned int, int, timespec*)
+int recvmmsg(int, mmsghdr*, unsigned int, unsigned int, timespec*)
@@ -1014,0 +1047 @@
+char* rindex(char const*, int)
@@ -1063 +1096 @@
-int sendmmsg(int, mmsghdr*, unsigned int, int)
+int sendmmsg(int, mmsghdr*, unsigned int, unsigned int)
@@ -1178,0 +1212 @@
+char* strcasestr(char const*, char const*)
@@ -1179,0 +1214,2 @@
+char* strchr(char const*, int)
+char* strchrnul(char const*, int)
@@ -1188 +1224 @@
-char* strerror_r(int, char*, unsigned long)
+int strerror_r(int, char*, unsigned long)
@@ -1192,0 +1229,2 @@
+unsigned long strlcat(char*, char const*, unsigned long)
+unsigned long strlcpy(char*, char const*, unsigned long)
@@ -1200,0 +1239 @@
+char* strpbrk(char const*, char const*)
@@ -1201,0 +1241 @@
+char* strrchr(char const*, int)
@@ -1204,0 +1245 @@
+char* strstr(char const*, char const*)
@@ -1262,0 +1304,8 @@
+int thrd_create(unsigned long*, int (*)(void*), void*)
+unsigned long thrd_current()
+int thrd_detach(unsigned long)
+int thrd_equal(unsigned long, unsigned long)
+void thrd_exit(int)
+int thrd_join(unsigned long, int*)
+int thrd_sleep(timespec const*, timespec*)
+void thrd_yield()
@@ -1292,0 +1342,4 @@
+int tss_create(unsigned int*, void (*)(void*))
+void tss_delete(unsigned int)
+void* tss_get(unsigned int)
+int tss_set(unsigned int, void*)
@@ -1311 +1364 @@
-void updwtmp(char const*, utmp const*)
+void updwtmp(char const*, utmpx const*)
@@ -1345,3 +1398,3 @@
-int wait(void*)
-int wait3(void*, int, rusage*)
-int wait4(int, void*, int, rusage*)
+int wait(int*)
+int wait3(int*, int, rusage*)
+int wait4(int, int*, int, rusage*)
@@ -1357,0 +1411 @@
+wchar_t* wcschr(wchar_t const*, wchar_t)
@@ -1372,0 +1427,2 @@
+wchar_t* wcspbrk(wchar_t const*, wchar_t const*)
+wchar_t* wcsrchr(wchar_t const*, wchar_t)
@@ -1374,0 +1431 @@
+wchar_t* wcsstr(wchar_t const*, wchar_t const*)
@@ -1385,0 +1443 @@
+wchar_t* wcswcs(wchar_t const*, wchar_t const*)
@@ -1395,0 +1454 @@
+wchar_t* wmemchr(wchar_t const*, wchar_t, unsigned long)

  reply	other threads:[~2016-04-15 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04  5:26 Bobby Bingham
2016-04-13 23:05 ` Szabolcs Nagy
2016-04-13 23:13   ` Rich Felker
2016-04-14  0:58     ` Szabolcs Nagy
2016-04-14  8:01   ` Bobby Bingham
2016-04-14 13:42     ` Szabolcs Nagy
2016-04-15 20:38       ` Szabolcs Nagy [this message]
2016-04-16 17:09         ` Rich Felker
2016-04-28  1:38           ` Bobby Bingham
2016-04-28  2:07             ` Rich Felker
2016-04-30 20:15               ` Bobby Bingham
2016-04-14 19:14     ` Rich Felker
2016-04-15  0:55       ` Bobby Bingham
2016-04-15  2:08         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160415203832.GH22574@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).