This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Help! on building ecosconfigure
- To: NarayVA at nsc-msg01 dot network dot com
- Subject: Re: [ECOS] Help! on building ecosconfigure
- From: Mark Salter <msalter at redhat dot com>
- Date: Thu, 19 Apr 2001 15:43:15 -0400
- CC: gthomas at cambridge dot redhat dot com, ecos-discuss at sourceware dot cygnus dot com, ecos-discuss at sourceware dot cygnus dot com, jlarmour at redhat dot com
- References: <A7E1C26945C8D211ADBF0008C709661A02A487DF@nsc-msg02.network.com>
>>>>> Narayana, Venkat A writes:
> Why am i getting these new errors/ does my path is bad?
> And why did in the mixed up case of gcc and ld, binaries got built.
> ___Start____
> redboot_net_io.o(.text+0xa00): undefined reference to `puts'
> redboot_net_io.o(.text+0xa4c): undefined reference to `puts'
> /home/users/redboot.ROM/install/lib/libtarget.a(io_flash_flash.o): In
> function `flash_erase':
> io_flash_flash.o(.text+0x2c8): undefined reference to `putchar'
> io_flash_flash.o(.text+0x2e0): undefined reference to `putchar'
> /home/users/redboot.ROM/install/lib/libtarget.a(io_flash_flash.o): In
> function `flash_program'
> ___End___
Hmm, I saw this on another architecture that uses a recent gcc.
The problem is with gcc builtins. Gcc "optimizes" things like:
printf("foo") ==> puts("foo")
and
printf("\n") ==> putchar('\n')
Of course, RedBoot doesn't provide putchar or puts, so you get link
errors. Try this patch which adds -fno-builtin to the compile line.
--Mark
Index: hal_arm_iq80310.cdl
===================================================================
RCS file: /home/cvs/ecc/ecc/hal/arm/iq80310/current/cdl/hal_arm_iq80310.cdl,v
retrieving revision 1.14
diff -u -p -5 -c -r1.14 hal_arm_iq80310.cdl
cvs server: conflicting specifications of output style
*** hal_arm_iq80310.cdl 2001/04/17 14:42:58 1.14
--- hal_arm_iq80310.cdl 2001/04/19 19:35:59
*************** cdl_package CYGPKG_HAL_ARM_IQ80310 {
*** 192,202 ****
cdl_option CYGBLD_GLOBAL_CFLAGS {
display "Global compiler flags"
flavor data
no_define
! default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
description "
This option controls the global compiler flags which are used to
compile all packages by default. Individual packages may define
options which override these global flags."
}
--- 192,202 ----
cdl_option CYGBLD_GLOBAL_CFLAGS {
display "Global compiler flags"
flavor data
no_define
! default_value { "-fno-builtin -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -mapcs-frame" }
description "
This option controls the global compiler flags which are used to
compile all packages by default. Individual packages may define
options which override these global flags."
}