Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Sebastian Huber
On 25/07/2022 17:03, Y. HB wrote: Which way is a preferable way to add  -lm for a BSP ?  change bsp_specs ? So far all existing BSPs managed to avoid libm.a. The bsp_specs are gone in RTEMS 6. If you work on a new BSP, then I would use RTEMS 6 as a baseline. Actually, the -lrtemsbsp is ad

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
Hi Sebastian, Which way is a preferable way to add -lm for a BSP ? change bsp_specs ? On Mon, Jul 25, 2022 at 10:52 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 25/07/2022 16:47, Y. HB wrote: > > > > ['/home/hongbo/Developer/Embedded/rtems/5/bin/arm-rtems5-gcc', > > '-q

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Sebastian Huber
On 25/07/2022 16:33, DAVE ERICKSON wrote: You NEED to, not optional, use the linker flag -L/path/to/correct/libm.a I would not do this. The libm.a is a multilib. This means for a given set of machine flags, GCC selects the associated multilib variant of libm.a, libc.a, etc. The multilibs ar

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
Hi Sebastian, Thanks, it indeed passed the build. On Mon, Jul 25, 2022 at 10:52 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 25/07/2022 16:47, Y. HB wrote: > > > > ['/home/hongbo/Developer/Embedded/rtems/5/bin/arm-rtems5-gcc', > > '-qrtems', '-B/home/hongbo/Developer/Embe

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
Thanks! I'll check it out ! On Mon, Jul 25, 2022 at 10:52 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 25/07/2022 16:47, Y. HB wrote: > > > > ['/home/hongbo/Developer/Embedded/rtems/5/bin/arm-rtems5-gcc', > > '-qrtems', '-B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
an updated config.log here: CFLAGS -> -qrtems -B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5/lib/ -B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5/tms570lc4357_launchxl/lib/ --specs bsp_specs -march=armv7-r -mthumb -mbig-endian -mfpu=vfpv3-d16 -mfloat-abi=hard -Og -ggdb -ffunction-sec

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Sebastian Huber
On 25/07/2022 16:47, Y. HB wrote: ['/home/hongbo/Developer/Embedded/rtems/5/bin/arm-rtems5-gcc', '-qrtems', '-B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5/lib/', '-B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5/tms570lc4357_launchxl/lib/', '--specs', 'bsp_specs', '-march=armv7-r',

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
Hi Dave the default configure will have option for library find path, here is the config.log ['/home/hongbo/Developer/Embedded/rtems/5/bin/arm-rtems5-gcc', '-qrtems', '-B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5/lib/', '-B/home/hongbo/Developer/Embedded/rtems/5/arm-rtems5/tms570lc4357_la

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread DAVE ERICKSON
Hongbo; In a phrase, "There are a number of libm.a inside the toolchain," is exactly your problem. Your poor ld is finding the WRONG libm.* and linking it into the archive. autotools have no internal logic, they can't double check configurations for you. They don't stop to confirm all funct

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
I think the problem here is , during waf configure process, it first checks installed rtems bsp, but the CFLAGS provided doesn't have -lm flag. but I try to manually edit RTEMS_TOOLCHAIN/lib/pkgconfig/arm-rtems5-tms570lc4357_launchxl.pc, but the configure still doesn't have the CFLAGS loaded from t

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread Y. HB
Hi Dave, I believe the build system will find the libm.a in rtems toolchain, which I used arm-rtems-5, There are a number of libm.a inside the toolchain, specific to soft / hard VFP features here is the configure command line to build the rtems bsp: ../../rtems-master/configure --prefix=$RTEMS_

Re: How can I add LDFLAGS for bsp build?

2022-07-25 Thread DAVE ERICKSON
Hi Hongbo (Is that right?); I have no experience with waf so I can't help there...over to joel... What I want to see is the output from the exact same shell (terminal, BASH) that you are compiling with and may have environmental variables set, is the computer's reply to you executing the w