From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=HI5MOW+i; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: ard.biesheuvel@linaro.org) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Fri, 31 May 2019 05:50:07 -0700 Received: by mail-wr1-f67.google.com with SMTP id c2so6455101wrm.8 for ; Fri, 31 May 2019 05:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=g3nQN2ncOVtN93nbHcqfpfpLeM76U5hoxhr1yXLABrg=; b=HI5MOW+iN1HlQ5dF+luWqwqv1eruOOBm1E4dMDRqkV+a267qIs+Vfr7+uRUonMqcue oGokFoNaLhDPm0HQP2FmYV04v/4N4qokiGjk9ZPSC++/2IDh8Vj3dfBii4bI4vXL1Blr V/iHn4149WksJQBOH0qRwpBE4S72V6gxmPB/YhA5yfN74nhrMrTs1qfCLoK570KiGhUO hCzK1AGK+1x9XtIDO0iF94UauVt4XYBU9c7AAd/V6I3Guv5dN3yaPe6HSCuaNaQaqjXX OEgEViM39Wg7KaKNaSzr+/G1HRyKr7bkDpxMHi9SUNwrfe1KUJtYEjTl8R+cMRz7TGKo VCFA== 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:mime-version :content-transfer-encoding; bh=g3nQN2ncOVtN93nbHcqfpfpLeM76U5hoxhr1yXLABrg=; b=ITSNXhUUJwD3kCCJUs8SM518aIWR/svbGRlwM+Dy8Bk1PWHZJ8CvdaSWXoKJm4waRI Zpur0wwAoYpLRkvaDXaMO1zQab9EqrOD7z3rHEbKeWXRcJh7wha/wCmiKAzj2Yj5N2FQ X1ReNGUfWZQMaaqZoXS6rBLBQhJCVTjzmhaiBBdZm3WS+hXEmR+qFEmA1Qj/ESHnKLCN fUS0XGAOhO786rwlWExB7vLWlW9wACW9bTExJ8yIKuw4+yd3+53LcOgM4VDkvQicYz6k caVPdAMd1Tvjp/L6eXdlzxEb2PNqQ+uEM2WaNGsbCGfoIkxyXLTmQ/Kcbuun/bzHpFmW RAKA== X-Gm-Message-State: APjAAAUsF7dhOc+KTUD3HUxZe5NqtakYfNnaTlMt9IQ0W/JEftcUcl5N +uxQr2NvL5vvcBK60XYPtZu8dPmizeg= X-Google-Smtp-Source: APXvYqxPSMHeHamQBnwH3N+17Bo8dawISNuNo8M56q0SV/9Ea65quAvBZGpT9a3hbsRTChjCjth7Iw== X-Received: by 2002:a05:6000:1149:: with SMTP id d9mr806578wrx.154.1559307004914; Fri, 31 May 2019 05:50:04 -0700 (PDT) Return-Path: Received: from sudo.home ([2a01:cb1d:112:6f00:c225:e9ff:fe2e:ea8]) by smtp.gmail.com with ESMTPSA id b9sm6385076wma.29.2019.05.31.05.50.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 05:50:03 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Laszlo Ersek , "Gao, Liming" , "Wang, Jian J" , Leif Lindholm , Michael D Kinney Subject: [PATCH v3 0/7] update ArmSoftFloatLib to latest upstream version Date: Fri, 31 May 2019 14:49:51 +0200 Message-Id: <20190531124958.8421-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Currently, our move to OpenSSL 1.1.1b is being blocked by an issue in the ARM software floating point library, which lacks some intrinsics that the ARM EABI spec defines. Since the code was in pretty sorry state, let's fix this by upgrading to the very latest version of the core library this code is based on, dated January 2018 (whereas the NetBSD fork of the old code dates back to 2002) Note that this drops support for RVCT, but this toolchain is untested and will likely be removed. [0] Code can be found here: https://github.com/ardbiesheuvel/edk2/tree/arm-softfloat-upgrade-v3 Changes since v2: - dodge the license debate by importing the external project as a Git submodule (which turns out to be maintained by the author/owner of the project) - drop file deletion and SPDX header changes that are no longer needed - drop tested-by tags - add Laszlo's ack where appropriate - add new patches to fix some protocol headers that deviate from the normal pattern of how we define protocols, which breaks C99 and therefore Clang with the atomics workaround in #4 applied Changes since v1: - Update the INLINE macro to pass __attribute__((always_inline)), to work around a build issue that occurs when optimization is disabled. - Add a patch to remove the unused files. As it turns out, 385 of the ~450 files are unused (which is a lot more than Laszlo reported), and so it makes sense to merge patch #4 into patch #1 - Add a patch to add SPDX identifiers to the files that we are keeping (#5). This patch can be merged into #1 as well. - Add patches to work around issues that prevent the new code to build with Clang. Patch #6 is actually related to the OpenSSL upgrade, while patch #7 is related to Clang 7 (and has been posted already 6 months ago) Note that another issue popped up, which affects the OpenSSL 1.1.1b upgrade: .../CryptoPkg/Library/OpensslLib/openssl/crypto/conf/conf_sap.c:71:12: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] return ret; ^~~ .../CryptoPkg/Library/OpensslLib/openssl/crypto/conf/conf_sap.c:44:12: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 error generated. This appears to be a regression in the OpenSSL upstream code (commit 25eb9299cec), which no longer initializes ret if OPENSSL_SYS_UEFI is #defined. Cc: Laszlo Ersek Cc: "Gao, Liming" Cc: "Wang, Jian J" Cc: Leif Lindholm Cc: Michael D Kinney [0] https://bugzilla.tianocore.org/show_bug.cgi?id=1750 Ard Biesheuvel (7): ArmPkg: import Berkeley Softfloat library as git submodule ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library ArmPkg/ArmSoftFloatLib: remove source files that are no longer used BaseTools/tools_def CLANG3x ARM AARCH64: force use of C99 standard ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S MdeModulePkg/PeCoffImageEmulator: avoid redeclaration of typedef MdePkg: avoid redeclaration of typedefs .gitmodules | 3 + ArmPkg/Library/ArmLib/Arm/ArmV7Support.S | 2 + ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cdcmp.asm | 41 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cfcmp.asm | 37 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpeq.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpge.c | 28 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpgt.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmple.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmplt.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpun.c | 35 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpeq.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpge.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpgt.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmple.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmplt.c | 30 - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c | 35 - ArmPkg/Library/ArmSoftFloatLib/Arm/softfloat.h | 345 --- ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c | 283 +++ ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf | 83 +- ArmPkg/Library/ArmSoftFloatLib/arm-gcc.h | 108 - ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 | 1 + ArmPkg/Library/ArmSoftFloatLib/bits32/softfloat-macros | 648 ------ ArmPkg/Library/ArmSoftFloatLib/bits32/softfloat.c | 2354 -------------------- ArmPkg/Library/ArmSoftFloatLib/milieu.h | 38 - ArmPkg/Library/ArmSoftFloatLib/platform.h | 11 + ArmPkg/Library/ArmSoftFloatLib/softfloat-for-gcc.h | 242 -- ArmPkg/Library/ArmSoftFloatLib/softfloat-specialize | 525 ----- BaseTools/Conf/tools_def.template | 8 +- MdeModulePkg/Include/Protocol/PeCoffImageEmulator.h | 4 +- MdePkg/Include/Protocol/HiiPopup.h | 4 +- MdePkg/Include/Protocol/ResetNotification.h | 4 +- 31 files changed, 374 insertions(+), 4735 deletions(-) delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cdcmp.asm delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cfcmp.asm delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpeq.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpge.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpgt.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmple.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmplt.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpun.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpeq.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpge.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpgt.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmple.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmplt.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/Arm/softfloat.h create mode 100644 ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/arm-gcc.h create mode 160000 ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/bits32/softfloat-macros delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/bits32/softfloat.c delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/milieu.h create mode 100644 ArmPkg/Library/ArmSoftFloatLib/platform.h delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/softfloat-for-gcc.h delete mode 100644 ArmPkg/Library/ArmSoftFloatLib/softfloat-specialize -- 2.20.1