[PATCH v5] Define PTHREAD_STACK_MIN to sysconf(_SC_THREAD_STACK_MIN)
Khem Raj
raj.khem@gmail.com
Fri Jul 16 22:17:49 GMT 2021
On Mon, Jul 12, 2021 at 12:51 PM Florian Weimer via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> * Maxim Kuvyrkov via Libc-alpha:
>
> > Hi H.J.,
> >
> > This breaks GCC’s libgomp build on at least aarch64-linux-gnu:
> >
> > /builds/destdir/x86_64-pc-linux-gnu/aarch64-linux-gnu/bin/ld: .libs/env.o: in function `initialize_env':
> > /snapshots/gcc.git~master/libgomp/env.c:1536: undefined reference to `sysconf'
> > /snapshots/gcc.git~master/libgomp/env.c:1538: undefined reference to `sysconf'
> > /snapshots/gcc.git~master/libgomp/env.c:1539: undefined reference to `sysconf'
> > /builds/destdir/x86_64-pc-linux-gnu/aarch64-linux-gnu/bin/ld: .libs/proc.o: in function `gomp_init_num_threads':
> > /snapshots/gcc.git~master/libgomp/config/linux/proc.c:85: undefined reference to `sysconf'
> > /snapshots/gcc.git~master/libgomp/config/linux/proc.c:143: undefined reference to `sysconf'
> > /snapshots/gcc.git~master/libgomp/config/linux/proc.c:174: more undefined references to `sysconf' follow
> > collect2: error: ld returned 1 exit status
> > make[4]: *** [Makefile:728: libgomp.la] Error 1
> >
> > Both GCC and Glibc are tip of trunk.
> >
> > Would you please take a look? Please let me know if it doesn’t easily
> > reproduce and I’ll take a look.
>
> I pushed a patch today that should fix this on the glibc side:
>
> Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN
> <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=aaacde11f2e814814f>
>
> It contains some magic that happens to fix GCC for now. Jakub is
> working on a patch that fixes the libgomp issue as well (the standard
> header #include within the hidden-visibility area is invalid):
>
> <https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574960.html>
>
I am seeing few packages failing since they use PTHREAD_STACK_MIN as constant
see https://errors.yoctoproject.org/Errors/Build/124520/
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list