[Bug 279531] sysutils/u-boot-rpi4: Cannot build, errors with ecdsa and rsa

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 09 Jun 2024 22:48:17 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279531

Naram Qashat <cyberbotx@cyberbotx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uboot@FreeBSD.org
 Attachment #251332|                            |maintainer-approval?(uboot@
              Flags|                            |FreeBSD.org)

--- Comment #3 from Naram Qashat <cyberbotx@cyberbotx.com> ---
Created attachment 251332
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=251332&action=edit
u-boot.diff to fix building against ports OpenSSL

I am going to re-open this, as I found the cause and the fix.

Firstly: u-boot-tools APPEARED to not be affected by this problem, but in
reality, it only was making it. It never uses the SSL choice by the user and
always uses base OpenSSL.

The cause: u-boot-tools and all the u-boot firmware ports that rely on
u-boot-master never have the -I or -L flags needed for OpenSSL passed into the
u-boot build system. Something in u-boot-master made it use -L/usr/local/lib
anyways and that was causing my build failure. The build system also does not
respect externally set CFLAGS and LDFLAGS.

The fix: In order to get u-boot's build system to respect the user's wish as to
what OpenSSL to use (as well as any other CFLAGS or LDFLAGS the user sets), add
HOSTCFLAGS and HOSTLDFLAGS to the MAKE_ENV.

Additionally: u-boot-master did not put compiler:c11 or ssl into USES like
u-boot-tools did, so I added those. Also, I moved V=1 from MAKE_ENV to
MAKE_ARGS as u-boot's build system ignore it when set in the former, and
CC=clang was being completely ignored so I removed that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.