Other Parts Discussed in Thread: SYSBIOS
Hello,
I have a massive project that I an updating from TI 17.3.0 STS to GNUC 7.3.1. After weeks of updating code to handle the stricter and tighter syntax in the GNU compiler, I now have linker errors.
This is a SYSBIOS 6.46.5.55 and XDC 3.32.2.25 project.
I have CHECKED "Do not use standard system..." "Do not link with the shared..." and "Remove unused sections" in the linker section, because a generic SYSBIOS project of the same packages has those checked as well.
Although for this project, I had to add stdc++ which the generic SYSBIOS project didn't have (and yet that, as well as others, do not show in the output console???)
After a dozen searches, trials, and errors of various settings (which I can't get any explanation of what they do... just to set it), I got it down to these two missing references:
---------------------------------------------------------------------------
C:\source\....\src\sysbios\sysbios.aa8fg(gnu_ReentSupport.o): In function `ti_sysbios_rts_gnu_ReentSupport_Module_startup__E':
C:/ti/bios_6_46_05_55/packages/ti/sysbios/rts/gnu/ReentSupport.c:83: undefined reference to `ti_sysbios_rts_gnu_ReentSupport_checkIfCorrectLibrary'
c:/ti/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/hard\libstdc++_nano.a(locale_init.o): In function `(anonymous namespace)::get_locale_mutex()':
locale_init.cc:(.text._ZN12_GLOBAL__N_116get_locale_mutexEv+0xc): undefined reference to `__sync_synchronize'
c:/ti/gcc-arm-none-eabi-7-2018-q2-update/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/hard\libstdc++_nano.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
locale.cc:(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x18): undefined reference to `__sync_synchronize'
collect2.exe: error: ld returned 1 exit status
-------------------------------------------------------------------
(I had to paste this directly in, because the web site is perpetually broken, and no one cares... Inserting code gives me "access denied")
These are NOT reference in our project. They are CCS libraries looking for stuff in other CCS libraries.
The linker command is:
----------------------------------------------------------------
Building target: "{name}.out"
Invoking: GNU Linker
Flags: -mtune=cortex-a8 -Dam3359 -D... snipped
-Og -g -gdwarf-3 -gstrict-dwarf -Wall -mfloat-abi=hard -Wl,-Map,"{name}.map" -nostartfiles -static -Wl,--gc-sections
-L"C:/ti/bios_6_46_05_55/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu"
-L"C:/.../WolfSSL-4-7/Release__GNU"
--specs=nano.specs
"C:/ti/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc-7.3.1.exe"
@"ccsLinker.opt" -o"{name}.out"
----------------------------------------------------------------
Oddly enough, when I change the linker libraries in the settings from
${xdc_find:gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu:${ProjName}}
to
${xdc_find:gnu/targets/arm/libs/install-native/arm-none-eabi/lib/hard:${ProjName}}
One of the linker lines disappears! But I still have the exact same errors (missing references)
--------------------------------------------------------------
Building target: "{name}.out"
Invoking: GNU Linker
Flags: -mtune=cortex-a8 -Dam3359 -D...
-Og -g -gdwarf-3 -gstrict-dwarf -Wall -mfloat-abi=hard -Wl,-Map,"{name}.map" -nostartfiles -static -Wl,--gc-sections
(the ....arm-none-eabi/lib/fpu" line is now gone... not replaced with 'hard' ??!!)
-L"C:/.../WolfSSL-4-7/Release__GNU"
--specs=nano.specs
"C:/ti/gcc-arm-none-eabi-7-2018-q2-update/bin/arm-none-eabi-gcc-7.3.1.exe"
@"ccsLinker.opt" -o"{name}.out"
------------------------------------------------------------------
Now then... This page: e2e.ti.com/.../rtos-sysbios-gnu-linker-error-with-sysbios-v06-52-00-12
simply says to go to this page: software-dl.ti.com/.../FAQ.html

Which is useless, because it says " and not using CCS." Well, I am using CCS. It also says " make sure that you are using libc, libgcc, libm, etc. " Well, what is "etc" ?? And is CCS failing to include whatever those "etc" libraries are?
The libs I have listed are ${COM_TI_BIOS_LIBRARIES} gcc m nosys stdc++ c WolfSSL-4-7 (although the last one isn't relevant to this issue)
It also then sends me to this page: e2e.ti.com/.../3109064
Which doesn't seems to address the issue from the second page, let alone solve it for the first post.
As is typical of this environment, I can create or import a new SYSBIOS project and it builds. But I cannot alter an existing one without requiring a doctorate in this environment. We are not starting from scratch with hundreds and hundreds of source files.
Can anyone tell me where to look? What is missing? What setting to turn on or off?
Does anyone know how this works? (My last post was "I don't why it does X, but you can get around it by doing Y ")
-CSW
