From patchwork Wed Jul 16 21:57:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nye Liu X-Patchwork-Id: 370885 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 84CA0140095 for ; Thu, 17 Jul 2014 07:57:41 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=aFoV19nWo5S120vPB517MCdLZUA/p 9Sv/VcksCYu5GJ5tcngvTQGwzkiTXJA1XjROBPcFm4or6WirYEYh5WXcWOuWnpYd /j7urO6rxut9bs5aL5gCdLvOJJFz4Bmdi2uvA7/J+kk5GOY4+04ycOS0Zflch8/B sHBSlr0eGeK18I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=f8dNPScOwbZf+1gZxzv+/t+LSeE=; b=vf8 rKrR/9pkSpZWXvjgXVLvy5MBbDzmp+eudjkYg+/W6EbcG6yuw/Q/2JuMDU+OFJeF +XCSByXyt4YphlyrkyBgjg3LHfAqv9gy98GyBbEFV0yptY4vLiFAgE9t6SMmCvK7 aVXBNYJwO9Fc5S1wpLBVoeLTDH4ipvEiSqaGAoU4= Received: (qmail 30488 invoked by alias); 16 Jul 2014 21:57:33 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 30465 invoked by uid 89); 16 Jul 2014 21:57:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SEMBACKSCATTER, SPF_HELO_PASS, SPF_PASS autolearn=no version=3.3.2 X-HELO: emea01-am1-obe.outbound.protection.outlook.com Received: from mail-am1lp0010.outbound.protection.outlook.com (HELO emea01-am1-obe.outbound.protection.outlook.com) (213.199.154.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 16 Jul 2014 21:57:30 +0000 Received: from jane.chatsunix.int.mrv.com (173.198.60.232) by DBXPR03MB015.eurprd03.prod.outlook.com (10.242.145.148) with Microsoft SMTP Server (TLS) id 15.0.980.8; Wed, 16 Jul 2014 21:57:25 +0000 Received: from hobag.chatsunix.int.mrv.com (hobag.chatsunix.int.mrv.com [192.168.17.19]) by jane.chatsunix.int.mrv.com (Postfix) with ESMTPS id 624EB26F11 for ; Wed, 16 Jul 2014 14:57:14 -0700 (PDT) Received: from nyet by hobag.chatsunix.int.mrv.com with local (Exim 4.82) (envelope-from ) id 1X7XCM-000743-5u for crossgcc@sourceware.org; Wed, 16 Jul 2014 14:57:14 -0700 Date: Wed, 16 Jul 2014 14:57:14 -0700 From: Nye Liu To: Subject: [PATCH] Allow -m32 to be passed via CT_EXTRA_CFLAGS_FOR_BUILD when building 32-bit crossgdb on 64-bit machine Message-ID: <20140716215713.GA25910@mrv.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-ClientProxiedBy: CO2PR04CA020.namprd04.prod.outlook.com (10.141.240.148) To DBXPR03MB015.eurprd03.prod.outlook.com (10.242.145.148) X-Microsoft-Antispam: BCL:0;PCL:0;RULEID: X-Forefront-PRVS: 0274272F87 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(6009001)(41584004)(199002)(189002)(36756003)(95666004)(105586002)(50466002)(83072002)(85852003)(77096002)(87976001)(21056001)(110136001)(74502001)(83506001)(81342001)(66066001)(46656002)(101416001)(46102001)(19580405001)(77982001)(81542001)(19580395003)(102836001)(83322001)(76482001)(79102001)(92726001)(23726002)(4396001)(20776003)(54356999)(47776003)(64706001)(107886001)(50986999)(80022001)(99396002)(106356001)(33656002)(92566001)(2351001)(57986006)(46406003)(83796002)(229853001)(86362001)(85306003)(74662001)(97756001)(107046002)(31966008); DIR:OUT; SFP:; SCL:1; SRVR:DBXPR03MB015; H:jane.chatsunix.int.mrv.com; FPR:; MLV:sfv; PTR:InfoNoRecords; MX:1; LANG:en; X-OriginatorOrg: mrv.com Not sure if this is the right way to do it, but I pass -m32 via CT_EXTRA_CFLAGS_FOR_BUILD when building 32-bit binaries on a 64-bit host. Without this, crosstool will build everything 32-bit EXCEPT for gdb! Perhaps it should just go in CC_for_gdb and LD_for_gdb? Especially if explicitly specifying "-g -O2" (the default in gdb configure) is a bad idea? diff -r 069f43a215cc scripts/build/debug/300-gdb.sh --- a/scripts/build/debug/300-gdb.sh Wed Jun 25 23:33:01 2014 +0200 +++ b/scripts/build/debug/300-gdb.sh Wed Jul 16 14:51:58 2014 -0700 @@ -155,6 +155,8 @@ CT_DoExecLog CFG \ CC="${CC_for_gdb}" \ LD="${LD_for_gdb}" \ + CFLAGS="-g -O2 ${CT_EXTRA_CFLAGS_FOR_BUILD}" \ + CXXFLAGS="-g -O2 ${CT_EXTRA_CFLAGS_FOR_BUILD}" \ "${gdb_src_dir}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \