public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v3 0/7] update ArmSoftFloatLib to latest upstream version
@ 2019-05-31 12:49 Ard Biesheuvel
  2019-05-31 12:49 ` [PATCH v3 1/7] ArmPkg: import Berkeley Softfloat library as git submodule Ard Biesheuvel
                   ` (7 more replies)
  0 siblings, 8 replies; 24+ messages in thread
From: Ard Biesheuvel @ 2019-05-31 12:49 UTC (permalink / raw)
  To: devel
  Cc: Ard Biesheuvel, Laszlo Ersek, Gao, Liming, Wang, Jian J,
	Leif Lindholm, Michael D Kinney

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 <lersek@redhat.com>
Cc: "Gao, Liming" <liming.gao@intel.com>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>

[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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-06-03  6:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31 12:49 [PATCH v3 0/7] update ArmSoftFloatLib to latest upstream version Ard Biesheuvel
2019-05-31 12:49 ` [PATCH v3 1/7] ArmPkg: import Berkeley Softfloat library as git submodule Ard Biesheuvel
2019-05-31 12:49 ` [PATCH v3 2/7] ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library Ard Biesheuvel
2019-05-31 13:20   ` Leif Lindholm
2019-05-31 13:22     ` Ard Biesheuvel
2019-05-31 13:26       ` Leif Lindholm
2019-05-31 13:39         ` Ard Biesheuvel
2019-05-31 13:49           ` Leif Lindholm
2019-05-31 14:32             ` Ard Biesheuvel
2019-05-31 12:49 ` [PATCH v3 3/7] ArmPkg/ArmSoftFloatLib: remove source files that are no longer used Ard Biesheuvel
2019-05-31 12:49 ` [PATCH v3 4/7] BaseTools/tools_def CLANG3x ARM AARCH64: force use of C99 standard Ard Biesheuvel
2019-05-31 12:49 ` [PATCH v3 5/7] ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S Ard Biesheuvel
2019-05-31 12:49 ` [PATCH v3 6/7] MdeModulePkg/PeCoffImageEmulator: avoid redeclaration of typedef Ard Biesheuvel
2019-06-03  0:33   ` Liming Gao
2019-05-31 12:49 ` [PATCH v3 7/7] MdePkg: avoid redeclaration of typedefs Ard Biesheuvel
2019-06-03  0:33   ` Liming Gao
2019-05-31 13:09 ` [PATCH v3 0/7] update ArmSoftFloatLib to latest upstream version Leif Lindholm
2019-05-31 16:00   ` [edk2-devel] " Ard Biesheuvel
2019-05-31 16:21     ` Michael D Kinney
2019-05-31 19:28       ` Leif Lindholm
2019-05-31 19:31         ` Michael D Kinney
2019-06-03  0:59         ` Liming Gao
2019-06-03  6:04           ` Ard Biesheuvel
2019-06-03  0:32     ` Liming Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox