From fb8ad42aeef4bc9508e67d05286e27f71a0bed71 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 21 Jun 2018 15:28:46 -0700 Subject: [PATCH] Disable PIE It needs some work in glibc "to be looked" Signed-off-by: Khem Raj --- conf/layer.conf | 9 +++++++++ recipes-devtools/riscv-tools/riscv-pk.bb | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/conf/layer.conf b/conf/layer.conf index 7de202b..d0f4af7 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -10,3 +10,12 @@ BBFILE_PATTERN_riscv-layer = "^${LAYERDIR}/" BBFILE_PRIORITY_riscv-layer = "6" LAYERSERIES_COMPAT_riscv-layer = "sumo" + +# risc-v does not get along with pie for reasons in so far not looked into +SECURITY_CFLAGS_riscv64 = "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_NOPIE_CFLAGS}" +SECURITY_CFLAGS_pn-libgcc_riscv64 = "" +GCCPIE_riscv64 = "" +GLIBCPIE_riscv64 = "" + +SECURITY_CFLAGS_pn-riscv-pk = "" +SECURITY_LDFLAGS_pn-riscv-pk = "" diff --git a/recipes-devtools/riscv-tools/riscv-pk.bb b/recipes-devtools/riscv-tools/riscv-pk.bb index c76d04f..3eed9b1 100644 --- a/recipes-devtools/riscv-tools/riscv-pk.bb +++ b/recipes-devtools/riscv-tools/riscv-pk.bb @@ -48,7 +48,4 @@ do_deploy_append_freedom-u540() { } addtask deploy before do_build after do_install -SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}" -SECURITY_LDFLAGS = "" - COMPATIBLE_HOST = "(riscv64|riscv32).*-linux"