Message ID | 20191011191554.10870-2-adhemerval.zanella@linaro.org |
---|---|
State | Accepted |
Commit | 765cdd0bffd77960ae852104fc4ea5edcdb8aed3 |
Headers | show |
Series | [1/3] ipc: Refactor sysvipc internal definitions | expand |
* Adhemerval Zanella: > diff --git a/include/sys/sem.h b/include/sys/sem.h > index b0fb201bd0..bab548c3f7 100644 > --- a/include/sys/sem.h > +++ b/include/sys/sem.h > @@ -1 +1,10 @@ > -#include <sysvipc/sys/sem.h> > +#ifndef _SYS_SEM_H > +# include <sysvipc/sys/sem.h> > + > +# ifndef _ISOMAC > + > +__typeof__ (semtimedop) __semtimedop attribute_hidden; > +libc_hidden_proto (__semtimedop) You don't need libc_hidden_proto if you use attribute_hidden. (You also need to drop libc_hidden_def if you don't use libc_hidden_proto.) Rest looks fine. Thanks, Florian
I'm seeing a build failure for i686-gnu I suspect is caused by this change. In file included from <command-line>: ./../include/libc-symbols.h:545:33: error: '__EI___semtimedop' aliased to undefined symbol '__GI___semtimedop' extern thread __typeof (name) __EI_##name \ ^~~~~ ./../include/libc-symbols.h:541:3: note: in expansion of macro '__hidden_ver2' __hidden_ver2 (, local, internal, name) ^~~~~~~~~~~~~ ./../include/libc-symbols.h:550:29: note: in expansion of macro '__hidden_ver1' # define hidden_def(name) __hidden_ver1(__GI_##name, name, name); ^~~~~~~~~~~~~ ./../include/libc-symbols.h:619:32: note: in expansion of macro 'hidden_def' # define libc_hidden_def(name) hidden_def (name) ^~~~~~~~~~ semtimedop.c:32:1: note: in expansion of macro 'libc_hidden_def' libc_hidden_def (__semtimedop) ^~~~~~~~~~~~~~~ https://sourceware.org/ml/libc-testresults/2019-q4/msg00085.html -- Joseph S. Myers joseph@codesourcery.com
* Joseph Myers: > I'm seeing a build failure for i686-gnu I suspect is caused by this > change. > > In file included from <command-line>: > ./../include/libc-symbols.h:545:33: error: '__EI___semtimedop' aliased to undefined symbol '__GI___semtimedop' > extern thread __typeof (name) __EI_##name \ > ^~~~~ > ./../include/libc-symbols.h:541:3: note: in expansion of macro '__hidden_ver2' > __hidden_ver2 (, local, internal, name) > ^~~~~~~~~~~~~ > ./../include/libc-symbols.h:550:29: note: in expansion of macro '__hidden_ver1' > # define hidden_def(name) __hidden_ver1(__GI_##name, name, name); > ^~~~~~~~~~~~~ > ./../include/libc-symbols.h:619:32: note: in expansion of macro 'hidden_def' > # define libc_hidden_def(name) hidden_def (name) > ^~~~~~~~~~ > semtimedop.c:32:1: note: in expansion of macro 'libc_hidden_def' > libc_hidden_def (__semtimedop) > ^~~~~~~~~~~~~~~ > > https://sourceware.org/ml/libc-testresults/2019-q4/msg00085.html This should fix it. Thanks, Florian 8<------------------------------------------------------------------8< Subject: Remove libc_hidden_def from __semtimedop stub This breaks the Hurd build after commit 765cdd0bffd77960ae852104f ("sysvipc: Implement semop based on semtimedop") added it to the stub. ----- sysvipc/semtimedop.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sysvipc/semtimedop.c b/sysvipc/semtimedop.c index 68707d6ade..a4b750c813 100644 --- a/sysvipc/semtimedop.c +++ b/sysvipc/semtimedop.c @@ -29,6 +29,5 @@ __semtimedop (int semid, struct sembuf *sops, size_t nsops, return -1; } weak_alias (__semtimedop, semtimedop) -libc_hidden_def (__semtimedop) stub_warning (semtimedop)
On Thu, 17 Oct 2019, Florian Weimer wrote: > This should fix it. > > Thanks, > Florian > > 8<------------------------------------------------------------------8< > Subject: Remove libc_hidden_def from __semtimedop stub > > This breaks the Hurd build after commit 765cdd0bffd77960ae852104f > ("sysvipc: Implement semop based on semtimedop") added it to the stub. Thanks, please commit. -- Joseph S. Myers joseph@codesourcery.com
On 17/10/2019 16:37, Florian Weimer wrote: > * Joseph Myers: > >> I'm seeing a build failure for i686-gnu I suspect is caused by this >> change. >> >> In file included from <command-line>: >> ./../include/libc-symbols.h:545:33: error: '__EI___semtimedop' aliased to undefined symbol '__GI___semtimedop' >> extern thread __typeof (name) __EI_##name \ >> ^~~~~ >> ./../include/libc-symbols.h:541:3: note: in expansion of macro '__hidden_ver2' >> __hidden_ver2 (, local, internal, name) >> ^~~~~~~~~~~~~ >> ./../include/libc-symbols.h:550:29: note: in expansion of macro '__hidden_ver1' >> # define hidden_def(name) __hidden_ver1(__GI_##name, name, name); >> ^~~~~~~~~~~~~ >> ./../include/libc-symbols.h:619:32: note: in expansion of macro 'hidden_def' >> # define libc_hidden_def(name) hidden_def (name) >> ^~~~~~~~~~ >> semtimedop.c:32:1: note: in expansion of macro 'libc_hidden_def' >> libc_hidden_def (__semtimedop) >> ^~~~~~~~~~~~~~~ >> >> https://sourceware.org/ml/libc-testresults/2019-q4/msg00085.html > > This should fix it. > > Thanks, > Florian > > 8<------------------------------------------------------------------8< > Subject: Remove libc_hidden_def from __semtimedop stub > > This breaks the Hurd build after commit 765cdd0bffd77960ae852104f > ("sysvipc: Implement semop based on semtimedop") added it to the stub. > > ----- > sysvipc/semtimedop.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sysvipc/semtimedop.c b/sysvipc/semtimedop.c > index 68707d6ade..a4b750c813 100644 > --- a/sysvipc/semtimedop.c > +++ b/sysvipc/semtimedop.c > @@ -29,6 +29,5 @@ __semtimedop (int semid, struct sembuf *sops, size_t nsops, > return -1; > } > weak_alias (__semtimedop, semtimedop) > -libc_hidden_def (__semtimedop) > > stub_warning (semtimedop) > Ugh, I though I removed it from last iteration, thanks for catching it.
diff --git a/include/sys/sem.h b/include/sys/sem.h index b0fb201bd0..bab548c3f7 100644 --- a/include/sys/sem.h +++ b/include/sys/sem.h @@ -1 +1,10 @@ -#include <sysvipc/sys/sem.h> +#ifndef _SYS_SEM_H +# include <sysvipc/sys/sem.h> + +# ifndef _ISOMAC + +__typeof__ (semtimedop) __semtimedop attribute_hidden; +libc_hidden_proto (__semtimedop) + +# endif +#endif diff --git a/sysdeps/unix/sysv/linux/semop.c b/sysdeps/unix/sysv/linux/semop.c index 687fdcb805..e111b9aa3d 100644 --- a/sysdeps/unix/sysv/linux/semop.c +++ b/sysdeps/unix/sysv/linux/semop.c @@ -26,9 +26,5 @@ int semop (int semid, struct sembuf *sops, size_t nsops) { -#ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS - return INLINE_SYSCALL_CALL (semop, semid, sops, nsops); -#else - return INLINE_SYSCALL_CALL (ipc, IPCOP_semop, semid, nsops, 0, sops); -#endif + return __semtimedop (semid, sops, nsops, NULL); } diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c index f34a7fb920..5f1b205c2b 100644 --- a/sysdeps/unix/sysv/linux/semtimedop.c +++ b/sysdeps/unix/sysv/linux/semtimedop.c @@ -24,8 +24,8 @@ /* Perform user-defined atomical operation of array of semaphores. */ int -semtimedop (int semid, struct sembuf *sops, size_t nsops, - const struct timespec *timeout) +__semtimedop (int semid, struct sembuf *sops, size_t nsops, + const struct timespec *timeout) { #ifdef __ASSUME_DIRECT_SYSVIPC_SYSCALLS return INLINE_SYSCALL_CALL (semtimedop, semid, sops, nsops, timeout); @@ -34,3 +34,5 @@ semtimedop (int semid, struct sembuf *sops, size_t nsops, SEMTIMEDOP_IPC_ARGS (nsops, sops, timeout)); #endif } +weak_alias (__semtimedop, semtimedop) +libc_hidden_def (__semtimedop) diff --git a/sysvipc/semtimedop.c b/sysvipc/semtimedop.c index 5ca4d47ee3..68707d6ade 100644 --- a/sysvipc/semtimedop.c +++ b/sysvipc/semtimedop.c @@ -22,11 +22,13 @@ /* Perform user-defined atomical operation of array of semaphores. */ int -semtimedop (int semid, struct sembuf *sops, size_t nsops, - const struct timespec *timeout) +__semtimedop (int semid, struct sembuf *sops, size_t nsops, + const struct timespec *timeout) { __set_errno (ENOSYS); return -1; } +weak_alias (__semtimedop, semtimedop) +libc_hidden_def (__semtimedop) stub_warning (semtimedop)