From patchwork Mon Sep 3 09:08:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 965315 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 423kf11jtTz9s3C for ; Mon, 3 Sep 2018 19:08:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id DAD09C21E07; Mon, 3 Sep 2018 09:08:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E05E5C21D72; Mon, 3 Sep 2018 09:08:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4EB2BC21D72; Mon, 3 Sep 2018 09:08:16 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lists.denx.de (Postfix) with ESMTPS id 7E827C21C51 for ; Mon, 3 Sep 2018 09:08:15 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 02:08:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,324,1531810800"; d="scan'208";a="85585775" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 03 Sep 2018 02:08:11 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D6DD5BB; Mon, 3 Sep 2018 12:08:10 +0300 (EEST) From: Andy Shevchenko To: Simon Glass , Bin Meng , U-Boot Mailing List , Marek Vasut , Tom Rini , Heinrich Schuchardt , Alexander Graf Date: Mon, 3 Sep 2018 12:08:10 +0300 Message-Id: <20180903090810.4568-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.18.0 Cc: Andy Shevchenko Subject: [U-Boot] [PATCH v2] sandbox: Build with -fPIC X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Sandbox is not a real bootloader and it does require a position independent code to be supported. Thus, build it with -fPIC explicitly. Fixes: 16940f720f9b ("Makefile: Don't generate position independent code") Signed-off-by: Andy Shevchenko Reported-by: Simon Glass Tested-by: Bin Meng Acked-by: Simon Glass Tested-by: Simon Glass --- - rebased on top of latest u-boot/master - added Bin's Tb tag arch/sandbox/config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 2babcde881..95f9e3ff63 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -3,6 +3,7 @@ PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM +PLATFORM_CPPFLAGS += -fPIC PLATFORM_LIBS += -lrt # Define this to avoid linking with SDL, which requires SDL libraries