https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119414

            Bug ID: 119414
           Summary: cobol driver unconditionally adds platform-specific
                    command line options.
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: cobol
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

The following options are added unconditionally by gcobolspec.cc and either
need conditionalising or removing:

(plus some comment as to why they are required).

1. -rdynamic  (this might not be supported on all targets).

What is this needed for?
perhaps the library is using some symbol that the executable is meant to
export?

perhaps (on targets that would otherwise hide it) we can explicitly export the
necessary symbol(s).

This will effectively (as I understand it) cause the exe to export all symbols
- which can cause issues if it is statically linked with some libraries (e.g.
libstdc++).

2. --allow-multiple-definitions (not supported by all linkers)

Why do we need to allow multiple definitions?
(in any event, iff it is needed, then we need some configuration changes to use
whatever option the target's linker supports, if any).

3. pic/PIC options. (these are target-specific in general).

It's not clear why the gcobol driver needs to be concerned with these -
typically the target-specific specs processing handles this.

Reply via email to