GithubHelp home page GithubHelp logo

Comments (4)

petertorelli avatar petertorelli commented on August 15, 2024

rt is the POSIX realitime library (time functions), and pthread is the POSIX threading library. Neither of those come with the GCC Arm toolchain distribution. You will need to implement your own timing, most likely using a variant of SysTick from the BSP for your processor. As for threading, compile in single-thread mode: -DUSE_NATIVE_PTHREAD=0 -DUSE_SINGLE_CONTEXT=1, and remove those options from your makefile.

from coremark-pro.

sunildogra1710 avatar sunildogra1710 commented on August 15, 2024

As you suggested i used DUSE_NATIVE_PTHREAD=0 -DUSE_SINGLE_CONTEXT=1 and remove rt and pthread option from gcc64.mak.
Example:
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gcc -c -g -O2 -DNDEBUG -DHOST_EXAMPLE_CODE=1 -std=gnu99 -DHAVE_SYS_STAT_H=1 -DUSE_NATIVE_PTHREAD=0 -DUSE_SINGLE_CONTEXT=1 -DGCC_INLINE_MACRO=1 -DNO_RESTRICT_QUALIFIER=1 -DEE_SIZEOF_LONG=8 -DEE_SIZEOF_PTR=8 -DEE_PTR_ALIGN=8 -DHAVE_SYS_STAT_H=1 -DUSE_NATIVE_PTHREAD=0 -DUSE_SINGLE_CONTEXT=1 -DGCC_INLINE_MACRO=1 -DNO_RESTRICT_QUALIFIER=1 -DEE_SIZEOF_LONG=8 -DEE_SIZEOF_PTR=8 -DEE_PTR_ALIGN=8 -DEE_SIZEOF_INT=4 -DEE_SIZEOF_LONG=8 -Wall -Wno-long-long -fno-asm -fsigned-char -I./mith/include -I./mith/al/include -I./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/arm-none-eabi/include -I./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/plugin/include -I./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/include -I./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/lib/gcc/arm-none-eabi/10.3.1/install-tools/include -I./mith/al/include ./workloads/zip-test/zip-test.c -o zip-test.o

Below command giving fee error. please comment
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gcc -o./builds/linux64/gcc64/bin/zip-test.exe zip-test.o ./builds/linux64/gcc64/obj/bench/darkmark/zip/*.o ./builds/linux64/gcc64/obj/mith.a -lm

Error Message =>
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function exit': exit.c:(.text.exit+0x2c): undefined reference to _exit'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./builds/linux64/gcc64/obj/mith.a(th_lib.o): in function th_aligned_malloc_x': ./mith/src/th_lib.c:851: undefined reference to posix_memalign'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./builds/linux64/gcc64/obj/mith.a(th_al.o): in function al_signal_start': ./mith/al/src/th_al.c:252: undefined reference to clock_gettime'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./builds/linux64/gcc64/obj/mith.a(th_al.o): in function al_signal_finished': ./mith/al/src/th_al.c:297: undefined reference to clock_gettime'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./builds/linux64/gcc64/obj/mith.a(th_al.o): in function al_signal_now': ./mith/al/src/th_al.c:334: undefined reference to clock_gettime'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-fstatr.o): in function _fstat_r': fstatr.c:(.text._fstat_r+0x1c): undefined reference to _fstat'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-openr.o): in function _open_r': openr.c:(.text._open_r+0x24): undefined reference to _open'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-sbrkr.o): in function _sbrk_r': sbrkr.c:(.text._sbrk_r+0x18): undefined reference to _sbrk'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function _kill_r': signalr.c:(.text._kill_r+0x1c): undefined reference to _kill'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): in function _getpid_r': signalr.c:(.text._getpid_r+0x4): undefined reference to _getpid'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-statr.o): in function _stat_r': statr.c:(.text._stat_r+0x1c): undefined reference to _stat'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-unlinkr.o): in function _unlink_r': unlinkr.c:(.text._unlink_r+0x18): undefined reference to _unlink'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-writer.o): in function _write_r': writer.c:(.text._write_r+0x24): undefined reference to _write'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-closer.o): in function _close_r': closer.c:(.text._close_r+0x18): undefined reference to _close'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-isattyr.o): in function _isatty_r': isattyr.c:(.text._isatty_r+0x18): undefined reference to _isatty'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-linkr.o): in function _link_r': linkr.c:(.text._link_r+0x1c): undefined reference to _link'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-lseekr.o): in function _lseek_r': lseekr.c:(.text._lseek_r+0x24): undefined reference to _lseek'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-readr.o): in function _read_r': readr.c:(.text._read_r+0x24): undefined reference to _read'
./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ./gcc-arm/x86_64/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): in function abort': abort.c:(.text.abort+0x10): undefined reference to _exit'
collect2: error: ld returned 1 exit status

Thanks,
SK

from coremark-pro.

petertorelli avatar petertorelli commented on August 15, 2024

For everything except the three th_/al_ functions, this is expected behavior. You are compiling a linux program on a baremetal compiler. arm-none-eabi does not have operating system support built in, which is why _link_r, _lseek, _exit, abort are not defined: those are part of the linux library. If you had used arm-linux-eabi then it would have compiled. This is unrelated to the benchmark. Here is a good explanation of the three components in the toolchain name.

from coremark-pro.

petertorelli avatar petertorelli commented on August 15, 2024

Closing this since there has been no follow up.

from coremark-pro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.