From patchwork Thu Dec 7 09:28:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120942 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8124429qgn; Thu, 7 Dec 2017 01:29:10 -0800 (PST) X-Google-Smtp-Source: AGs4zMZYx0djlf4GwQ1PVJXWqeJXADoFi9ct64D+LA2VWo3Q/EHbwrJdrHDUbWJ1WPFEmPxBmHBg X-Received: by 10.99.117.83 with SMTP id f19mr24327655pgn.225.1512638950905; Thu, 07 Dec 2017 01:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512638950; cv=none; d=google.com; s=arc-20160816; b=xe/6Kor+am/ksW+phlz7ZLpVlngeaDOQ8CNQrmmFA6vX4pZj/LGUOscB+I7VG4IxD3 LzDeebp8rn2jNXj4VICHfdeLfvXhYK+YPzBtYocDAUtPy48tGrTK7xBDQvbPkliHIKIl ydGQA4y3FW1lA/S3pLU+UaAnfawgmz9GUBmfpoLOi+8xPYWR5sD+JL4TsW7PYihM8zn1 1DMhPgTaECNAGmLkqjsSMMNuHfQpuWrbXS+otXobA7tin2Q1i6+owEpB3FnnLWdwOr2x 6p589BrrG/2rV+GvFMvBo2fQl15vcCtpxm7ba2wEbtuhAiXHhJhcwlwEQ09mtY9QmzVP zn5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=5CSLgCDERCLazD9aOWuf6GnsgErfe87Fn3unrXgGGtA=; b=ZUj+U/Wbz6eA50KHOfwlTSOA8+/b40C3NgNNbZxiDtyb8rEiJjdMVfvGrTSlylSUya 8h43xczvwXDYd5mouZzbC97pfYiDMMai4cRjZdEQJagfWN2vQBuyffNsdB+vWkwY0JRr 0Zbd1BtEo7XhwX3yIkCeO5Y8mF2xpOHLfke+yLY/DsvSZsWV31rtfrtuje1G//wXPfmK Na0wl6UbHiWmlx/iZwXIjt4Jzn9KSsQ78/HMnUJHQuxQoaFSqYOW+GHrWCuUED26BAVT 7qLBHTH5qH3Ov05IfhwQVKLN6o86iMounz13v+Oud/PCkfZknDyS2QQTbKgizq8ksgQE c7zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EvdEmXNY; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id k14si3262873pln.223.2017.12.07.01.29.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 01:29:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EvdEmXNY; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2A57521B02843; Thu, 7 Dec 2017 01:24:37 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 19E2721B02841 for ; Thu, 7 Dec 2017 01:24:36 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id g75so11948015wme.0 for ; Thu, 07 Dec 2017 01:29:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MNR0IqBdPBKijcEwTOKYWjRF2f/hCgNMqJDXcYKGJtg=; b=EvdEmXNYrIi+2DmyfcspcaInLZ33fAn8JwXtYWFMzt6twCMSqrqH/SOPG9B8oQ7AWa ce0slgGF72D1OP0HFNpVZ+P7Va1GY16r/0xqHglMK4Io9rl5l73H8OAex2O49VfdYKiV 4UJUcutdtjoJJbPPn0/WihO1uTD42wtrIVjPc= 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=MNR0IqBdPBKijcEwTOKYWjRF2f/hCgNMqJDXcYKGJtg=; b=QEIe5csUUWy9+ubf/ZlTm1Nw4LZTSxlAMzrB6s8ISgd495uevI4nk3yxL0f6nIYLS2 efk1p91X63EXq3R5J+Z4wwl/5t3oHwlKe+KQoNElazX8qpTYhocOkpFjdE3Myiv4Cwm6 IAiMSsqBeCXnT00YyAExQap8GcgpX7TG+pqQiz8Tfrmq8GJJxfQpddSXHos8KtZovOeI WrMPNSqb8DVkrl4bAK8ZWJwCUvUxYNc1tKXu/9v2Fzoyq5Grtwn3c6QN1oWjO+X8d11W tCET4dOd95uWD6xZC9mIph5D1qAId07oXhFh9QkwfG4w2sMyXjtJFt3Nhl/9KUqfiY+J nBMQ== X-Gm-Message-State: AKGB3mIYnd+9wKLImmCI5vUNKe3Zlj0kPpMxCGijiE+IDEMxCs+0W71g amHRCwCQyKcX4Di0ch+C3V21bf7v6SQ= X-Received: by 10.28.20.131 with SMTP id 125mr546050wmu.57.1512638947156; Thu, 07 Dec 2017 01:29:07 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id w142sm3151141wme.13.2017.12.07.01.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 01:29:06 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Dec 2017 09:28:49 +0000 Message-Id: <20171207092851.2118-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171207092851.2118-1-ard.biesheuvel@linaro.org> References: <20171207092851.2118-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 1/3] BaseTools/tools_def: add CLANG38 LTO versions for AARCH64 and ARM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , liming.gao@intel.com, leif.lindholm@linaro.org, lersek@redhat.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Extend the CLANG38 toolchain definition so it can be used for ARM and AARCH64 as well. Note that this requires llvm-ar and the LLVMgold.so linker plugin. In preparation of doing the same for GCC5, this toolchain version also departs from the custom of using -O0 for DEBUG builds, which makes them needlessly slow. Instead, let's add a NOOPT flavor as well, and enable optimization for DEBUG like the other architectures do. (Note that this will require some trivial changes to the platform description files) Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- v2: add missing -flto to CC flags, without that LTO is not actually enabled (which is why I did not take Leif's Tested-by) add -fno-lto to ASLC CC flags BaseTools/Conf/tools_def.template | 98 +++++++++++++++++++- 1 file changed, 95 insertions(+), 3 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 91b135c2e569..c0189d4c8d30 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -399,8 +399,8 @@ DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc # Intel(r) ACPI Compiler from # https://acpica.org/downloads # CLANG38 -Linux- Requires: -# Clang v3.8, LLVMgold plugin and GNU binutils 2.26 targeting x86_64-linux-gnu -# Clang v3.9 or later, LLVMgold plugin and GNU binutils 2.28 targeting x86_64-linux-gnu +# Clang v3.8, LLVMgold plugin and GNU binutils 2.26 targeting x86_64-linux-gnu, aarch64-linux-gnu or arm-linux-gnueabi +# Clang v3.9 or later, LLVMgold plugin and GNU binutils 2.28 targeting x86_64-linux-gnu, aarch64-linux-gnu or arm-linux-gnueabi # Optional: # Required to build platforms or ACPI tables: # Intel(r) ACPI Compiler from @@ -5652,6 +5652,7 @@ RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) *_CLANG38_*_MAKE_PATH = make *_CLANG38_*_*_DLL = ENV(CLANG38_DLL) *_CLANG38_*_ASL_PATH = DEF(UNIX_IASL_BIN) +*_CLANG38_*_DTC_PATH = DEF(DTC_BIN) *_CLANG38_*_APP_FLAGS = *_CLANG38_*_ASL_FLAGS = DEF(IASL_FLAGS) @@ -5663,7 +5664,8 @@ DEFINE CLANG38_X64_PREFIX = ENV(CLANG38_BIN) DEFINE CLANG38_IA32_TARGET = -target i686-pc-linux-gnu DEFINE CLANG38_X64_TARGET = -target x86_64-pc-linux-gnu -DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -Wno-empty-body -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-parentheses-equality -Wno-unknown-pragmas -Wno-tautological-constant-out-of-range-compare -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-tautological-compare -Wno-unknown-warning-option -Wno-varargs +DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-varargs +DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-unknown-warning-option ########################### # CLANG38 IA32 definitions @@ -5739,6 +5741,96 @@ NOOPT_CLANG38_X64_CC_FLAGS = DEF(CLANG38_ALL_CC_FLAGS) -m64 "-DEFIAPI=__ NOOPT_CLANG38_X64_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_x86_64 -Wl,--oformat=elf64-x86-64 -Wl,-pie -mcmodel=small NOOPT_CLANG38_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) -O0 +################## +# CLANG38 ARM definitions +################## +DEFINE CLANG38_ARM_TARGET = -target arm-linux-gnueabihf +DEFINE CLANG38_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) DEF(CLANG38_ARM_TARGET) DEF(CLANG38_WARNING_OVERRIDES) -mno-movt +DEFINE CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_DLINK_FLAGS) + +*_CLANG38_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) +*_CLANG38_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_CLANG38_ARM_APP_FLAGS = +*_CLANG38_ARM_ASL_FLAGS = DEF(IASL_FLAGS) +*_CLANG38_ARM_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS) +*_CLANG38_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS) + +*_CLANG38_ARM_CC_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_ASM_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_PP_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_VFRPP_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_ASLCC_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_ASLPP_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_DLINK_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_ARM_ASLDLINK_PATH = ENV(CLANG38_BIN)clang + +*_CLANG38_ARM_SLINK_PATH = ENV(CLANG38_BIN)llvm-ar +*_CLANG38_ARM_RC_PATH = ENV(CLANG38_ARM_PREFIX)objcopy + +*_CLANG38_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto +*_CLANG38_ARM_ASLDLINK_FLAGS = DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_ASLDLINK_FLAGS) +*_CLANG38_ARM_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG38_ARM_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-arguments +*_CLANG38_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 +*_CLANG38_ARM_PLATFORM_FLAGS = -march=armv7-a +*_CLANG38_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_ARM_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +*_CLANG38_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS) +*_CLANG38_ARM_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_ARM_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +*_CLANG38_ARM_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_ARM_TARGET) +*_CLANG38_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS) + + DEBUG_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 + DEBUG_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto -Wl,-O3 + NOOPT_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0 + NOOPT_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) +RELEASE_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 +RELEASE_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto -Wl,-O3 + +################## +# CLANG38 AARCH64 definitions +################## +DEFINE CLANG38_AARCH64_TARGET = -target aarch64-linux-gnu +DEFINE CLANG38_AARCH64_CC_FLAGS = DEF(GCC_AARCH64_CC_FLAGS) DEF(CLANG38_AARCH64_TARGET) -mcmodel=small DEF(CLANG38_WARNING_OVERRIDES) +DEFINE CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 + +*_CLANG38_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) +*_CLANG38_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) +*_CLANG38_AARCH64_APP_FLAGS = +*_CLANG38_AARCH64_ASL_FLAGS = DEF(IASL_FLAGS) +*_CLANG38_AARCH64_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS) +*_CLANG38_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS) + +*_CLANG38_AARCH64_CC_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_ASM_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_PP_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_VFRPP_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_ASLCC_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_ASLPP_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_DLINK_PATH = ENV(CLANG38_BIN)clang +*_CLANG38_AARCH64_ASLDLINK_PATH = ENV(CLANG38_BIN)clang + +*_CLANG38_AARCH64_SLINK_PATH = ENV(CLANG38_BIN)llvm-ar +*_CLANG38_AARCH64_RC_PATH = ENV(CLANG38_AARCH64_PREFIX)objcopy + +*_CLANG38_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto +*_CLANG38_AARCH64_ASLDLINK_FLAGS = DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH64_ASLDLINK_FLAGS) +*_CLANG38_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-arguments +*_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 +*_CLANG38_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 +*_CLANG38_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 +*_CLANG38_AARCH64_PLATFORM_FLAGS = +*_CLANG38_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +*_CLANG38_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS) +*_CLANG38_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) +*_CLANG38_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_AARCH64_TARGET) +*_CLANG38_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) + + DEBUG_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 + DEBUG_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl,-O3 + NOOPT_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0 + NOOPT_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) +RELEASE_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3 +RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl,-O3 + #################################################################################### # # Cygwin GCC And Intel ACPI Compiler From patchwork Thu Dec 7 09:28:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120943 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8124464qgn; Thu, 7 Dec 2017 01:29:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMYccTxud0IXzztiGbUkki5Vu7UyvPv53Z476SWtzrARy7rbj4X/2LXH/H7OH9ABUovGtiL+ X-Received: by 10.99.149.76 with SMTP id t12mr13400605pgn.382.1512638953505; Thu, 07 Dec 2017 01:29:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512638953; cv=none; d=google.com; s=arc-20160816; b=Bw3FxgiyXtS/gtCJCTaugmV17i+gbuaEHE/kv0IJcbXkkD6YeXYvpmCETrq95bT9Au rzLuIKI3GPrknD+PKV5X2Kmksx+ABGzE5H6OJMeJTbB7UUIRWm3MPU5J08u+ir9tjyQ1 r6DuxOpF+3ogedq330mhmGAJFsxJ8zHyWp050sRejd8ErJkfv0OLVfZX1bZIrihCfbA5 xdozcCNdsTneeu0ggg44xjQl6JSNksZ8O3Z6ecX8BNWTJYQvQP+sDxLOzP1o7Bt94Ewn KYCV6O5D8xtjz0eCVTWPfPopg9ipfAEYE9eiIycC1E94Wif7gow1FJsSCcsAp4CABrZ1 sNwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=xNv656rljH/Cq7sghEJTVRMKs+L9lgYaPFrMDHKFMS8=; b=UpCyMGf7cc9qBJqw6KV/BRITbVDBMa/5j+7yMRmRQxs0o/0C/SsNYFRaZc9Y3qv+rD 6x9hCUVGsZF5U6qgyyEDt0itad7yHUUnj1W+TWmbYVhq/jzrhhaAXJAc0f0Ua3E47ohI KQ3bApzt19mz8cVEh1mbEaECNFQBmmfXrGowM6UjAtn06woYmAH+CG32btPJ093NgvjW 59jtgk54qnYz0pnjKyYypwYEX5ica8ChAD2vFxbis7blgGUEfmLg3wnX6c1QWDqEAO61 7a/Jk7s7AgTtti971CCbcAMwZk0RcbTCyvS3klc2cll/mKlJlygwy83PRXNWdiKuGu0z 3QFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Qr+U+KQE; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id g8si2287306plt.217.2017.12.07.01.29.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 01:29:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Qr+U+KQE; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6DC0021B02847; Thu, 7 Dec 2017 01:24:39 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0481F21B0283C for ; Thu, 7 Dec 2017 01:24:37 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id f9so11747511wmh.0 for ; Thu, 07 Dec 2017 01:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=z9JEW+WAdUKO4bFIhE8txBn2WWmcRgRbPYPmkBXf1cg=; b=Qr+U+KQEz7plbGxtYfFM63sC9MxmkzA+WTDZb3ymWUa/49cNtBvUCbAR1X6NZUQHde WnROESJmlh+Dl/YVnNw2Y/58amH986eeXu44RmN7IdrP4Ep7xzF68XSnlAb2A72qN/Pa JGWZhHYgX7eJE6vACWadkyoxLTCVXX7qZ9GbI= 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=z9JEW+WAdUKO4bFIhE8txBn2WWmcRgRbPYPmkBXf1cg=; b=jYy/7sCXBLVk0vPHqOeRSguk/2sDbHJF83RqJrMVjS47Pcb508NXNj0KI0Oj8n1RJ0 3Fw+OsYUr+GMi1TTHCmBY5CLw6+4ldHyxtHCUDmKDSnnQHRLL3xYcx+g3TaasoVBzEqF SJV7PoFOqkKvuunTC+bURTAWQN3aTdhA8vSdVxQrsDWi1a0msugBa3D8IBgHD7a37tro +/+8/SjuSOGp5nnb1D6MqbLs809vAM4b9R0n4ZqVpwwPixtGO+3BXtRsm6Ru9x4hdj7n rP4DlBb1FZW4vu3eZzZl/R2ZC8COLlmOv+MdY3yi7RQMEWb+6uAlnVcJfYuR3A1PEPZB V26Q== X-Gm-Message-State: AKGB3mLF8ADqi5kINnTjD+UH8dF2EIMl/mLYSdQCYMP4KAQJZcQ2Pl17 sOeakWQIlLVccSQbefr8wR8rrS4Gu7U= X-Received: by 10.28.181.209 with SMTP id e200mr524938wmf.68.1512638949316; Thu, 07 Dec 2017 01:29:09 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id w142sm3151141wme.13.2017.12.07.01.29.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 01:29:08 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Dec 2017 09:28:50 +0000 Message-Id: <20171207092851.2118-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171207092851.2118-1-ard.biesheuvel@linaro.org> References: <20171207092851.2118-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 2/3] BaseTools/tools_def CLANG38: add -Wno-unused-const-variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , liming.gao@intel.com, leif.lindholm@linaro.org, lersek@redhat.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Commit 8b6366f87584 ("BaseTools/GCC: set -Wno-unused-const-variable on RELEASE builds") suppresses warnings about unused constant variables in RELEASE builds when building with GCC, given that they break the build under our warnings-as-errors policy. Do the same for CLANG38. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=790 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- v2: new patch BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek Reviewed-by: Shi Steven diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index c0189d4c8d30..703884fc49a7 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -5664,7 +5664,7 @@ DEFINE CLANG38_X64_PREFIX = ENV(CLANG38_BIN) DEFINE CLANG38_IA32_TARGET = -target i686-pc-linux-gnu DEFINE CLANG38_X64_TARGET = -target x86_64-pc-linux-gnu -DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-varargs +DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-unknown-warning-option ########################### From patchwork Thu Dec 7 09:28:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 120944 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8124491qgn; Thu, 7 Dec 2017 01:29:15 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ+p2Jc0ldG3GbRjp4is5fDYcgrdcULBsE5GiZz8tUA4Q0LWs6HZpehUTkJXfFKlNLnzn+C X-Received: by 10.84.229.5 with SMTP id b5mr25690759plk.405.1512638955850; Thu, 07 Dec 2017 01:29:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512638955; cv=none; d=google.com; s=arc-20160816; b=VdAW4ckCa12L8SO/0mXkoXaImnmrT5ScxXcfDiL3mftKX2KvpPt1qPsWqHkHdIShzV 31Fh8J6h+EKOdEMueAGeCjMXXPUjcFYviXGeHfB8953VYMJLaf5CD3CR7F799f9UYeyY x8aa1rRvKJ9z/e+qZP+xGAgtSTRNZeT+LySpMw2PkAoHLaILXDehn0Q1Unk57lUmYEG8 AyvmDKmZCHwlgTSUFYTxyfmZOopVBpTJIQcibJPQo7cFUTGY45w6dI04zTPYUt1bwwbK jGqJcJxDJGSWoRZJ6r2fqoVplKIkgn+VcVZxbojGc+N0U1FSBSZuwI5cTzNeSPqV++6v sG8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=QFVJvtIF1SGviQxJRLhIPyOiEWIpKwkGVJ8kzI7HGYQ=; b=QqwD8DyiraqNkbSmax+QtR/Srybr4icCku00nfM4yodHCSo0dpYVT6T32jI7LUymxQ 579SA0rAIvlMY43llI4CTFYqqQHcED1/9zZx1+t61GF4WBSJk1oWyvGSTAqDs8tEHEy7 q1x7r7gh7I/QumFVSeLasRPqvqmDm/7R10xGGep5JMz1oBgTxQM+JiymiRdkUnlIOamh NxPm57W57taCBE7ldWJ1L7aZOBSoOChwvYJPzRnyGbTMlVLJLxSA3nFG11CN0igYZ7Q/ x7S3ULdZsUK9kGFPiah/2BSiH1yv1jmHY2I1MEKmvsd+LVwZFqpnzhoMZqDRuIXvJctK ctxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=J5CXgeAG; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id e3si3442998plb.426.2017.12.07.01.29.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 01:29:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=J5CXgeAG; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A563721B0284B; Thu, 7 Dec 2017 01:24:41 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::243; helo=mail-wm0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E9AA621B0283C for ; Thu, 7 Dec 2017 01:24:39 -0800 (PST) Received: by mail-wm0-x243.google.com with SMTP id r78so11896734wme.5 for ; Thu, 07 Dec 2017 01:29:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=q4NBJ7avMV79tO3U958md2/KrOSzugOrJ44NcJ07+VU=; b=J5CXgeAG5m8BEAtZe4IpoismTzrM3fuuJ6OUKdUtATiBCkKD7XQy0afEDnOBxZ7Xom t2II27JkCfZn2Ak15xO1g9ooYr+V1JNDgMqfIArfj28P6WMOG7bUVsDYpR3X8i1r2t5T 9WMANZXEgUysTQinS8XZEPObdkRW+z7J4pNZ4= 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=q4NBJ7avMV79tO3U958md2/KrOSzugOrJ44NcJ07+VU=; b=XfOwKDTnjwzGNSv9Y7obXnxeExA0f8gE0L9/5+rpD03fsXEz9x1sz2eUvUObDLPk4n hgztlA34ymRigHIAI8RJjQnVUk0Mi4sI9Rs1g/i/iE9aaapkGPBi+iN9hMDwdwB5XY8W NR/MO5ZSobJrp7z3A6xcYCE23AiG3SpD5+VQwZbNXMlfsx3mPK9n98WCax9FbtjH1gzI WXBtOA1UgoSgIWjY8RizsXFx3TXZTml7/Uz3QwETF2f6dXaFveVP5ZA7gkpQvYABe+Nn DkRIpXPsU7TMnNuc6Oil/b9/lIJO2WHV3VMg1W0dtzeo6vGXU+5O/0U21BySc8+wxof4 pgPQ== X-Gm-Message-State: AKGB3mKjeOKl8tAQxaN2ly7vwTYvv3lPLgbiFa52pP7L1E+1HPc7Sj20 Ajkt7xBOphzCFicXh/lM6bkWJEobYGQ= X-Received: by 10.28.178.135 with SMTP id b129mr489267wmf.103.1512638951411; Thu, 07 Dec 2017 01:29:11 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id w142sm3151141wme.13.2017.12.07.01.29.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 01:29:10 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Dec 2017 09:28:51 +0000 Message-Id: <20171207092851.2118-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171207092851.2118-1-ard.biesheuvel@linaro.org> References: <20171207092851.2118-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v2 3/3] BaseTool/tools_def GCC5: enable optimization for ARM/AARCH64 DEBUG builds X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel , liming.gao@intel.com, leif.lindholm@linaro.org, lersek@redhat.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Enable optimization for DEBUG builds, to make it more usable in terms of performance, and to give more coverage to the LTO builds. Also, some diagnostics are only enabled when optimization is enabled. NOOPT builds can now also be created, which will retain the behavior DEBUG builds had previously. Note that this aligns ARM and AARCH64 with the x86 architectures, which already use optimization for DEBUG builds. In order to preserve existing behavior for users of older toolchains, keep GCC49 and older as-is. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- v2: new patch BaseTools/Conf/tools_def.template | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Acked-by: Laszlo Ersek diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 703884fc49a7..aec390f8eeb1 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -5517,8 +5517,8 @@ RELEASE_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os *_GCC5_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) *_GCC5_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS) - DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0 - DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) + DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable + DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm RELEASE_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm @@ -5551,8 +5551,8 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS *_GCC5_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS) *_GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS) - DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0 -mcmodel=small - DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 + DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=small + DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000 -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch -mcmodel=small DEBUG_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny