[haiku-commits] Re: BRANCH xyzzy-github.x86_64 - in src/add-ons/kernel/bus_managers/acpi: include acpica/include executer acpica/components/executer acpica/components

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 12 Jul 2012 16:15:54 +0200

xyzzy-github.x86_64 wrote:
> 6ba74ba: Fixed compilation of the boot loader on GCC 2.
>  
>  Not sure why but GCC 2 seems to be ignoring the extern "C" in smp.h when
>  compiling smp_boot_other_cpus() resulting in undefined references. Fixed
>  by putting extern "C" on the definition too.

Might have to do with the "void (*entryFunc)()" parameter. In C mode it is 
interpreted as "void (*entryFunc)(...)" while in C++ it is "void 
(*entryFunc)(void)". My guess is that the 'extern "C"' forces interpretation in 
C mode while the function definition is interpreted in C++ mode. So the 
signatures don't match and the symbol name is C++ mangled. If that assumption 
is correct, adding the "void" explicitly in both prototype and definition 
should help.

CU, Ingo

Other related posts: