New build system ready for testing
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Sep 14 15:18:37 UTC 2020
Hello Christian,
On 14/09/2020 14:23, Christian Mauderer wrote:
> Hello Sebastian,
>
> I get a linker error when I try to build libbsd for BBB (with a buildset that builds everything but netipsec):
>
> -----
> /home/EB/christian_m/Projekte/rtems-bbb/install/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld: ./libbsd.a(uipc_mbuf.c.20.o): in function `m_unmappedtouio':
> /home/EB/christian_m/Projekte/rtems-bbb/libs/rtems-libbsd/build/arm-rtems6-beagleboneblack-noIPSec/../../freebsd/sys/kern/uipc_mbuf.c:1813: undefined reference to `PHYS_TO_VM_PAGE'
> /home/EB/christian_m/Projekte/rtems-bbb/install/rtems/6/lib/gcc/arm-rtems6/10.2.1/../../../../arm-rtems6/bin/ld:
> /home/EB/christian_m/Projekte/rtems-bbb/libs/rtems-libbsd/build/arm-rtems6-beagleboneblack-noIPSec/../../freebsd/sys/kern/uipc_mbuf.c:1814: undefined reference to `uiomove_fromphys'
> collect2: error: ld returned 1 exit status
> -----
>
> Configure line for libbsd is:
>
> ./waf configure \
> --prefix=/home/EB/christian_m/Projekte/rtems-bbb//install/rtems/6 \
> --rtems-bsps=arm/beagleboneblack \
> --buildset=/home/EB/christian_m/Projekte/rtems-bbb//build/src/noipsec.ini \
> --enable-warnings \
> --optimization=2 \
> --rtems-version=6
>
> Adding your patch from ages ago to libbsd works to solve that:
>
> https://gitlab.com/c-mauderer/rtems-libbsd/-/commit/c9474c0b228d91dff098d617234842d56af3c4d7.patch
>
> But you haven't applied it to the libbsd master. So I assume that there is a better workaround for that problem? What's the correct solution?
thanks for testing. Apparently, I tested with this patch applied. This
is an open issue. Chris was not happy with this patch.
I think the -fdata-sections and -ffunction-sections flags should not be
exported by the pkg-config file of the build system since these are
optimization flags which affect the code generation. However, for libbsd
these flags are mandatory and should be enforced by a library-specific rule.
More information about the devel
mailing list