From patchwork Tue Aug 2 20:21:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Wolsieffer X-Patchwork-Id: 1663152 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ly5y85TQzz9sB4 for ; Wed, 3 Aug 2022 06:22:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id BEA5881846; Tue, 2 Aug 2022 20:22:22 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BEA5881846 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zE77HAe4F00Z; Tue, 2 Aug 2022 20:22:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id D695581836; Tue, 2 Aug 2022 20:22:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org D695581836 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 5187B1BF3B8 for ; Tue, 2 Aug 2022 20:22:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2A6174099B for ; Tue, 2 Aug 2022 20:22:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2A6174099B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eYVr1Qnnb1oA for ; Tue, 2 Aug 2022 20:22:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org CACF14018C Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by smtp4.osuosl.org (Postfix) with ESMTPS id CACF14018C for ; Tue, 2 Aug 2022 20:22:06 +0000 (UTC) Received: by mail-qk1-x72a.google.com with SMTP id b25so11466688qka.11 for ; Tue, 02 Aug 2022 13:22:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IvMvG0NHBARwpZU1t/b4d7gSebDdW28YLyuqQamB66I=; b=r/Kgb6bNGNkk4djK73SXEFeHMqbJePBIEvb+YaZF+MxBKGyUatomADYStRDuqQPLQc Lkdy/Xx4efx8w/yisaLZX63OxHJ/E/lmDDpk0GSUOgJHVe6ZW3K7r4Dx/SaD6x5yU3iC 3TYEgjgXzsTzGpaU/mbWZGfu+XBKaWht8zP+z6/nkDGIW/4a/jvIaVgBHw1XD5p0yDit 9WwMUdgipXeNOXYLpI1x4f3wtzvTdAKw3amjK3C095ca/63cdr0k0ahnKfS31NsevFa/ uH4Ma8N09MF/NQCzGYk9wTFkHC/ZntDRroWmiLUpR/95eYVKgbwDR4jwfpZQQGItb9cF rd1w== X-Gm-Message-State: ACgBeo3k9BT2RGsx8Yn9Ic1Ulw4zxBy3f6Orl6Irebaq8e9GdM8rX8Eh WXZHF60I90fAOoT1mHuc23/+Ziqno17F7A== X-Google-Smtp-Source: AA6agR6XB5ORcOw2ZjPC7PjmV5Jnp6uQ0EWon2TL2Tfq/LKDwcG5GxDAH0hoxbeNPzOs+7IeyIk2gw== X-Received: by 2002:a37:b1c2:0:b0:6b8:9885:a27e with SMTP id a185-20020a37b1c2000000b006b89885a27emr10450155qkf.270.1659471725595; Tue, 02 Aug 2022 13:22:05 -0700 (PDT) Received: from hefring.. ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id x14-20020a05620a448e00b006b6757a11fcsm11661660qkp.36.2022.08.02.13.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 13:22:05 -0700 (PDT) From: Ben Wolsieffer X-Google-Original-From: Ben Wolsieffer To: buildroot@buildroot.org Date: Tue, 2 Aug 2022 16:21:39 -0400 Message-Id: <20220802202142.1770838-2-Ben.Wolsieffer@hefring.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> References: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IvMvG0NHBARwpZU1t/b4d7gSebDdW28YLyuqQamB66I=; b=FXYOr4hP3+79oihQqQFRBB1cwkV7xcifpMqeOdlGl8wHxp7kIHsrliscz2Kkp8+wDx 2l1Ip4xtIBowEyOn/QDcwlASlOly1r2Yl+GT1Zg49FK0HA/1WHANnu5DTNl76hOjN5bJ BzRkGQ7a4grB8JnlZpoMb7XghLkabzjo9IIyuE6JY1sP0xF1ilwx2vPPtZiXwZYkb5Hb 6yi+XGiRyGuBTDmnCMIl3YrKs4N6NDFficbebH10fgNUC3yavC27j9X9iUer/IBe3qO4 ArEL81k87fJ5b7rA1yeC8Gh2vJGpQsNj+DNYq3HBPg0lZE+5lEU9mrwdGudWv6rCGAG2 Sn5Q== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=hefring-com.20210112.gappssmtp.com header.i=@hefring-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=FXYOr4hP Subject: [Buildroot] [PATCH v2 1/4] Revert "arch: drop now useless support for FDPIC" X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Wolsieffer , Thomas Petazzoni , "Yann E. MORIN" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This reverts commit 58dcd28dfbed481becb822b009583a63efbc6ffa. ARM supports FDPIC, so this code is needed once again. Signed-off-by: Ben Wolsieffer --- arch/Config.in | 14 ++++++++++++++ package/uclibc/uclibc.mk | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/arch/Config.in b/arch/Config.in index 1c0c400a98..c5d481b9e5 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -12,6 +12,9 @@ config BR2_SOFT_FLOAT config BR2_USE_MMU bool +config BR2_ARCH_HAS_FDPIC_SUPPORT + bool + choice prompt "Target Architecture" default BR2_i386 @@ -418,6 +421,7 @@ endif choice prompt "Target Binary Format" default BR2_BINFMT_ELF if BR2_USE_MMU + default BR2_BINFMT_FDPIC if BR2_ARCH_HAS_FDPIC_SUPPORT default BR2_BINFMT_FLAT config BR2_BINFMT_ELF @@ -429,6 +433,16 @@ config BR2_BINFMT_ELF and executables used across different architectures and operating systems. +config BR2_BINFMT_FDPIC + bool "FDPIC" + depends on BR2_ARCH_HAS_FDPIC_SUPPORT + select BR2_BINFMT_SUPPORTS_SHARED + help + ELF FDPIC binaries are based on ELF, but allow the individual + load segments of a binary to be located in memory + independently of each other. This makes this format ideal for + use in environments where no MMU is available. + config BR2_BINFMT_FLAT bool "FLAT" depends on !BR2_USE_MMU diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk index 0e17a8e65d..ff98a05c16 100644 --- a/package/uclibc/uclibc.mk +++ b/package/uclibc/uclibc.mk @@ -56,6 +56,14 @@ UCLIBC_LOCALES = \ endif # noMMU binary formats +ifeq ($(BR2_BINFMT_FDPIC),y) +define UCLIBC_BINFMT_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_FLAT_SEP_DATA,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_FORMAT_SHARED_FLAT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FDPIC_ELF,$(@D)/.config) +endef +endif ifeq ($(BR2_BINFMT_FLAT_ONE),y) define UCLIBC_BINFMT_CONFIG $(call KCONFIG_ENABLE_OPT,UCLIBC_FORMAT_FLAT) From patchwork Tue Aug 2 20:21:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Wolsieffer X-Patchwork-Id: 1663153 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ly5yP2xPRz9sB4 for ; Wed, 3 Aug 2022 06:22:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 382978188A; Tue, 2 Aug 2022 20:22:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 382978188A X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EaadMqmsFmGr; Tue, 2 Aug 2022 20:22:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 5D03B8186B; Tue, 2 Aug 2022 20:22:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 5D03B8186B X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 53B491BF9B5 for ; Tue, 2 Aug 2022 20:22:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3A95760E1B for ; Tue, 2 Aug 2022 20:22:09 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 3A95760E1B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MBBSzRY7LDdR for ; Tue, 2 Aug 2022 20:22:08 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 83DD560BD8 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by smtp3.osuosl.org (Postfix) with ESMTPS id 83DD560BD8 for ; Tue, 2 Aug 2022 20:22:08 +0000 (UTC) Received: by mail-qt1-x831.google.com with SMTP id w29so11206065qtv.9 for ; Tue, 02 Aug 2022 13:22:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=efWheBe2PE4+YCofMo6AQqgK+S+WE21l61fstESzfrM=; b=zOxr7/uFCq6iqV+yVIr0ZDIIOLKEN2eWKaDDf5tnbE2QTZs4a4S6me/1NUNl9eJSgL mWaIqwciE8xRhS835OxWja+3dPQv5tAdWyN9QpQzVe+kMTNO2/yM30sYgmi0/xysoCj9 vAJ0WttOvmYHER69aexIL8SM5J/f0RY7FD7BAmnYV58P2ShUOOG1JHy3LjJPWclDYQuA m+75dxzPV7TXbCU12yHA32emZIHbF4v51K1x+8/BGIl5DvexgoY2gINWRVFXdJv0WLcL C46iw7UwAZbY1guCMLBGh4VyTmAFav7/I3aKTgaSlhAY36PJqOxa1m4kALQLeRCF9oDa C4Sw== X-Gm-Message-State: AJIora9lZWjyAwnmu2jMX+LX12Nocm3w15zekFrjlrjjRABIMSZ1srFM u2Wz0mkMukVIp6dTyg//gE02TCMQvYqr0Q== X-Google-Smtp-Source: AGRyM1ugVojImclSzD0g5bYoHSGtcxHsHxEc6F/h98WVVc79lH8CRs5Ck1dFu5je2dkWAQWTwJzWmQ== X-Received: by 2002:a05:622a:1a98:b0:31e:f301:7490 with SMTP id s24-20020a05622a1a9800b0031ef3017490mr20040674qtc.310.1659471727314; Tue, 02 Aug 2022 13:22:07 -0700 (PDT) Received: from hefring.. ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id x14-20020a05620a448e00b006b6757a11fcsm11661660qkp.36.2022.08.02.13.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 13:22:06 -0700 (PDT) From: Ben Wolsieffer X-Google-Original-From: Ben Wolsieffer To: buildroot@buildroot.org Date: Tue, 2 Aug 2022 16:21:40 -0400 Message-Id: <20220802202142.1770838-3-Ben.Wolsieffer@hefring.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> References: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=efWheBe2PE4+YCofMo6AQqgK+S+WE21l61fstESzfrM=; b=g1TMcgVJF0C6nVoLw0JxpHpNXTXjmNIO+Os6fVUYY8w29Pz43od8Zf408liZHA+XFH NMagOua7VptFrexl/0GVwXOXUAil/WED7KB2AVo5R4er09oMqaAryNIi6l3lZwmNfOUZ rSHnnRKBdTf7pWCxMgRtCqxTlOV0mvDL7/6304zUfH5bFOWBiYqjiHg8nOF7cwYI4eoD Fzr4/92/3g5TVklscHRpKbLrzRT931o8OCk7yE+faS23SGTu9iqq8cjyrqq+ixdrY7E1 pPl4kiv00T13YZn0KPE3ITFNcDQMk/IbD+aWScGP8MbJEO8c5aMaRi7eC/AqUo4k2ObD ImEw== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=hefring-com.20210112.gappssmtp.com header.i=@hefring-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=g1TMcgVJ Subject: [Buildroot] [PATCH v2 2/4] arch/arm: add support for FDPIC X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Wolsieffer , Thomas Petazzoni , "Yann E. MORIN" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Linux on ARM supports FDPIC binaries intended for use on no-MMU systems. This patch enables support for building a toolchain that produces FDPIC binaries. The target name for an FDPIC toolchain must be arm--uclinuxfdpiceabi, which doesn't follow the standard format and requires a special case. According to the kernel help for CONFIG_BINFMT_ELF_FDPIC, "It is also possible to run FDPIC ELF binaries on MMU linux," so FDPIC support is available on all ARM platforms, not just no-MMU. Signed-off-by: Ben Wolsieffer --- arch/Config.in | 1 + package/Makefile.in | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/arch/Config.in b/arch/Config.in index c5d481b9e5..8dab58cf04 100644 --- a/arch/Config.in +++ b/arch/Config.in @@ -39,6 +39,7 @@ config BR2_arceb config BR2_arm bool "ARM (little endian)" + select BR2_ARCH_HAS_FDPIC_SUPPORT # MMU support is set by the subarchitecture file, arch/Config.in.arm help ARM is a 32-bit reduced instruction set computer (RISC) diff --git a/package/Makefile.in b/package/Makefile.in index ff60f85092..81a7028275 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -37,7 +37,13 @@ $(error BR2_TOOLCHAIN_BUILDROOT_VENDOR cannot be 'unknown'. \ endif # Compute GNU_TARGET_NAME +# FDPIC on ARM requires a special target name: it has no OS field and must +# use the suffix -uclinuxfdpiceabi. +ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_BINFMT_FDPIC),y:y) +GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-uclinuxfdpiceabi +else GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) +endif # FLAT binary format needs uclinux, except RISC-V 64-bits which needs # the regular linux name. From patchwork Tue Aug 2 20:21:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Wolsieffer X-Patchwork-Id: 1663154 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ly5yd5cyMz9sB4 for ; Wed, 3 Aug 2022 06:22:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 6ED6F409DE; Tue, 2 Aug 2022 20:22:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6ED6F409DE X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pz4zyRbXsRyz; Tue, 2 Aug 2022 20:22:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 89641409D9; Tue, 2 Aug 2022 20:22:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 89641409D9 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4CF4A1BF3B8 for ; Tue, 2 Aug 2022 20:22:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 34EF1817BD for ; Tue, 2 Aug 2022 20:22:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 34EF1817BD X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nQn5RHfWvKBy for ; Tue, 2 Aug 2022 20:22:10 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 21619817E4 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by smtp1.osuosl.org (Postfix) with ESMTPS id 21619817E4 for ; Tue, 2 Aug 2022 20:22:10 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id bz13so11202196qtb.7 for ; Tue, 02 Aug 2022 13:22:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=68GUWXX8CsoTbYUvicdsU4ZDOrHwkLxyuPHZlFrFRro=; b=hO4vOz8B/yVgg+IeaD0zMnYVH+jJO9fzs9IHpyUOitRvgvj03CvsltTAzRl1DWpMiB Kx65fnVaE2hQkffuBQTcmfWiU42S8N0BMrNu0H0lbNiAQd7RtIgNVVQtst+LI40+BDYe xl0L3f/M7I/HuUHmPtc2m1v1wfKmGFfgDjAn3t5RR6hfEwT1EqH6sScX/TKluInXHj+m +mjW78btl7R7g/+AsWkdb8H5V/jYigT3wscsH5WpFgoh6BNA1GxZUd/cKu6tcK1goiDn oYManA9Am/GNNeWfS+xWRV+GzwkBzA2JrUmzkg7zQ1yCRlLEzn6qJJN2zvBXt+9/UPcO bESQ== X-Gm-Message-State: AJIora8xekX5zdfP/v8e+q3N5AyRvudGFalqahDXQ+Uizt2bedHl/WNm jEsHbq42BsU14rAWTKeW45iF1THfkuHQEw== X-Google-Smtp-Source: AGRyM1vI41O2YAl2QMAKmEpw7XEWt1X4vlnA5iV46XLC7Scmyrbnd0x+K5Q0tVyeKyqp79guuaisjg== X-Received: by 2002:a05:622a:1a0d:b0:31e:da67:7cb4 with SMTP id f13-20020a05622a1a0d00b0031eda677cb4mr19676420qtb.643.1659471728946; Tue, 02 Aug 2022 13:22:08 -0700 (PDT) Received: from hefring.. ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id x14-20020a05620a448e00b006b6757a11fcsm11661660qkp.36.2022.08.02.13.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 13:22:08 -0700 (PDT) From: Ben Wolsieffer X-Google-Original-From: Ben Wolsieffer To: buildroot@buildroot.org Date: Tue, 2 Aug 2022 16:21:41 -0400 Message-Id: <20220802202142.1770838-4-Ben.Wolsieffer@hefring.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> References: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=68GUWXX8CsoTbYUvicdsU4ZDOrHwkLxyuPHZlFrFRro=; b=bTQYHgFh4GK1txpsFSrWBbS5K5hruHJc2/NIJCRxIyQiebC8QoVRR60dTE0jOq1KIf 8klKkCinaHk0eVWtvcocjHEbrI+znMxGSzkxxiSOzoTE5sMBRtF49AJT20fn4QNBC9Df jECWWmhHH9rLzev4SCw6ezFpIRwwssDoqWKbLmUgwyT9yDZzglWB4MBNI1HtF8tl3TK8 9NNqiiieRsxn4qVc/csCk0aXJVYkUsj/YDjWgJgVO30bMz0QnIYVVHRPnsLnd/XWqMTo qsJhDTTjc1JuPWek68NAfXr5ndonB+VY7v8xb2JQakBdcyGEVKfOAAbTUKWC0ONNpG5B UaPQ== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=hefring-com.20210112.gappssmtp.com header.i=@hefring-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=bTQYHgFh Subject: [Buildroot] [PATCH v2 3/4] boot/uboot: pass -mno-fdpic if FDPIC is enabled X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Wolsieffer , Thomas Petazzoni , "Yann E. MORIN" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" If the FDPIC ABI is enabled by default in the toolchain, it must be explicitly disabled when building U-Boot. --- boot/uboot/uboot.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index a9f9b1bf16..4955a59a60 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -158,6 +158,11 @@ UBOOT_MAKE_OPTS += \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS)) +# Disable FDPIC if enabled by default in toolchain +ifeq ($(BR2_BINFMT_FDPIC),y) +UBOOT_MAKE_OPTS += KCFLAGS=-mno-fdpic +endif + ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y) UBOOT_DEPENDENCIES += arm-trusted-firmware ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF),y) From patchwork Tue Aug 2 20:21:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Wolsieffer X-Patchwork-Id: 1663155 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Ly5yt2pf4z9sB4 for ; Wed, 3 Aug 2022 06:23:02 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CBC6360E22; Tue, 2 Aug 2022 20:22:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org CBC6360E22 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YkG7GVj4aH1O; Tue, 2 Aug 2022 20:22:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 0345F60E19; Tue, 2 Aug 2022 20:22:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 0345F60E19 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id CB9F21BF3B8 for ; Tue, 2 Aug 2022 20:22:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id A6D8560E19 for ; Tue, 2 Aug 2022 20:22:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A6D8560E19 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Dg6-w6q6YV-g for ; Tue, 2 Aug 2022 20:22:11 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 900BE60BD8 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by smtp3.osuosl.org (Postfix) with ESMTPS id 900BE60BD8 for ; Tue, 2 Aug 2022 20:22:11 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id a15so1422277qto.10 for ; Tue, 02 Aug 2022 13:22:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/t7DfGFB4xFImZwXt3sG0E94ef6D8UgKjorqAVftoww=; b=gDqKAYmPOg89/lWmhW1612BdOk0U2inyyQcXso9U0IssVIDpf3A2VHVnhbOClzD5sv fdvSajp/cAv52Cw4Wh2DIAxpWT/MDfoFXkXTyL8iZkDMtaDQ6iEC3VABUHwByjRtWme1 wzMq6Klc02euGwA9C0UaGmguOvFvOVRGLVU/jU0zoUPr1Hum8RuA9bqLM8Eq9YHBAejk Js7lsra3d5LN0mbFW/0UXND+JcwBuVWrF0lV0YinUGEYuTVN+Th13llKo/g+LgfY+IRe j0OcHgl2HA44MGrxbC9lNt2DEVIPcq1ijD9Ov9XenMeq8zf2jlYGFYkcfG9Bdc0r6AjV 1FkA== X-Gm-Message-State: AJIora+2kXE7AbLKlJ+fAKGbqrozRGbJu+VXxqwfzzMQEIL9IfZgEqAS 1APLia/QB5nEYhv2comPY3VHmCk8Wl/WqA== X-Google-Smtp-Source: AGRyM1s23XwqjFQfHlVAmGGbBgNq9OM7a3REtn+cS6vsnqEAq2qLjZxUZyBNUrLxYquGwHrzyLD1tQ== X-Received: by 2002:a05:622a:1050:b0:31e:f648:4e24 with SMTP id f16-20020a05622a105000b0031ef6484e24mr19906472qte.484.1659471730364; Tue, 02 Aug 2022 13:22:10 -0700 (PDT) Received: from hefring.. ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id x14-20020a05620a448e00b006b6757a11fcsm11661660qkp.36.2022.08.02.13.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 13:22:09 -0700 (PDT) From: Ben Wolsieffer X-Google-Original-From: Ben Wolsieffer To: buildroot@buildroot.org Date: Tue, 2 Aug 2022 16:21:42 -0400 Message-Id: <20220802202142.1770838-5-Ben.Wolsieffer@hefring.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> References: <20220802202142.1770838-1-Ben.Wolsieffer@hefring.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/t7DfGFB4xFImZwXt3sG0E94ef6D8UgKjorqAVftoww=; b=RyuelIxMIkhllmIIXZusbEoR9E0QqKZ9KsTHbF16bgjCM/e8t4mi5UVihfPsHGshbY vGBZdE6Z1RblgUguBRPjYpsEo1FSHTZ5VHnVZztPIXNcTQ8A3+bg0b2hnRca84o+fXzc lReuKcW5IUU6+T/df6L6a21uHYSAiZYgkbGeCxL8x6cfkK5zDUfRKlaj06lChaSyKim1 lESCA3NmxBd6StN6jV6Nz/J+krXIUK4XXdhPj6LZAu5r+mQnFUm0eZz3dRKHMon+0k7U m2/wbpfgRPz4OrCXF9REVVmBPLk2lbiaEHkf7iEYCJmYLxd8X+SlMOqqxbYVMhoL3NCq XteA== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=hefring-com.20210112.gappssmtp.com header.i=@hefring-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=RyuelIxM Subject: [Buildroot] [PATCH v2 4/4] linux: pass -mno-fdpic if FDPIC is enabled X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Wolsieffer , Thomas Petazzoni , "Yann E. MORIN" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" If the FDPIC ABI is enabled by default in the toolchain, it must be explicitly disabled when building the kernel. --- linux/linux.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/linux/linux.mk b/linux/linux.mk index 3d9ac37959..c73806ed49 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -152,6 +152,7 @@ endif LINUX_MAKE_FLAGS = \ HOSTCC="$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS)" \ ARCH=$(KERNEL_ARCH) \ + KCFLAGS="$(LINUX_CFLAGS)" \ INSTALL_MOD_PATH=$(TARGET_DIR) \ CROSS_COMPILE="$(TARGET_CROSS)" \ WERROR=0 \ @@ -172,7 +173,12 @@ endif # sanitize the arguments passed from user space in registers. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82435 ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y) -LINUX_MAKE_ENV += KCFLAGS=-Wno-attribute-alias +LINUX_CFLAGS += -Wno-attribute-alias +endif + +# Disable FDPIC if enabled by default in toolchain +ifeq ($(BR2_BINFMT_FDPIC),y) +LINUX_CFLAGS += -mno-fdpic endif ifeq ($(BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT),y)