0

I'm using ARMCC toolchain in a cmake job. as my experience,when using armlink to link the object files and libraries, if the libraries is packed up by armar -rc or other options.Anyway, in the last link command, we need to add a suffix "(*)" for the libraries so that armlink can treat the libraries the same as objects. but in the toolchain file. the link command is written as:

set(CMAKE_${lang}_LINK_EXECUTABLE      "<CMAKE_LINKER> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS> -o <TARGET> --list <TARGET_BASE>.map")

I can't figure out a way to add a suffix to the libraries,at the same time when using armar to packup the libraries there is no this suffix"(*)"

armlink --partial can solve this problem in another aspect,but I hope there is a way to add suffix only in this link command. Thx!

  • Did you try adding the suffix to the line you provided? What happened when you did? Can you provide an example of the *desired* link command? – Kevin Nov 22 '19 at 12:37
  • I have tried to add a (*) behind the , but it's useless – ck Young Nov 25 '19 at 11:54
  • How is the syntax `` used? This is not typical CMake syntax, so can you provide a more concrete example of what this line looks like, or gets expanded to in some form? And please provide what the **desired** link libraries command should look like afterward. – Kevin Nov 25 '19 at 12:29
  • for example: when I'm generating the link libraries, I set the library suffix to ".a".It's file name is `example.a`.But when I need to use it on the `LINK_EXECUTABLE` command, I want it to be added a suffix `(*)` which is look like `example.a(*)` in the link command.If there are more than one libraries, every library should be added a suffix`(*)` – ck Young Nov 26 '19 at 04:16
  • 1
    For example: the current cmake generated link command: `armlink.exe --cpu xxx --info totals -o helloworld.axf --list helloworld.map main.o alib.a blib.a` the desired link command: `armlink.exe --cpu xxx --info totals -o helloworld.axf --list helloworld.map main.o alib.a(*) blib.a(*)` – ck Young Nov 26 '19 at 04:25

0 Answers0