Re: [PATCH 1/2] libphobos: fix CET for non-glibc targets

2021-12-28 Thread Alex Xu (Hello71) via Gcc-patches
Excerpts from ibuc...@gdcproject.org's message of December 20, 2021 4:00 pm: >> On 20/12/2021 16:41 Alex Xu (Hello71) wrote: >> >> >> Excerpts from ibuc...@gdcproject.org's message of December 20, 2021 8:56 am: >> >> On 20/12/2021 01:08 A

Re: [PATCH 1/2] libphobos: fix CET for non-glibc targets

2021-12-20 Thread Alex Xu (Hello71) via Gcc-patches
Excerpts from ibuc...@gdcproject.org's message of December 20, 2021 8:56 am: >> On 20/12/2021 01:08 Alex Xu (Hello71) via Gcc-patches >> wrote: >> >> >> On musl, linking against libphobos fails because it requires ucontext >> but is not explic

[PATCH 2/2] libphobos: don't compile empty switchcontext.S

2021-12-19 Thread Alex Xu (Hello71) via Gcc-patches
If it does not contain any files, then there is no point compiling it. Skipping this saves some milliseconds and ~650 bytes in libgphobos.a. --- libphobos/configure.ac| 1 + libphobos/libdruntime/Makefile.am | 2 ++ .../libdruntime/config/x86/switchcontext.S

[PATCH 1/2] libphobos: fix CET for non-glibc targets

2021-12-19 Thread Alex Xu (Hello71) via Gcc-patches
On musl, linking against libphobos fails because it requires ucontext but is not explicitly linked against it. This is caused by configure assuming that it is implemented in assembly, but it is actually not implemented. This silently works on other libcs because context API does not require an exte