From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9914 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH v2] add powerpc64 port Date: Fri, 15 Apr 2016 22:38:33 +0200 Message-ID: <20160415203832.GH22574@port70.net> References: <1459747571-9123-1-git-send-email-koorogi@koorogi.info> <20160413230506.GE22574@port70.net> <20160414080138.GA23694@dora.lan> <20160414134213.GG22574@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="VbJkn9YxBvnuCH5J" X-Trace: ger.gmane.org 1460752728 22779 80.91.229.3 (15 Apr 2016 20:38:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Apr 2016 20:38:48 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9927-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 15 22:38:48 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1arAVr-00023h-GV for gllmg-musl@m.gmane.org; Fri, 15 Apr 2016 22:38:47 +0200 Original-Received: (qmail 22461 invoked by uid 550); 15 Apr 2016 20:38:45 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22441 invoked from network); 15 Apr 2016 20:38:44 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20160414134213.GG22574@port70.net> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9914 Archived-At: --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Szabolcs Nagy [2016-04-14 15:42:13 +0200]: > * Bobby Bingham [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 --VbJkn9YxBvnuCH5J Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="abi_type.powerpc64le.diff" --- 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] --VbJkn9YxBvnuCH5J Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="abi_func.powerpc64le.diff" --- 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) --VbJkn9YxBvnuCH5J--