Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sonic Zhang <sonic.adi@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2 v2] package: Makefile.in: Add target compilation flags for Blackfin.
Date: Tue, 21 Aug 2012 12:45:49 +0800	[thread overview]
Message-ID: <1345524349-709-2-git-send-email-sonic.adi@gmail.com> (raw)
In-Reply-To: <1345524349-709-1-git-send-email-sonic.adi@gmail.com>

From: Sonic Zhang <sonic.zhang@analog.com>

1) Add CPU type and revision CFLAGS
2) Add NOMMU compilation flags
3) Add FLAT ABI link flags
4) Add FLAT (Separate Data) ABI flags
5) Add share FLAT ABI flags

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
 package/Makefile.in |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 6fad224..1b9a612 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -85,7 +85,13 @@ ifeq ($(BR2_DEBUG_3),y)
 TARGET_DEBUGGING=-g3
 endif
 
-TARGET_CFLAGS=$(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING)
+ifeq ($(BR2_GCC_TARGET_CPU_REVISION),)
+TARGET_CPU=-mcpu=$(BR2_GCC_TARGET_CPU)
+else
+TARGET_CPU=-mcpu=$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)
+endif
+
+TARGET_CFLAGS=$(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_CPU)
 
 ifeq ($(findstring yy,$(BR2_mips)$(BR2_MIPS_ABI64)),yy)
 TARGET_CFLAGS+=-fno-pic -mno-abicalls
@@ -95,9 +101,29 @@ ifeq ($(BR2_LARGEFILE),y)
 TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 endif
 
+ifneq ($(BR2_USE_MMU), y)
+TARGET_CFLAGS += -D__NOMMU__ -D__uClinux__
+endif
+
 TARGET_CXXFLAGS=$(TARGET_CFLAGS)
 TARGET_LDFLAGS=$(call qstrip,$(BR2_TARGET_LDFLAGS))
 
+ifeq ($(BR2_ABI_FLAT),y)
+TARGET_LDFLAGS += -Wl,-elf2flt
+endif
+
+ifeq ($(BR2_BFIN_FLAT_SEP_DATA),y)
+TARGET_LDFLAGS += -msep-data
+TARGET_CFLAGS += -msep-data
+TARGET_CXXFLAGS += -msep-data
+endif
+
+ifeq ($(BR2_BFIN_SHARED_FLAT), y)
+TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
+TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
+TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
+endif
+
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG),y)
 TARGET_CROSS=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-
 else
-- 
1.7.0.4

      reply	other threads:[~2012-08-21  4:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21  4:45 [Buildroot] [PATCH 1/2 v2] buildroot: target: Add Blackfin architecture support Sonic Zhang
2012-08-21  4:45 ` Sonic Zhang [this message]

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=1345524349-709-2-git-send-email-sonic.adi@gmail.com \
    --to=sonic.adi@gmail.com \
    --cc=buildroot@busybox.net \
    /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