From: Petr Ovtchenkov <ptr@void-ptr.info> (by way of Petr Ovtchenkov <ptr@void-ptr.info>)
To: elfutils-devel@sourceware.org
Subject: [PATCH 2/2] drop _FORTIFY_SOURCE for host build
Date: Fri, 24 Jun 2022 04:30:28 -0000 [thread overview]
Message-ID: <20220506174504.10952-3-ptr@void-ptr.info> (raw)
Message-ID: <20220624043028.2yPSCE_e2pW9lP_DCSBQWhYcZdjyh54eDSSfkujMB2U@z> (raw)
In-Reply-To: <20220506174504.10952-1-ptr@void-ptr.info>
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 files changed, 2 insertions(+)
diff --git a/lib-host/Makefile.am b/lib-host/Makefile.am
index 9316c8ed..9b6ea77d 100644
--- a/lib-host/Makefile.am
+++ b/lib-host/Makefile.am
@@ -36,6 +36,7 @@ AM_CPPFLAGS += -D_GNU_SOURCE -I$(srcdir)/../lib -I$(srcdir)/../libelf
noinst_LIBRARIES = libeu.a
$(libeu_a_OBJECTS): CC=${CC_FOR_BUILD}
+$(libeu_a_OBJECTS): CFLAGS=${CPPFLAGS} $(fpic_CFLAGS)
libeu_a_SOURCES = ../lib/xstrdup.c ../lib/xstrndup.c ../lib/xmalloc.c ../lib/next_prime.c \
../lib/crc32.c ../lib/crc32_file.c \
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index 8da743d4..9a1b4a8e 100644
--- a/libcpu/Makefile.am
+++ b/libcpu/Makefile.am
@@ -32,6 +32,7 @@ if CROSS
i386_gendis_LINK = ${CC_FOR_BUILD} ${LDFLAGS} -o $@
$(i386_gendis_OBJECTS): CC=${CC_FOR_BUILD}
+$(i386_gendis_OBJECTS): CFLAGS=$(CPPFLAGS)
endif
include $(top_srcdir)/config/eu.am
--
2.35.1.1.ge5a6898900
next prev parent reply other threads:[~2022-06-24 4:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-06 17:45 [PATCH 0/2] cross-build support, updated Petr Ovtchenkov
2022-05-06 17:45 ` [PATCH 1/2] support cross compilation Petr Ovtchenkov
2022-06-24 4:29 ` Petr Ovtchenkov
2022-05-06 17:45 ` Petr Ovtchenkov [this message]
2022-06-24 4:30 ` [PATCH 2/2] drop _FORTIFY_SOURCE for host build Petr Ovtchenkov
2022-06-24 4:28 ` [PATCH 0/2] cross-build support, updated Petr Ovtchenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220506174504.10952-3-ptr@void-ptr.info \
--to=ptr@void-ptr.info \
--cc=elfutils-devel@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).