This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: multilib toolchain sysroot donot have lib32 head files

Part Number: AM625

After adding multillib to local.conf, there is no problem with the compilation system,

# Define multilib target
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE:virtclass-multilib-lib32 = "armv7athf-neon"

# Specify 32-bit packages to be added
IMAGE_INSTALL:append = " lib32-glibc lib32-libgcc lib32-libstdc++"

# AM62x GPU drivers don't support 32-bit, remove for now
MACHINE_FEATURES:remove = "gpu"

# The kms++ packages are not compatible with multilib builds, remove for now
RDEPENDS:packagegroup-arago-base:remove = "kms++ kms++-python"

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1288705/am625-sdk9-0-multilib-for-customer-board/4889818?tisearch=e2e-sitesearch&keymatch=%20user%3A565320#4889818 

$ MACHINE=am62xx-customer bitbake tisdk-customer-image

$ MACHINE=am62xx-customer bitbake meta-toolchain-arago-tisdk

but there is no 32-bit header file in the sysroot of the cross-compilation tool chain, error  reported when compiling a 32bit program.

In file included from /home/user/cross_compile/sdk_multilib/sysroots/aarch64-oe-linux/usr/include/./features-time64.h:21:0,
                 from /home/user/cross_compile/sdk_multilib/sysroots/aarch64-oe-linux/usr/include/./features.h:392,
                 from /home/user/cross_compile/sdk_multilib/sysroots/aarch64-oe-linux/usr/include/./bits/libc-header-start.h:33,
                 from /home/user/cross_compile/sdk_multilib/sysroots/aarch64-oe-linux/usr/include/./stdlib.h:26,
                 from /home/user/APP/src/include/stdsys.h:20,
                 from config_parser/cfg_parser.c:15:
/home/user/cross_compile/sdk_multilib/sysroots/aarch64-oe-linux/usr/include/./bits/timesize.h:23:30: fatal error: bits/timesize-32.h: No such file or directory
compilation terminated.
<builtin>: recipe for target 'config_parser/cfg_parser.o' failed
make[1]: *** [config_parser/cfg_parser.o] Error 1
make[1]: Leaving directory '/home/user/2_m822e/app/svn_app_05_08/APP/src/lib'
Makefile:22: recipe for target 'all' failed
make: *** [all] Error 2

timesize-32.h is defined in timesize.h, but there is only timesize-64.h in the bits folder

/home/user/cross_compile/sdk_multilib/sysroots/aarch64-oe-linux/usr/include/./bits/timesize.h

/*
 * Copyright (C) 2005-2011 by Wind River Systems, Inc.
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include <bits/wordsize.h>

#if __WORDSIZE == 32

#ifdef _MIPS_SIM

#if _MIPS_SIM == _ABIO32
#include <bits/timesize-32.h>
#elif _MIPS_SIM == _ABIN32
#include <bits/timesize-n32.h>
#else
#error "Unknown _MIPS_SIM"
#endif

#else /* _MIPS_SIM is not defined */
#include <bits/timesize-32.h>
#endif

#elif __WORDSIZE == 64
#include <bits/timesize-64.h>
#else
#error "Unknown __WORDSIZE detected"
#endif /* matches #if __WORDSIZE == 32 */

Even if this problem is solved, there will still be bits/long-double-32.h, gnu/stubs-32.h, bits/floatn-32.h and other similar problems. How to add the lib32 header file to the tool chain?

Regards,Stephen