gnatmake -o标志产生不正确的对象文件名

Jon*_*lor 1 gcc ada gnat ghdl

我正在尝试使用编译.adb文件gnatmake,并且该-o标志未产生我想要的目标文件名:

$ gnatmake --GCC=g++ -D bin/src/ghdl_grt/ -f -u -c src/ghdl_grt/grt-vstrings_io.adb -o bin/src/ghdl_grt/grt-vstrings_io.adb.o

g++ -c -Isrc/ghdl_grt/ -I- -o /home/jon/controlix-code/bin/src/ghdl_grt/grt-vstrings_io.o src/ghdl_grt/grt-vstrings_io.adb
Run Code Online (Sandbox Code Playgroud)

如您所见,它获得正确的路径,但文件名应以结尾,.adb.o并且仅以结尾.o。有任何想法吗?

Sim*_*ght 5

For gnatmake, -o 'chooses an alternate executable name'. But even using gcc (or g++) on its own fails, at any rate on macOS, because gnat1: incorrect object file name.

I found that you can compile to assembler and then compile that. Using a local file I happened to have lying about,

$ g++ -D $PWD -c gator2.adb -S -o gator2.adb.s
$ g++ -D $PWD -c gator2.adb.s
Run Code Online (Sandbox Code Playgroud)