From patchwork Mon Aug 13 07:41:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 176868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id C875B2C008D for ; Mon, 13 Aug 2012 17:30:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0479610178F; Mon, 13 Aug 2012 07:30:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7Li05zgHEFa4; Mon, 13 Aug 2012 07:30:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id F0AC510172D; Mon, 13 Aug 2012 07:30:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A6EEE8F753 for ; Mon, 13 Aug 2012 07:30:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 95C538C3AF for ; Mon, 13 Aug 2012 07:30:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I7npxmOnqdF3 for ; Mon, 13 Aug 2012 07:30:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ch1outboundpool.messaging.microsoft.com (ch1ehsobe004.messaging.microsoft.com [216.32.181.184]) by whitealder.osuosl.org (Postfix) with ESMTPS id D7A048C3AC for ; Mon, 13 Aug 2012 07:30:40 +0000 (UTC) Received: from mail215-ch1-R.bigfish.com (10.43.68.246) by CH1EHSOBE008.bigfish.com (10.43.70.58) with Microsoft SMTP Server id 14.1.225.23; Mon, 13 Aug 2012 07:30:38 +0000 Received: from mail215-ch1 (localhost [127.0.0.1]) by mail215-ch1-R.bigfish.com (Postfix) with ESMTP id E546324048F; Mon, 13 Aug 2012 07:30:38 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.57; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta2.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-SpamScore: 8 X-BigFish: VS8(zzzz1202hzz8275bhz2ei87h2a8h668h839hd24he5bhe96h107ahff4o) Received-SPF: neutral (mail215-ch1: 137.71.25.57 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.57; envelope-from=sonic.adi@gmail.com; helo=nwd2mta2.analog.com ; 2.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail215-ch1 (localhost.localdomain [127.0.0.1]) by mail215-ch1 (MessageSwitch) id 1344843037230634_19889; Mon, 13 Aug 2012 07:30:37 +0000 (UTC) Received: from CH1EHSMHS008.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.243]) by mail215-ch1.bigfish.com (Postfix) with ESMTP id 36252E009B; Mon, 13 Aug 2012 07:30:37 +0000 (UTC) Received: from nwd2mta2.analog.com (137.71.25.57) by CH1EHSMHS008.bigfish.com (10.43.70.8) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 13 Aug 2012 07:30:35 +0000 Received: from NWD2HUBCAS1.ad.analog.com (nwd2hubcas1.ad.analog.com [10.64.73.29]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id q7D8Y4gD006240 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 13 Aug 2012 04:34:04 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.3.83.0; Mon, 13 Aug 2012 03:30:34 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id q7D7UWa5001954; Mon, 13 Aug 2012 03:30:33 -0400 Received: from localhost.localdomain (unknown [10.99.22.81]) by linux.site (Postfix) with ESMTP id B1D0C42CAE7D; Sun, 12 Aug 2012 17:56:28 -0600 (MDT) From: Sonic Zhang To: Thomas Petazzoni , Peter Korsgaard Date: Mon, 13 Aug 2012 15:41:14 +0800 Message-ID: <1344843674-27814-2-git-send-email-sonic.adi@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1344843674-27814-1-git-send-email-sonic.adi@gmail.com> References: <1344843674-27814-1-git-send-email-sonic.adi@gmail.com> MIME-Version: 1.0 Cc: buildroot@busybox.net, Sonic Zhang , buildroot-devel@blackfin.uclinux.org Subject: [Buildroot] [PATCH 2/2] package: Makefile.in: Add target compilation flags for Blackfin. X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Sonic Zhang 1) Add CPU type and revision CFLAGS 2) Add FLAT ABI LDFLAGS 3) Add share FLAT ABI FLAGS Signed-off-by: Sonic Zhang --- package/Makefile.in | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/package/Makefile.in b/package/Makefile.in index 6fad224..cda2297 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,23 @@ ifeq ($(BR2_LARGEFILE),y) TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 endif +ifeq ($(BR2_NOMMU), 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_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