From patchwork Thu Jan 10 17:59:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1023138 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="FfB+EJ37"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43bDLQ6Y72z9sBQ for ; Fri, 11 Jan 2019 05:00:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F04498663C; Thu, 10 Jan 2019 18:00:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JdhJcnCMTcy5; Thu, 10 Jan 2019 18:00:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 28ADE8664C; Thu, 10 Jan 2019 18:00:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 897981BF3E0 for ; Thu, 10 Jan 2019 18:00:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8736B87B77 for ; Thu, 10 Jan 2019 18:00:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zNz4FEn+Ws-y for ; Thu, 10 Jan 2019 18:00:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by hemlock.osuosl.org (Postfix) with ESMTPS id E024F878FE for ; Thu, 10 Jan 2019 18:00:17 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id y139so12047780wmc.5 for ; Thu, 10 Jan 2019 10:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FBXLGus/mne5OQCosP+q0X+CDXgoNxPlH3NoPs+JvPE=; b=FfB+EJ37nq2faEjBxi58TPNv6Zp5OGJ/n08Tn7NVNrPVFRp6/utU699VOFg8q7Hv+u 1Paude6ozSIn24MyAjDc6jMVZPebL1vXxTU8IfxDOUA4Mf95BygxiJVtXvH4HOw4/nT1 of+ofsxpg0upX4E/1WP2UWKixl9+iyzNrk8mxbMswv4/bIL0QKdFtx8cGmyxGCvzEnAk waDekiG7x5CJJmEqcQk9pDiokLKzqZrxqrpoAAQa7rQgI3Kj9sHVdHnPdtF0EhGs6/OP ntZTDwTJv227qseps7BNqt2z+NwYEf01wCkPUTYK1l46ECVP0ojxfhlMI5dAI7IWMwT1 2/ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FBXLGus/mne5OQCosP+q0X+CDXgoNxPlH3NoPs+JvPE=; b=pEHMfqWbdNZj9Er514towKclShHycpDHjUoK43+ARetbKeuFsPswWznNd84oJk0iCh bE9YNTjs8bKPUwU7/S89hXHwuersT8udhGDRNp1pXLky/oBtixHgDCppm9PhLbiUKlu5 nxM8eKSYoUiXk2/Ps5dYZGzv42Pgs8wFhX1r4rl8/mvubrhl5kK2/Ewaf8kdE25XD069 U66vSKgJpz7YXnT8D9H3suVl6YdotLNYp8omELpM23oCGlqKJJ4zG/Y82Yg+HyG6TEpp UuT0TD9IBDa8Jxl4GmrXBK1DxtOnP40M/GGUJAnRlaWRlGvXVbC3BZ57oHyn1454xiX4 wjgw== X-Gm-Message-State: AJcUukcwNLBzQgHiVY5r4n0UQVFmk1wmgchNrpro1vbiha0lcrj2Ev9F M7yJNCnLC4jXQsrj5bg0AW7XKmqB X-Google-Smtp-Source: ALg8bN7gkhicEDQ2BAlcyyWLnHkM4b9W1gFpUl+3EgKzbRFOK5tq4wDF281+CHIud6fQ6yFb+alyLA== X-Received: by 2002:a1c:c181:: with SMTP id r123mr10814254wmf.8.1547143215961; Thu, 10 Jan 2019 10:00:15 -0800 (PST) Received: from fabrice-VirtualBox.home (arennes-656-1-28-46.w86-214.abo.wanadoo.fr. [86.214.223.46]) by smtp.gmail.com with ESMTPSA id s8sm74221665wrn.44.2019.01.10.10.00.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Jan 2019 10:00:15 -0800 (PST) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Thu, 10 Jan 2019 18:59:54 +0100 Message-Id: <20190110175955.31565-2-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190110175955.31565-1-fontaine.fabrice@gmail.com> References: <20190110175955.31565-1-fontaine.fabrice@gmail.com> Subject: [Buildroot] [PATCH 2/3] gnuchess: disable -O2 and -O3 for ARM cortex-M cpus X-BeenThere: buildroot@busybox.net 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: Fabrice Fontaine MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When building with -O2 (or -O3), link fails on: /home/rclinux/rc-buildroot-test/scripts/instance-0/output/host/bin/arm-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wl,-elf2flt -static -Wl,-elf2flt -static -Wl,-elf2flt -static -o gnuchess main.o components.o frontend/libfrontend.a adapter/libadapter.a engine/libengine.a -lreadline -lncurses ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context ERROR: reloc type R_ARM_THM_MOVT_ABS unsupported in this context ERROR: reloc type R_ARM_THM_MOVW_ABS_NC unsupported in this context To fix this, replace -O2 or -O3 by -Os Fixes: - http://autobuild.buildroot.org/results/7918757b255ed41609609d2083c2d8904ff3136e Signed-off-by: Fabrice Fontaine --- package/gnuchess/gnuchess.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/gnuchess/gnuchess.mk b/package/gnuchess/gnuchess.mk index 0abdab5ba5..b2fbcff864 100644 --- a/package/gnuchess/gnuchess.mk +++ b/package/gnuchess/gnuchess.mk @@ -13,4 +13,11 @@ GNUCHESS_DEPENDENCIES = host-flex flex GNUCHESS_DEPENDENCIES += $(if $(BR2_PACKAGE_READLINE),readline) \ $(TARGET_NLS_DEPENDENCIES) +# Workaround a build issue with -O2 or -03 for ARM Cortex-M cpus +ifeq ($(BR2_ARM_CPU_ARMV7M):$(BR2_OPTIMIZE_2)$(BR2_OPTIMIZE_3),y:y) +GNUCHESS_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) -Os" \ + CXXFLAGS="$(TARGET_CXXFLAGS) -Os" +endif + $(eval $(autotools-package))