When compiled, the attached code refers to the 64 bit unsigned divmod helper function '__aeabi_uldivmod' even though the function is never called. This causes a link error when cross-compiling an ARM Linux 2.6.38 kernel.
To reproduce:
* Make a arm-linux-gnueabi cross compiler configured with --with-mode=thumb --with-arch=armv7-a --with-tune=cortex-a9 --with-float=softfp --with-fpu=neon
* Compile the attached code with 'arm-linux-gnueabi-gcc -O2 -S wm8974.i'
* See a '.global __aeabi_uldivmod' in the header of wm8974_set_dai_pll
Marking pll_factors() as noinline or putting asm("" : "+r"(source)); before the call to do_div() works around the problem.
Created attachment 24107
Preprocessed source
When compiled, the attached code refers to the 64 bit unsigned divmod helper function '__aeabi_uldivmod' even though the function is never called. This causes a link error when cross-compiling an ARM Linux 2.6.38 kernel.
To reproduce: tune=cortex- a9 --with-float=softfp --with-fpu=neon gnueabi- gcc -O2 -S wm8974.i'
* Make a arm-linux-gnueabi cross compiler configured with --with-mode=thumb --with-arch=armv7-a --with-
* Compile the attached code with 'arm-linux-
* See a '.global __aeabi_uldivmod' in the header of wm8974_set_dai_pll
Marking pll_factors() as noinline or putting asm("" : "+r"(source)); before the call to do_div() works around the problem.