From patchwork Sat Aug 7 04:13:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 1514547 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) 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=FQ6oTqsT; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GhTW82cHZz9sCD for ; Sat, 7 Aug 2021 14:14:12 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GhTW81vnZz3d8x for ; Sat, 7 Aug 2021 14:14:12 +1000 (AEST) Authentication-Results: lists.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=FQ6oTqsT; dkim-atps=neutral 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::636; helo=mail-pl1-x636.google.com; envelope-from=npiggin@gmail.com; receiver=) 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=FQ6oTqsT; dkim-atps=neutral Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (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 4GhTVx1Kr8z302v for ; Sat, 7 Aug 2021 14:14:00 +1000 (AEST) Received: by mail-pl1-x636.google.com with SMTP id bh7so994905plb.5 for ; Fri, 06 Aug 2021 21:14:00 -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=6TEMGHyQ1zKRSoIQ01Rc/G2THqX50pfEZfj9YNUvH7I=; b=FQ6oTqsTEx2k43CxXHyqapsK59Xu2iSmGfzdAz6Z8PrQZ+gqNK7tuHSMCJCf775pLv Sh3LuGxIlxJWPijJQ639lKp+Cv4CmwuFftNH7ei8Tp6Q/zRZaPqyIPOHhXpk6X0AdkUb PCGcdH8RECO1r2nPLUX4/1/Rj49yW8xGCkeRCugBYtEHU8gWXf97dkqyDNiRT5eaSsZC W+wNg3hcxtRpokAcIaXIWO98ujH5PGST1P5fbmkx1hd5Cf6oZnoe7fvaitOsTn6nMsDz c5EFL2wi+RpFxYxeGU2zBXKtxO1BMc74jbxnEvAMUBr8e/QgetQcXxic4D37oxeAKRbM IdMQ== 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=6TEMGHyQ1zKRSoIQ01Rc/G2THqX50pfEZfj9YNUvH7I=; b=kNhkqdZbFVbvHgC/rTudx1yiw/PpmUhBKscg6+6VgV5499ujpV+lYz1CfQbtCn9Yvb qHR6uZeZBTJpQ0wT8iwOHgszjuuwgUrQ0Pry8SfJJo2tY3B5B3OqdgeEqPlWc7IunBZD zI6nogIHkp2l8v7Lf9V1dp0roL4iEIcA6Wic/UYmZTgaESiaWH/dVDELx39U64RkAhIV 13GRUGLoLoqrlcyDSKokC7wMP9Fx/b0t2+vczwiZZs2Tb0khKJB1XoAQ7FAH3g6Sc+xn jTUshitnfvv3Dyfzyr3et+M78TObYF+VUFy6KIi8SqsWcXqEgiQaRPKipJtZKDEk3J8B 8tJQ== X-Gm-Message-State: AOAM5312kPoVQDQOdWuYqnRpcM2R0UL3Beta+sSz5LzlE0V7i0BbFIHi rsjWuOMTTdXDzydxYkmm9uo+Qgj59CA= X-Google-Smtp-Source: ABdhPJwuH3EBLb52E7HIrHuD9A43OFoddy6XpiGLvviT0TlSUxlilwerdHOvHEl19rBnd7b4orj34A== X-Received: by 2002:a05:6a00:2b5:b029:3bc:3183:c370 with SMTP id q21-20020a056a0002b5b02903bc3183c370mr13826526pfs.68.1628309638349; Fri, 06 Aug 2021 21:13:58 -0700 (PDT) Received: from bobo.ozlabs.ibm.com ([118.210.97.79]) by smtp.gmail.com with ESMTPSA id u15sm12470877pfn.91.2021.08.06.21.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Aug 2021 21:13:58 -0700 (PDT) From: Nicholas Piggin To: skiboot@lists.ozlabs.org Date: Sat, 7 Aug 2021 14:13:47 +1000 Message-Id: <20210807041347.395291-3-npiggin@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210807041347.395291-1-npiggin@gmail.com> References: <20210807041347.395291-1-npiggin@gmail.com> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v1 2/2] 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, and with later OPAL calling convention changes, it can avoid endian flips when called from an LE OS, and there are other new features in the pipeline that may initially only be implemented for LE OS and LE skiboot. This reduces skiboot.lid.xz size by 10KiB. 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