x86_64 tools gcc error: unrecognized command line option '-qnolinkcmds'

Joel Sherrill joel at rtems.org
Fri Apr 6 14:44:36 UTC 2018


If this is what you think is missing, feel free to submit a patch to
gcc-patches@ and
cc' myself and Sebastian. One of us will have to approve it and merge it.

Good spot.

$ git diff
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 75d0ae8..f23fe4a 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1496,7 +1496,7 @@ x86_64-*-elf*)
        tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h
newlib-stdin
        ;;
 x86_64-*-rtems*)
-       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h
newlib-stdin
+       tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h
newlib-stdin
        ;;
 i[34567]86-*-rdos*)
     tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h
newlib-stdint.h

On Fri, Apr 6, 2018, 3:35 AM Amaan Cheval <amaan.cheval at gmail.com> wrote:

> Whoops, I just realized that by rtems.h, you probably meant the top-level
> one[1], not the arch-specific one. That makes a lot more sense given that I
> see the GCC spec syntax with mention of qnolinkcmds in there too.
>
> I'll try recompiling the tools with the addition and send the GCC patch if
> that does it (unless of course, you'd rather do it, Joel). I don't believe
> a patch this small will require any paperwork either for copyright
> assignment or whatnot.
>
> [1] https://github.com/gcc-mirror/gcc/blob/gcc-7_2_0-
> release/gcc/config/rtems.h
>
> On Fri, Apr 6, 2018 at 1:43 PM Amaan Cheval <amaan.cheval at gmail.com>
> wrote:
>
>> As prep for my x86_64 port / BSP proposal, I'm building a stub port to
>> compile with the x86_64 toolset to surface any features the tools may be
>> missing. Here's an error I came across:
>>
>> make[1772]: Entering directory
>> '/media/commonhdd/repos/rtems/b-no_cpu/x86_64-rtems5/c/no_
>> bsp/cpukit/score/cpu'
>> x86_64-rtems5-gcc --pipe  -O2 -g -ffunction-sections -fdata-sections
>> -qnolinkcmds -nostdlib -r  -o dirutils.rel src/dirutils_rel-dirutils.o
>> Making all-am in .
>> x86_64-rtems5-gcc: error: unrecognized command line option '-qnolinkcmds'
>> Makefile:484: recipe for target 'dirutils.rel' failed
>>
>>  From previous correspondence[1], it seems like rtems.h in gcc is
>> relevant -
>> rtems-tools built x86_64-rtems5-gcc v7.2.0 and that does include
>> rtemself.h
>> here[2][3], which contains the same content as I expected from the rtems.h
>> for other architectures[4].
>>
>> Joel, do you have any thoughts off the top of your head? I'll continue
>> looking into it, but any background information I may be missing would be
>> useful.
>>
>> Thanks!
>>
>> [1] https://lists.rtems.org/pipermail/devel/2014-November/009177.html
>> [2]
>> https://github.com/gcc-mirror/gcc/blob/gcc-7_2_0-release/
>> gcc/config.gcc#L1450-L1452
>> [3]
>> https://github.com/gcc-mirror/gcc/blob/gcc-7_2_0-release/
>> gcc/config/i386/rtemself.h
>> [4]
>> https://github.com/gcc-mirror/gcc/blob/gcc-7_2_0-release/
>> gcc/config/aarch64/rtems.h
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180406/dc38fd22/attachment-0002.html>


More information about the devel mailing list