Opened on 05/18/17 at 17:27:43
Closed on 05/24/17 at 05:16:37
#3021 closed defect (wontfix)
libbsd cannot compile with -O0 option
Reported by: | phongvanpham | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | network/libbsd | Version: | 5 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Currently the symbol swi_remove is #ifdef'ed out in rtems (kern_intr.c). However, there are places that were referencing swi_remove without #ifdef around it. I am new to libbsd and I currently do not have expertise to determine if the actual swi test itself needs to be removed or just ifdef'ed out where swi_remove symbol is referenced or anything in between. Attached is a screenshot showing swi_remove is referenced.
One last note, compiling with -O2 is ok.
Attachments (1)
Change History (6)
Changed on 05/18/17 at 17:28:15 by phongvanpham
Attachment: | swi_remove_symbol_missing.PNG added |
---|
comment:1 follow-up: 2 Changed on 05/19/17 at 07:35:31 by Sebastian Huber
comment:2 Changed on 05/22/17 at 16:41:30 by phongvanpham
Replying to 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.
comment:3 follow-up: 4 Changed on 05/23/17 at 05:57:30 by Sebastian Huber
Every BSP should use these options. Yes, its not obvious and setting these options explicitly in every BSP is bad.
comment:4 Changed on 05/23/17 at 16:41:35 by phongvanpham
Replying to Sebastian Huber:
Every BSP should use these options. Yes, its not obvious and setting these options explicitly in every BSP is bad.
From your comment, I couldn't figure out what your plan of action is.
If it is a mandate that every BSP is required to have those compiler/linker options in order to use rtems-libbsd, then this ticket is no longer valid and pls. feel free to close it as "wont fix".
From my end, there is nothing else to do for this ticket.
comment:5 Changed on 05/24/17 at 05:16:37 by Sebastian Huber
Resolution: | → wontfix |
---|---|
Status: | new → closed |
There are some tickets to enable these options on every BSP.
Which BSP did you use? I use -O0 sometimes and it works well.