build: Provide LDFLAGS for pkg-config

Some pkg-config variants perform transformations on the --libs options.
This may lead to completely broken linker options:

https://github.com/pkgconf/pkgconf/issues/371

Provide the LDFLAGS as a variable.  Do not add the ABI_FLAGS to LDFLAGS
since they are already contained in the CFLAGS.  The linker command line
should include the compiler flags so that link-time optimization works
properly.

Update #5165.
This commit is contained in:
Sebastian Huber
2024-11-28 15:23:00 +01:00
committed by Amar Takhar
parent dd490c5c2d
commit 3e90c37861

View File

@@ -13,6 +13,7 @@ content: |
includedir=$${libdir}/include
ABI_FLAGS=${ABI_FLAGS}
LDFLAGS=-B$${libdir} ${PKGCONFIG_LDFLAGS}
RTEMS_ARCH=${ARCH}
RTEMS_BSP=${BSP_NAME}
RTEMS_BSP_BASE=${BSP_BASE}