[Bug 266404] sysutils/edk2: on aarch64, edk2 fails to build for FreeBSD aarch64 libgcc_s.so.1 issues

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 15 Sep 2022 20:22:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266404

--- Comment #4 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
(In reply to Mark Millard from comment #3)

Looks like my attempt is wasteful garbage.

/usr/ports/Mk/bsd.gcc.mk has:

# A concrete version has been selected. Set proper ports dependencies,
# CC, CXX, CPP, and flags.
V:=                     ${_USE_GCC:S/.//}
.  if ${V} == 13
_GCC_PORT:=             gcc${V}-devel
.  else
_GCC_PORT:=             gcc${V}
.  endif
CC:=                    gcc${V}
CXX:=                   g++${V}
CPP:=                   cpp${V}
_GCC_RUNTIME:=          ${LOCALBASE}/lib/gcc${V}
.  if ${PORTNAME} == gcc
# We don't want the rpath stuff while building GCC itself
# so we do not set the FLAGS as done in the else part.
# When building a GCC, we want the target libraries to be used and not the
# host GCC libraries.
.  else
CFLAGS+=                -Wl,-rpath=${_GCC_RUNTIME}
CXXFLAGS+=              -Wl,-rpath=${_GCC_RUNTIME}
LDFLAGS+=               -Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME}
.  endif
.undef V

So use of either the CFLAGS/CXXFLAGS/LDFLAGS or use of the likes of:

-Wl,-rpath=${_GCC_RUNTIME} -L${_GCC_RUNTIME}

would autoadjust, allowing :build+ use. I see only about 4 ports
with Makefiles directly using _GCC_RUNTIME .

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