[RTEMS Project] #4078: GCC C++ compiler for powerpc defines _GNU_SOURCE as a built-in

RTEMS trac trac at rtems.org
Tue Sep 15 03:19:01 UTC 2020


#4078: GCC C++ compiler for powerpc defines _GNU_SOURCE as a built-in
-----------------------------+------------------------------
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  defect           |      Status:  assigned
 Priority:  normal           |   Milestone:  6.1
Component:  arch/powerpc     |     Version:  6
 Severity:  normal           |  Resolution:
 Keywords:                   |  Blocked By:
 Blocking:                   |
-----------------------------+------------------------------

Comment (by Chris Johns):

 Replying to [comment:2 Joel Sherrill]:
 > How did you spot this?

 I have updated `rtems-exeinfo` to optionally output the full flags used to
 build an object file.
 {{{
 $ rtems-exeinfo -O --full-flags `find . -name hello.exe`
 }}}
 This is the output from `hello.exe` for the `psim` showing a mix of
 options:
 {{{
    | wcrtomb.c                         : -mcpu=603e -mcpu=603e -g -O2
 -fno-builtin -ffunction-sections -fdata-sections
    | wctomb_r.c                        : -mcpu=603e -mcpu=603e -g -O2
 -fno-builtin -ffunction-sections -fdata-sections
    | wkspace.c                         : -mcall-sysv -meabi -mcpu=603e
 -msdata=sysv -g -O2 -fno-common -fno-keep-inline-functions -ffunction-
 sections -fdata-sections
    | wkspaceisunifieddefault.c         : -mcall-sysv -meabi -mcpu=603e
 -msdata=sysv -g -O2 -fno-common -fno-keep-inline-functions -ffunction-
 sections -fdata-sections
    | write.c                           : -mcall-sysv -meabi -mcpu=603e
 -msdata=sysv -g -O2 -fno-common -fno-keep-inline-functions -ffunction-
 sections -fdata-sections
    | write_r.c                         : -mcall-sysv -meabi -mcpu=603e
 -msdata=sysv -g -O2 -fno-common -fno-keep-inline-functions -ffunction-
 sections -fdata-sections
    | wsetup.c                          : -mcpu=603e -mcpu=603e -g -O2
 -fno-builtin -ffunction-sections -fdata-sections
 }}}
 And there is the `pc686` BSP with LibBSD showing the `i386` issue:
 {{{
    | tzset.c                               : -mtune=pentiumpro -march=i386
 -g -O2 -fno-builtin -ffunction-sections -fdata-sections
    | tzset_r.c                             : -mtune=pentiumpro -march=i386
 -g -O2 -fno-builtin -ffunction-sections -fdata-sections
    | tzvars.c                              : -mtune=pentiumpro -march=i386
 -g -O2 -fno-builtin -ffunction-sections -fdata-sections
    | u_strerr.c                            : -mtune=pentiumpro -march=i386
 -g -O2 -fno-builtin -ffunction-sections -fdata-sections
    | uart_bus_pci.c                        : -mtune=pentiumpro
 -march=pentium -g -O2 -ffunction-sections -fdata-sections
    | udp6_usrreq.c                         : -mtune=pentiumpro
 -march=pentium -g -O2 -ffunction-sections -fdata-sections -fno-strict-
 aliasing -ffreestanding -fno-common
    | udp_usrreq.c                          : -mtune=pentiumpro
 -march=pentium -g -O2 -ffunction-sections -fdata-sections -fno-strict-
 aliasing -ffreestanding -fno-common
    | uenvgetgroups.c                       : -mtune=pentiumpro
 -march=pentium -g -O2 -ffunction-sections -fdata-sections
    | uipc_accf.c                           : -mtune=pentiumpro
 -march=pentium -g -O2 -ffunction-sections -fdata-sections -fno-strict-
 aliasing -ffreestanding -fno-common
    | uipc_domain.c                         : -mtune=pentiumpro
 -march=pentium -g -O2 -ffunction-sections -fdata-sections -fno-strict-
 aliasing -ffreestanding -fno-common
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4078#comment:4>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list