-
Notifications
You must be signed in to change notification settings - Fork 416
Having trouble in building with cross-compiler #532
Description
Hi, I appreciate your hard work! I'm now trying to create BLIS static library for a target microcontroller (NXP MPC5748G, having 32bit PowerPC architecture on which code built by GCC is mounted) through the corresponding cross compiler with its specialized C standard library called EWL, but I'm in trouble while building the code.
Prerequisite:
- having the corresponding GCC cross-compiler (powerpc-eabivle-gcc) for the target device on the host machine in the directory of `${HOME}/NXP/S32DS_Power_v2.1/S32DS/build_tools/powerpc-eabivle-4_9/bin/'
- having the corresponding standard C libraries (EWL) for the target device on the host machine in the directory of `${HOME}/NXP/S32DS_Power_v2.1/S32DS/build_tools/e200_ewl2/'
What I tried was:
- Go into
config/generic/and populatemake_defs.mkwith details / flags on the target cross compiler. (I attach themake_defs.mkfile I used.) - Run command
./configure CC=${HOME}/NXP/S32DS_Power_v2.1/S32DS/build_tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc --disable-shared --disable-threading --disable-system --enable-verbose-make genericto genrate Makefile. - As
make -jencounters "Cannot determine operating system" error, I go intoinclude/generic/blis.hfile, comment two blocks causing the error, and explicitly define#define BLIS_OS_GNU 1(I attach the modified header file I used.) - Run
make -j, but it shows warning statements pertaining to usingfprintf. (I attach the build logs (containing standard statements and warnings separately) as well.)
Anyway, it ends up creating the static library file libblis.a. But when I try to link it with the BLIS tutorial code, it throws similar errors as mentioned above; this is not so surprising as the library file has been built 'incomplete'.
As the system root (where the standard C libraries are located) has been set properly to be ${HOME}/NXP/S32DS_Power_v2.1/S32DS/build_tools/e200_ewl2/' and stdio` is in there, I believe that it wouldn't cause such issues but it didn't. This problem has eaten up to much time and effort so far. It would be really appreciated if anyone knows a silver bullet to get around such an issue. Otherwise, it would be also great if somebody can suggest a possible direction I should take. Thanks in advance!
files mentioned above
Checklist (with documentation of solutions):
- Define appropriate OS macro.
- Maybe
BLIS_OS_NONE?
- Maybe
- Select cross-compiler
- Specify CC during configure.
-
system_root/flags for EWL - Platform-specific flags (in config directory)
- Platform-specific flags (CFLAGS at configure time)
-
fprintf- Needs platform-specific macro (which one(s)?)
- Linker problems