_FORTIFY_SOURCE=3 fail for gcc 12/glibc 2.35

2022-05-06 Thread Petr Ovtchenkov
Hi, _FORTIFY_SOURCE=3 fail to compile with gcc 12/glibc 2.35. Used: (GCC) 12.0.1 20220504 (prerelease) glibc ec5b79aac768 (release/2.35/master) In file included from /x86_64-unknown-linux-gnu/usr/include/features.h:490, from .../x86_64-unknown-linux-gnu/usr/include/asse

[PATCH 2/2] drop _FORTIFY_SOURCE for host build

2022-05-06 Thread Petr Ovtchenkov
Check for _FORTIFY_SOURCE level was made for target, not for build host. This level may not satisfy to libc on host. Fortification for build tools looks insignificant, so just drop -D_FORTIFY_SOURCE=... definition for host compiler. --- lib-host/Makefile.am | 1 + libcpu/Makefile.am | 1 + 2 fil

[PATCH 1/2] support cross compilation

2022-05-06 Thread Petr Ovtchenkov
Possible problem with out-of-tree build expected --- Makefile.am | 2 +- configure.ac | 6 ++ lib-host/Makefile.am | 47 libcpu/Makefile.am | 11 +++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 l

[PATCH 0/2] cross-build support, updated

2022-05-06 Thread Petr Ovtchenkov
. Tricks in use only when cross-build detected. See also https://sourceware.org/bugzilla/show_bug.cgi?id=28891 Possible problem (not critical, IMHO): not tested for out-of-tree build. Petr Ovtchenkov (2): support cross compilation drop _FORTIFY_SOURCE for host build Makefile.am

Re: [PATCH 1/1] support cross compilation

2021-05-26 Thread Petr Ovtchenkov
On Wed, 26 May 2021 12:41:51 -0300 Érico Nogueira wrote: > > Yes, we really cross. It doesn't matter because > We always use the release tarballs, which already have the %_dis.h > files. This explains why we haven't hit any issues. > Anyway, couldn't you (re)use the distribution tarball gene

Re: [PATCH 1/1] support cross compilation

2021-05-26 Thread Petr Ovtchenkov
On Wed, 26 May 2021 10:09:31 -0300 Érico Nogueira wrote: > Hi! Are you sure this is necessary? In Void Linux, we cross compile > elfutils for arm and aarch64 without any issue, and I have built it a > few times for powerpc as well. > Hello! Yes, I am sure. I do not know about you process (chec

[PATCH 1/1] support cross compilation

2021-05-26 Thread Petr Ovtchenkov
Possible problem with out-of-tree build expected --- Makefile.am | 2 +- configure.ac | 6 ++ lib-host/Makefile.am | 47 libcpu/Makefile.am | 11 +++ 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 l