From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 5/7] tpm2-abrmd: fix build with BR2_FORTIFY_SOURCE_1
Date: Tue, 15 Jan 2019 11:15:20 +0100 [thread overview]
Message-ID: <20190115101522.21042-5-peter@korsgaard.com> (raw)
In-Reply-To: <20190115101522.21042-1-peter@korsgaard.com>
The configure script passes -U FORTIFY_SOURCE -D FORTIFY_SOURCE=2 by
default, which conflicts with BR2_FORTIFY_SOURCE_1 as -Werror is used:
<cross>-gcc .. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 .. -D_FORTIFY_SOURCE=1
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
Disable this so the FORTIFY_SOURCE flags in TARGET_CFLAGS (if any) is used
instead.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/tpm2-abrmd/tpm2-abrmd.mk | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/package/tpm2-abrmd/tpm2-abrmd.mk b/package/tpm2-abrmd/tpm2-abrmd.mk
index 2834615ac3..31f19f5d01 100644
--- a/package/tpm2-abrmd/tpm2-abrmd.mk
+++ b/package/tpm2-abrmd/tpm2-abrmd.mk
@@ -11,10 +11,13 @@ TPM2_ABRMD_LICENSE_FILES = LICENSE
TPM2_ABRMD_INSTALL_STAGING = YES
TPM2_ABRMD_DEPENDENCIES = dbus libglib2 tpm2-tss host-pkgconf
-# -fstack-protector-all is used by default. Disable that so the
-# BR2_SSP_* options in the toolchain wrapper are used instead
+# -fstack-protector-all and FORTIFY_SOURCE=2 is used by
+# default. Disable that so the BR2_SSP_* / BR2_FORTIFY_SOURCE_* options
+# in the toolchain wrapper and CFLAGS are used instead
TPM2_ABRMD_CONF_ENV = \
- ax_cv_check_cflags___________Werror_______fstack_protector_all=no
+ ax_cv_check_cflags___________Werror_______fstack_protector_all=no \
+ ax_cv_check_ccppflags___________Werror_______U_FORTIFY_SOURCE=no \
+ ax_cv_check_ccppflags___________Werror_______D_FORTIFY_SOURCE_2=no
TPM2_ABRMD_CONF_OPTS += \
--with-systemdsystemunitdir=$(if $(BR2_INIT_SYSTEMD),/usr/lib/systemd/system,no) \
--
2.11.0
next prev parent reply other threads:[~2019-01-15 10:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 10:15 [Buildroot] [PATCH v2 1/7] tpm2-tss: do not enforce -fstack-protector-all Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 2/7] tpm2-tss: fix build with BR2_FORTIFY_SOURCE_1 Peter Korsgaard
2019-01-16 13:26 ` Peter Korsgaard
2019-01-25 7:28 ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 3/7] tpm2-tools: always disable hardening options Peter Korsgaard
2019-01-16 13:25 ` Peter Korsgaard
2019-01-25 7:28 ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 4/7] tpm2-abrmd: do not enforce -fstack-protector-all Peter Korsgaard
2019-01-16 13:25 ` Peter Korsgaard
2019-01-25 7:29 ` Peter Korsgaard
2019-01-15 10:15 ` Peter Korsgaard [this message]
2019-01-16 13:25 ` [Buildroot] [PATCH v2 5/7] tpm2-abrmd: fix build with BR2_FORTIFY_SOURCE_1 Peter Korsgaard
2019-01-25 7:29 ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 6/7] tpm2-tools: do not enforce dependency on tpm2-abrmd Peter Korsgaard
2019-01-15 20:43 ` Yann E. MORIN
2019-01-16 11:43 ` Peter Korsgaard
2019-01-17 15:58 ` Yann E. MORIN
2019-01-17 19:01 ` Peter Korsgaard
2019-01-28 21:23 ` Yann E. MORIN
2019-01-28 22:08 ` Peter Korsgaard
2019-01-24 16:50 ` Arnout Vandecappelle
2019-01-25 15:03 ` Peter Korsgaard
2019-01-15 10:15 ` [Buildroot] [PATCH v2 7/7] tpm2-abrmd: S80tpm2-abrmd: create pid file at startup Peter Korsgaard
2019-01-16 13:26 ` Peter Korsgaard
2019-01-25 7:30 ` Peter Korsgaard
2019-01-16 13:25 ` [Buildroot] [PATCH v2 1/7] tpm2-tss: do not enforce -fstack-protector-all Peter Korsgaard
2019-01-25 7:28 ` Peter Korsgaard
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=20190115101522.21042-5-peter@korsgaard.com \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/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