[RTEMS Project] #3021: libbsd cannot compile with -O0 option

RTEMS trac trac at rtems.org
Mon May 22 16:41:30 UTC 2017


#3021: libbsd cannot compile with -O0 option
--------------------------+---------------------
 Reporter:  phongvanpham  |       Owner:  (none)
     Type:  defect        |      Status:  new
 Priority:  normal        |   Milestone:
Component:  libbsd        |     Version:  4.12
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+---------------------

Comment (by phongvanpham):

 Replying to [comment:1 Sebastian Huber]:
 > Which BSP did you use? I use -O0 sometimes and it works well.

 The issue has to do with a lack of the following additional compiler (and
 linker) options

 -ffunction-sections
 -fdata-sections
 -Wl,--gc-sections

 when compiling with -O0.

 Since some of compiler+linker options are partially taken from BSP
 settings, are you mandating that the above options to be in the BSP in
 order to use libbsd?

 Personally, I don't think it is a good idea.  If you need them to compile
 libbsd, you should explicitly state them in the waf compiling environment
 (assuming you don't want to fix the swi_remove symbol issue directly) by
 modifying the libbsd_waf.py (or wherever the input to the tool that
 autogenerate libbsd_waf.py).  In this way, you're removing the dependency
 from BSP compiling options.

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


More information about the bugs mailing list