From patchwork Sat May 2 11:36:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1281665 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Dq905s6Wz9sSr for ; Sat, 2 May 2020 23:05:08 +1000 (AEST) 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.a=rsa-sha256 header.s=20161025 header.b=ls+Xq1le; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49Dq8z410fzDqrm for ; Sat, 2 May 2020 23:05:07 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::642; helo=mail-pl1-x642.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ls+Xq1le; dkim-atps=neutral Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 49DnCz4wbQzDr0y for ; Sat, 2 May 2020 21:37:35 +1000 (AEST) Received: by mail-pl1-x642.google.com with SMTP id h11so4687751plr.11 for ; Sat, 02 May 2020 04:37:35 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=d0yMouDCBTEEPg0weg9ZjhqHXGPx8hUGQs2D7GlfE+w=; b=ls+Xq1leUxHhKEzR0wSqjhX3rZM3OCrIHjgs81EbnSEq+Liz8jiIa6quuyzf2pC5MN 6dLBrt1kttpvLLTEsYTkcvU1iCYFHLCqZkGPo30TuYYd9j384iE7NlYc00n1MS5sSf+x wGrKeO9UrVVPyfYDsb0c6a+RhM2C+jecf6MefNVovxWcpcM+ASRk7dmbQ5WEmSlW9/j5 Ta9VV4ceOO4sVVYK03iAcMlFEntNGRZYEPjP2s9/IFCXlzObOXYRCe6JxCri14z5EmCf eT4CYLm0w6Uc5TFbuRpR77vKY2AMvMwFiys41hshvfkNMfpdYw1RTWOl1JHti7/Qay9H 33rg== 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:mime-version:content-transfer-encoding; bh=d0yMouDCBTEEPg0weg9ZjhqHXGPx8hUGQs2D7GlfE+w=; b=ZP/jz1aHpvtHVdTSG9yQvxAouxx7+xuA/ZRri25zaKwZI+IQh2O9yhGX2SzaDf8NLO hTnCu0MLKhxxiheqiaBAbPvE/1Wyi+OFRjd/cJx/KX6Tl3g+5oOW57OW3Crkhs4OTDfK W58q7F5T9xFR6vKVTTjBwCjd9/52zFRYMZiGOCmOt2mXYYNgipcMCMxpZPmtT4FL7h0j YYYCvPEH37x12j4n4lSdRNKQtPX3P5+UCW1fXiFpq+q+gszFTAme6BXOwoV3FE/2u7sg 79zw3vko6avnJTzln3+H9BkNjzdaDeBvaEtGXg84hfTl0FtOvcw2Vi8ZZVJo2ARkfO2g ymtg== X-Gm-Message-State: AGi0PuZSJ8ruGwZKyLSyEdFt9OFAEwbv7bv6m9gj3yrbPU4O1OmbdAWu 3uC3G0bwNjg7CVZ6vjOgYC8M+TA4 X-Google-Smtp-Source: APiQypIDhm0v2k5k8BcILP19+cyOSa368ujCD9wN724JfdhBwY5p2SQh8Mg+P3J23nBq1WvpUl0ZgQ== X-Received: by 2002:a17:90a:bf08:: with SMTP id c8mr5443227pjs.20.1588419451357; Sat, 02 May 2020 04:37:31 -0700 (PDT) Received: from bobo.ozlabs.ibm.com ([203.220.177.17]) by smtp.gmail.com with ESMTPSA id e135sm4367513pfh.37.2020.05.02.04.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 May 2020 04:37:30 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Sat, 2 May 2020 21:36:41 +1000 Message-Id: <20200502113649.176329-2-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200502113649.176329-1-npiggin@gmail.com> References: <20200502113649.176329-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [RFC PATCH 1/9] Build skiboot little-endian by default X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" LE is the way to go. Significantly smaller, less stack, faster, can avoid endian flips when called from an LE OS, subsequent patches are adding some LE specific features. They aren't exclusvely LE, but I haven't implemented for BE yet. Signed-off-by: Nicholas Piggin --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d236df9ec..6e5b91d84 100644 --- a/Makefile +++ b/Makefile @@ -48,12 +48,18 @@ KERNEL ?= # STACK_CHECK ?= $(DEBUG) +BIG_ENDIAN ?= 0 +ifeq ($(BIG_ENDIAN),1) +LITTLE_ENDIAN = 0 +else +LITTLE_ENDIAN ?= 1 +endif + # # Experimental (unsupported) build options # -# Little-endian does not yet build. Include it here to set ELF ABI. -LITTLE_ENDIAN ?= 0 -# ELF v2 ABI is more efficient and compact +# ELF v2 ABI is more efficient and compact. +# This can be set for big-endian builds. Clearing it for LE probably won't work. ELF_ABI_v2 ?= $(LITTLE_ENDIAN) # Discard unreferenced code and data at link-time DEAD_CODE_ELIMINATION ?= 0