public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@linux.it>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] notes on cpu/mips/config.mk
Date: Fri, 16 Sep 2005 16:53:01 +0200	[thread overview]
Message-ID: <20050916145301.GB24660@enneenne.com> (raw)

Hello,

I have a mips based board and during u-boot support developing I
notice that in file ?cpu/mips/config.mk?:

* should be replaced this line 

   -mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
   +$(AS) --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')

to avoid errors for user not having ?mips-linux-as? (I have
mipsel-linux-as).

* should be used ?allow_branch_to_undefined? or
?mips_allow_branch_to_undefined? as GAS option? My toolchain use
?allow_branch_to_undefined?...

* Variable MIPSFLAGS is ambiguous, I suggest using MIPSCFLAGS and/or
MIPSLDFLAGS.

In the end I suggest the following patch for file cpu/mips/config.mk:

Index: cpu/mips/config.mk
===================================================================
RCS file: /home/develop/cvs_private/uboot-mips-exadron/cpu/mips/config.mk,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 config.mk
--- a/cpu/mips/config.mk        16 Sep 2005 12:14:19 -0000      1.1.1.1
+++ b/cpu/mips/config.mk        16 Sep 2005 14:19:29 -0000
@@ -21,20 +21,22 @@
 # MA 02111-1307 USA
 #
 v=$(shell \
-mips-linux-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
-MIPSFLAGS=$(shell \
+$(AS) --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}')
+MIPSCFLAGS=$(shell \
 if [ "$v" -lt "14" ]; then \
        echo "-mcpu=4kc"; \
 else \
-       echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined"; \
+       echo "-march=4kc -mtune=4kc -Wa,-allow_branch_to_undefined"; \
 fi)
 
 ifneq (,$(findstring 4KCle,$(CROSS_COMPILE)))
-ENDIANNESS = -EL
-else
-ENDIANNESS = -EB
+MIPSCFLAGS += -EL
+endif
+ifneq (,$(findstring mipsel,$(CROSS_COMPILE)))
+MIPSLDFLAGS += -EL
 endif
 
-MIPSFLAGS += $(ENDIANNESS) -mabicalls
+MIPSCFLAGS += -mabicalls
 
-PLATFORM_CPPFLAGS += $(MIPSFLAGS)
+PLATFORM_CPPFLAGS += $(MIPSCFLAGS)
+PLATFORM_LDFLAGS += $(MIPSLDFLAGS)

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti at linux.it
Linux Device Driver                             giometti at enneenne.com
Embedded Systems                     home page: giometti.enneenne.com
UNIX programming                     phone:     +39 349 2432127

             reply	other threads:[~2005-09-16 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-16 14:53 Rodolfo Giometti [this message]
2005-09-19  6:02 ` [U-Boot-Users] [PATCH] notes on cpu/mips/config.mk Matej Kupljen
2005-09-29 14:56 ` Chuck Meade
2005-09-29 15:31   ` Rodolfo Giometti
2005-09-29 16:26     ` Chuck Meade
2005-09-30 12:37       ` Rodolfo Giometti

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=20050916145301.GB24660@enneenne.com \
    --to=giometti@linux.it \
    --cc=u-boot@lists.denx.de \
    /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