https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116833
Bug ID: 116833
Summary: Symbian: incorrect configuration for crtfastmath.o
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: fedor_qd at mail dot ru
Target Milestone: ---
Here config from libgcc/config.host:
565 arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
566 tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
567 tm_file="$tm_file arm/bpabi-lib.h"
568 case ${host} in
569 arm*-*-eabi* | arm*-*-rtems*)
570 tmake_file="${tmake_file} arm/t-bpabi arm/t-sync t-crtfm"
571 extra_parts="crtbegin.o crtend.o crti.o crtn.o"
572 ;;
573 arm*-*-symbianelf*)
574 tmake_file="${tmake_file} arm/t-symbian t-slibgcc-nolc-override"
575 tm_file="$tm_file arm/symbian-lib.h"
576 # Symbian OS provides its own startup code.
577 ;;
578 esac
579 tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
580 extra_parts="$extra_parts crtfastmath.o"
581 unwind_header=config/arm/unwind-arm.h
582 ;;
At line 570 t-crtfm says where look for crtfastmath.o. But it matters for
arm*-*-eabi* and arm*-*-rtems* targets only.
At line 580 declared additional dependency - crtfastmath.o without t-crtfm pair
in Symbian part.
That cause build error because location for crtfastmath.o not set.
As temporal solution I change line 580 to ‘ extra_parts="$extra_parts" ’ and
error gone. Builds was fine. Even libstdc++.a builded.
Pattern at line 580 widely used in libgcc/config.host. It’s was usual
copy-paste mistake. I notice that by accident.
I look closely at libgcc\config\arm\crtfastmath.c. It compiled if macro
__SOFTFP__ not defined. Symbian use softfp ABI for float numbers.
I build simple helloword with default options and some code:
#if __SOFTFP__
#pragma message "__SOFTFP__"
#endif
I got:
note: '#pragma message: __SOFTFP__'
Does GCC have crtfastmath.c for softfp ABI?
Proposed fix: change line 571 to
extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o"
and line 580 to:
extra_parts="$extra_parts"