Fixed oops due to incorrect build flags
This commit is contained in:
@@ -192,29 +192,20 @@ RUN chroot /mnt/rootfs apt-get install -y --no-install-recommends \
|
||||
libxml2-dev libtclap-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Patch the callback signature in FMC source to match libxml2
|
||||
RUN set -eux; \
|
||||
sed -i 's/const xmlError \*/xmlError */g' /src/fmc/source/FMCGenericError.h; \
|
||||
sed -i 's/const xmlError \*/xmlError */g' /src/fmc/source/FMCGenericError.cpp;
|
||||
|
||||
RUN set -eux; make -C source clean && \
|
||||
make -C source -j8 \
|
||||
# Force the use of the ARM64 compiler triple if on x86 host,
|
||||
# or ensure we pass the right machine flags
|
||||
CC="aarch64-linux-gnu-gcc --sysroot=/mnt/rootfs" \
|
||||
CXX="aarch64-linux-gnu-g++ --sysroot=/mnt/rootfs" \
|
||||
# We add -v to see exactly where the linker is looking if it fails
|
||||
# and we point to the fmlib source directory so it finds -lfmc and -lfm
|
||||
LDFLAGS="-L/mnt/rootfs/usr/lib/aarch64-linux-gnu \
|
||||
-L/mnt/rootfs/lib/aarch64-linux-gnu \
|
||||
-L/src/fmlib/lib \
|
||||
-L/src/fmc/source" \
|
||||
CFLAGS="-Wno-write-strings -fpermissive -DLS1046 -DNCSW_LINUX \
|
||||
-I/mnt/rootfs/usr/include/aarch64-linux-gnu \
|
||||
-I/mnt/rootfs/usr/include/libxml2 \
|
||||
-I/src/fmlib/include \
|
||||
-I/src/fmlib/include/fmd \
|
||||
-I/src/fmlib/include/fmd/Peripherals \
|
||||
-I/src/fmlib/include/fmd/integrations" \
|
||||
FMD_USPACE_HEADER_PATH=/src/nxplinux/include/uapi/linux/fmd \
|
||||
FMD_USPACE_LIB_PATH=/mnt/rootfs/usr/lib \
|
||||
LIBXML2_HEADER_PATH=/mnt/rootfs/usr/include/libxml2 \
|
||||
TCLAP_HEADER_PATH=/mnt/rootfs/usr/include
|
||||
make -C source -j8 \
|
||||
MACHINE=ls1046 \
|
||||
CC="aarch64-linux-gnu-gcc --sysroot=/mnt/rootfs" \
|
||||
CXX="aarch64-linux-gnu-g++ --sysroot=/mnt/rootfs" \
|
||||
FMD_USPACE_HEADER_PATH=/mnt/rootfs/usr/include/fmd \
|
||||
FMD_USPACE_LIB_PATH=/mnt/rootfs/usr/lib/aarch64-linux-gnu \
|
||||
LIBXML2_HEADER_PATH=/mnt/rootfs/usr/include/libxml2 \
|
||||
TCLAP_HEADER_PATH=/mnt/rootfs/usr/include
|
||||
|
||||
# Locate and Fix the XML + Schemas + Sub-configs
|
||||
RUN set -eux; \
|
||||
@@ -262,10 +253,6 @@ RUN set -eux; \
|
||||
cat << 'EOF' >> /tmp/fmc_staging/policy.xml
|
||||
<distribution name="dist_dummy">
|
||||
<protocols><protocolref name="ethernet"/></protocols>
|
||||
<standardhash>
|
||||
<algorithm name="fms_hash_default"/>
|
||||
</standardhash>
|
||||
<keycount>1</keycount>
|
||||
</distribution>
|
||||
</netpcd>
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user