On Mon, Aug 31, 2020 at 4:34 PM Giacomo Tesio <giac...@tesio.it> wrote:
>
> Hello everybody!
>
> To cleanup my port of GCC (9.2.0) to Jehanne OS (http://jehanne.io)
> I'd like to add a `--posixly` command line options to the gcc driver
> that should be expanded to a couple of -isystem and -L options
> to ease the compilation of POSIX programs (Jehanne is a Plan 9
> derivative so it's not a POSIX system).
>
> So I defined in the gcc/config/jehanne.h (see attachment) the macros
> LINK_SPEC, LIB_SPEC and CPP_SPEC that substitute such command line
> options as required.

You might need to add it to a .opt file like it is done in darwin.opt:
; Driver options.

all_load
Driver RejectNegative Alias(Zall_load)
Load all members of archive libraries, rather than only those that
satisfy undefined symbols.

Thanks,
Andrew Pinski

>
> What's weird is that, if I dump the specs file with `gcc -dumpspecs`
> and then load it with `gcc -specs=dump` it works like a charm,
> properly translating the --posixly option.
>
> However without the -specs option, it can't recognise such option.
>
> I have no idea of what I'm missing.
> I tried to put the dump into PREFIX/lib/gcc/x86_64-jehanne/9.2.0/specs
> (also in the attachments) but it doesn't change anything.
> Yet, by using the -specs= option it works.
>
>
> Am I missing something obvious?
>
> Thanks for your help and sorry if the issue is dumb: I tried my best to
> understand the Gcc Internals but I was unable to fix this.
>
>
> Giacomo

Reply via email to