public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Mark Salter <msalter@redhat.com>
To: NarayVA@nsc-msg01.network.com
Cc: gthomas@cambridge.redhat.com, ecos-discuss@sourceware.cygnus.com,
	ecos-discuss@sourceware.cygnus.com, jlarmour@redhat.com
Subject: Re: [ECOS] Help! on building ecosconfigure
Date: Thu, 19 Apr 2001 12:40:00 -0000	[thread overview]
Message-ID: <200104191943.f3JJhFr24942@deneb.localdomain> (raw)
In-Reply-To: <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."
          }

  parent reply	other threads:[~2001-04-19 12:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-19 12:16 Narayana, Venkat A.
2001-04-19 12:33 ` Gary Thomas
2001-04-19 12:39   ` Jonathan Larmour
2001-04-19 12:35 ` Jonathan Larmour
2001-04-19 12:40 ` Mark Salter [this message]
2001-04-19 12:51   ` Jonathan Larmour
2001-04-19 13:03     ` Lewin A.R.W. Edwards
2001-04-19 13:56       ` Jonathan Larmour
2001-04-19 14:04         ` Lewin A.R.W. Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-04-19 14:32 Narayana, Venkat A.
2001-04-19 11:09 Narayana, Venkat A.
2001-04-19 11:47 ` Gary Thomas
2001-04-18 11:18 Narayana, Venkat A.
2001-04-18 11:30 ` Jonathan Larmour
2001-04-18 10:48 Narayana, Venkat A.
2001-04-18 10:56 ` Jonathan Larmour
2001-04-18 10:27 Narayana, Venkat A.
2001-04-18 10:32 ` Jonathan Larmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200104191943.f3JJhFr24942@deneb.localdomain \
    --to=msalter@redhat.com \
    --cc=NarayVA@nsc-msg01.network.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=gthomas@cambridge.redhat.com \
    --cc=jlarmour@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).