From unknown Sat Jun 21 10:44:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25350: Automake does not override CC. Resent-From: "william estrada" Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Wed, 04 Jan 2017 02:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25350 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: 25350@debbugs.gnu.org X-Debbugs-Original-To: bug-automake@gnu.org Reply-To: MrUmunhum@CruzIO.com Received: via spool by submit@debbugs.gnu.org id=B.14834985887899 (code B ref -1); Wed, 04 Jan 2017 02:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jan 2017 02:56:28 +0000 Received: from localhost ([127.0.0.1]:40689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cObkZ-00023J-EU for submit@debbugs.gnu.org; Tue, 03 Jan 2017 21:56:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOayA-0000vG-3N for submit@debbugs.gnu.org; Tue, 03 Jan 2017 21:06:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOay4-0003rI-7D for submit@debbugs.gnu.org; Tue, 03 Jan 2017 21:06:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOay4-0003rA-4I for submit@debbugs.gnu.org; Tue, 03 Jan 2017 21:06:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOay2-0005YC-V8 for bug-automake@gnu.org; Tue, 03 Jan 2017 21:06:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOaxz-0003oY-OQ for bug-automake@gnu.org; Tue, 03 Jan 2017 21:06:18 -0500 Received: from mail.cruzio.com ([63.249.93.182]:2299) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOaxz-0003m8-E5 for bug-automake@gnu.org; Tue, 03 Jan 2017 21:06:15 -0500 Received: from cruziomail.cruzio.com (cruziomail.cruzio.com [63.249.93.173]) by mail.cruzio.com with ESMTP id v0426Fx9081644 for ; Tue, 3 Jan 2017 18:06:15 -0800 (PST) Received: from 216.173.131.138 (SquirrelMail authenticated user mrumunhum@cruzio.com) by cruziomail.cruzio.com with HTTP; Tue, 3 Jan 2017 18:06:12 -0800 Message-ID: <9ffd0a13f7867cbcbee75204c25f33aa.squirrel@cruziomail.cruzio.com> Date: Tue, 3 Jan 2017 18:06:12 -0800 From: "william estrada" User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Tue, 03 Jan 2017 21:56:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello, I have a Makefile.am that creates a Makefile that does 3 compiles, one for each target CPU. # src/event/Makefile.am AM_LDLAGS = --Pedantic -Wall -Std=C99 -O2 bin_PROGRAMS = include x64.am include arm.am include i686.am --------------------------------------- # src/event/x64.am bin_PROGRAMS += event_x64 event_x64_SOURCES = event.c event_x64_CFLAGS = -m64 --------------------------------------- # src/event/i686.am bin_PROGRAMS += event_i686 event_i686_SOURCES = event.c event_i686_CFLAGS = -m32 --------------------------------------- # src/event/arm.am bin_PROGRAMS += event_arm event_arm_SOURCES = event.c event_arm_CFLAGS = -DARM event_arm_CC = arm-linux-gnu-gcc AM_CC = arm-linux-gnu-gcc My problem is my gcc on my Fedora 23 does not support the '-marm', so I need to change the CC flag. Using event_arm_CC or AM_CC does not work. How to change the compiler? -- William Estrada Mt Umunhum, CA, USA, Earth HTTP:// Mt-Umunhum-Wireless.net Skype: MrUmunhum From unknown Sat Jun 21 10:44:15 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25350: Automake does not override CC. Resent-From: Mathieu Lirzin Original-Sender: "Debbugs-submit" Resent-CC: bug-automake@gnu.org Resent-Date: Sun, 18 Jun 2017 00:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25350 X-GNU-PR-Package: automake X-GNU-PR-Keywords: To: "william estrada" Cc: debbugs , 25350@debbugs.gnu.org Received: via spool by 25350-submit@debbugs.gnu.org id=B25350.14977442087002 (code B ref 25350); Sun, 18 Jun 2017 00:04:01 +0000 Received: (at 25350) by debbugs.gnu.org; 18 Jun 2017 00:03:28 +0000 Received: from localhost ([127.0.0.1]:53838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMNga-0001oo-R2 for submit@debbugs.gnu.org; Sat, 17 Jun 2017 20:03:28 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMNgV-0001oP-8J for 25350@debbugs.gnu.org; Sat, 17 Jun 2017 20:03:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMNgP-0007L2-At for 25350@debbugs.gnu.org; Sat, 17 Jun 2017 20:03:14 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMNgI-0007Dt-15; Sat, 17 Jun 2017 20:03:06 -0400 Received: from [2a01:e35:2ec2:e580:491c:541:7a4a:37d9] (port=52848 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dMNgH-0006Vm-Et; Sat, 17 Jun 2017 20:03:05 -0400 From: Mathieu Lirzin References: <9ffd0a13f7867cbcbee75204c25f33aa.squirrel@cruziomail.cruzio.com> Date: Sun, 18 Jun 2017 02:03:03 +0200 In-Reply-To: <9ffd0a13f7867cbcbee75204c25f33aa.squirrel@cruziomail.cruzio.com> (william estrada's message of "Tue, 3 Jan 2017 18:06:12 -0800") Message-ID: <87a856mabs.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) tags 25350 notabug close 25350 thanks Hello William, "william estrada" writes: > I have a Makefile.am that creates a Makefile that does 3 compiles, one for > each target CPU. > # src/event/Makefile.am > AM_LDLAGS = --Pedantic -Wall -Std=C99 -O2 > bin_PROGRAMS = > include x64.am > include arm.am > include i686.am > --------------------------------------- > # src/event/x64.am > bin_PROGRAMS += event_x64 > event_x64_SOURCES = event.c > event_x64_CFLAGS = -m64 > --------------------------------------- > # src/event/i686.am > bin_PROGRAMS += event_i686 > event_i686_SOURCES = event.c > event_i686_CFLAGS = -m32 > --------------------------------------- > # src/event/arm.am > bin_PROGRAMS += event_arm > event_arm_SOURCES = event.c > event_arm_CFLAGS = -DARM > event_arm_CC = arm-linux-gnu-gcc > AM_CC = arm-linux-gnu-gcc > > My problem is my gcc on my Fedora 23 does not support the '-marm', so I > need to change the CC flag. > Using event_arm_CC or AM_CC does not work. > > How to change the compiler? I don't any experience with cross compilation, but AIUI what you try to achieve doesn't fit in the Autotools model. What you have to do is to provide a generic build instruction: --8<---------------cut here---------------start------------->8--- bin_PROGRAMS = event event_SOURCES = event.c --8<---------------cut here---------------end--------------->8--- Then when running './configure' you have to define the "--build", "--host", and "--target" options according to the architecture you want compile [1][2]. If you want to automate this process for multiple architectures, you have to create a script running './configure ... && make' multiples times I am closing this bug. If you have questions regarding cross compilation with Automake feel free to ask them on . Thanks. -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37 [1] https://www.gnu.org/software/automake/manual/automake.html#Cross_002dCompilation [2] https://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Names